Skip to main content

Record and analyze user journeys with automated UX guidelines validation

Project description

UX Journey Scraper

CI/CD Pipeline codecov Python 3.9+ License: MIT

Record and analyze user journeys with automated UX guidelines validation.

A powerful tool for UX designers, developers, and QA teams to capture user flows through websites and analyze them against 324+ research-backed UX guidelines.

🎯 What It Does

  • Record User Journeys: Capture multi-step user flows through websites
  • Screenshot Every Step: Visual documentation of each journey step
  • UX Analysis: Automatically apply 324+ e-commerce UX guidelines
  • Accessibility Checks: WCAG 2.1 compliance validation
  • Privacy-Aware: Blur PII in screenshots automatically
  • Interactive Reports: HTML reports with annotated screenshots

🚀 Installation

Installation from Source (Recommended)

⚠️ Note: Package is not yet published to PyPI. Install from source:

# Clone the repository
git clone https://github.com/resabh/ux-journey-scraper.git
cd ux-journey-scraper

# Install in editable mode
pip install -e .

# OR install with full UX guidelines support
pip install -e ".[full]"

Future PyPI Installation (Coming Soon)

Once published to PyPI, you'll be able to install with:

# Basic (not yet available)
pip install ux-journey-scraper

# Full (not yet available)
pip install ux-journey-scraper[full]

Note: The [full] option requires ecommerce-ux-guidelines package. Without it, the tool still works but with limited UX analysis capabilities.

Post-Installation

After installation, install Playwright browsers:

playwright install chromium

📖 Quick Start

Record a Journey

# Start recording a user journey
ux-journey record \
  --start-url https://example.com \
  --output my-journey.json

# The tool will:
# 1. Check robots.txt (asks for confirmation if needed)
# 2. Open browser
# 3. Record each page you visit
# 4. Capture screenshots
# 5. Save journey data

Analyze the Journey

# Analyze recorded journey against UX guidelines
ux-journey analyze my-journey.json

# Generates:
# - my-journey-report.html (interactive report)
# - my-journey-analysis.json (detailed analysis)
# - screenshots/ (annotated images)

One Command (Record + Analyze)

ux-journey run \
  --start-url https://example.com/checkout \
  --analyze \
  --output checkout-journey

💡 Use Cases

1. Competitor Analysis

Analyze competitor websites to understand UX patterns and identify opportunities.

ux-journey record --start-url https://competitor.com

2. UX Audit

Perform comprehensive UX audits on existing websites.

ux-journey run \
  --start-url https://mysite.com \
  --analyze \
  --output audit-results

3. Pre-Launch Review

Validate new features before launch.

ux-journey record \
  --start-url https://staging.mysite.com/new-feature \
  --analyze

4. User Flow Documentation

Document user flows with screenshots and UX validation.

ux-journey run \
  --start-url https://mysite.com/signup \
  --output user-onboarding

🛠️ Features

Journey Recording

  • ✅ Multi-step journey capture
  • ✅ Automatic screenshot on each navigation
  • ✅ HTML structure extraction
  • ✅ Form field detection
  • ✅ CTA and button analysis
  • ✅ Navigation element capture

UX Analysis

  • ✅ 324+ e-commerce UX guidelines
  • ✅ Page-specific validation (checkout, product, etc.)
  • ✅ Priority-based issues (critical, major, minor)
  • ✅ Actionable fix suggestions
  • ✅ Guideline citations

Accessibility

  • ✅ WCAG 2.1 Level A/AA validation
  • ✅ Color contrast analysis
  • ✅ Keyboard navigation checks
  • ✅ Screen reader compatibility
  • ✅ ARIA attributes validation

Privacy & Security

  • ✅ PII blur in screenshots (emails, credit cards, names)
  • ✅ robots.txt respect (with user confirmation)
  • ✅ Rate limiting
  • ✅ No data collection or tracking

Reports

  • ✅ Interactive HTML reports
  • ✅ Annotated screenshots with issue markers
  • ✅ JSON export for automation
  • ✅ Journey flow visualization
  • ✅ Issue summaries and scores

📋 CLI Reference

ux-journey record

Record a user journey interactively.

ux-journey record [OPTIONS]

Options:
  --start-url TEXT         Starting URL (required)
  --output TEXT            Output file path (default: journey.json)
  --viewport TEXT          Viewport size (default: 1920x1080)
  --blur-pii               Blur PII in screenshots (default: true)
  --respect-robots         Check robots.txt (default: true)
  --headless              Run in headless mode (default: false)

ux-journey analyze

Analyze a recorded journey.

ux-journey analyze [OPTIONS] JOURNEY_FILE

Options:
  --output-dir TEXT        Output directory for reports (default: ./reports)
  --format TEXT            Report format: html, json, or both (default: both)
  --guidelines TEXT        Guideline priority: all, essential, high (default: all)

ux-journey run

Record and analyze in one command.

ux-journey run [OPTIONS]

Options:
  --start-url TEXT         Starting URL (required)
  --output TEXT            Output prefix (default: journey)
  --analyze               Run analysis after recording (default: true)
  --viewport TEXT         Viewport size (default: 1920x1080)

🔧 Python API

from ux_journey_scraper import JourneyRecorder, UXAnalyzer

# Record a journey
recorder = JourneyRecorder(
    start_url="https://example.com",
    blur_pii=True,
    respect_robots=True
)

journey = await recorder.record()
journey.save("my-journey.json")

# Analyze the journey
analyzer = UXAnalyzer()
results = analyzer.analyze(journey)

# Generate report
results.generate_html_report("report.html")
results.generate_json_report("report.json")

# Access violations
for step in results.steps:
    print(f"Step {step.number}: {step.url}")
    print(f"  Issues: {len(step.violations)}")
    for violation in step.violations:
        print(f"    - {violation.title} (Guideline #{violation.guideline_id})")

📊 Sample Report Output

Journey Analysis Report
=======================

Journey: Checkout Flow (https://example.com)
Steps: 5
Overall Score: 72.5/100

Step 1: Homepage (/)
  Score: 85.0/100
  Issues: 3 (1 major, 2 minor)
  Screenshot: screenshots/step-001.png

Step 2: Product Listing (/products)
  Score: 78.0/100
  Issues: 5 (2 major, 3 minor)
  Screenshot: screenshots/step-002.png

Step 3: Product Detail (/products/123)
  Score: 65.0/100
  Issues: 8 (1 critical, 3 major, 4 minor)
  Screenshot: screenshots/step-003.png
  ⚠️  Critical Issue: "Add to Cart" button too small (< 44x44px)
      → Guideline #237: Touch targets must be at least 44x44px

...

🔍 How It Works

  1. Recording Phase

    • Opens browser (Playwright)
    • Checks robots.txt (asks for confirmation if restricted)
    • Waits for user to navigate through the site
    • Captures screenshot + HTML on each navigation
    • Records journey steps in JSON
  2. Analysis Phase

    • Loads journey data
    • Applies UX guidelines (from ecommerce-ux-guidelines)
    • Runs accessibility checks
    • Generates issue annotations
    • Blurs PII in screenshots
    • Creates interactive report
  3. Reporting Phase

    • Generates HTML with embedded screenshots
    • Creates visual journey map
    • Exports JSON for automation
    • Annotates screenshots with issue markers

🧩 Integration with ecommerce-ux-guidelines

This tool depends on the ecommerce-ux-guidelines package for UX validation:

from ecommerce_ux_guidelines import GuidelineEngine, Validator, AccessibilityValidator

# UX Journey Scraper uses these internally
engine = GuidelineEngine()
validator = Validator(engine)
a11y_validator = AccessibilityValidator(engine)

🛣️ Roadmap

Phase 1 (Current)

  • ✅ Desktop web journey recording
  • ✅ UX guidelines validation
  • ✅ HTML report generation
  • ✅ PII blur
  • ✅ robots.txt handling

Phase 2 (Coming Soon)

  • ⬜ Mobile web recording (responsive viewports)
  • ⬜ Automated crawling (follow links automatically)
  • ⬜ Visual journey flow diagrams
  • ⬜ PDF export
  • ⬜ Slack/email notifications

Phase 3 (Future)

  • ⬜ Mobile app recording (iOS/Android via Appium)
  • ⬜ A/B testing comparison
  • ⬜ Historical journey tracking
  • ⬜ Team collaboration features
  • ⬜ CI/CD integration

🤝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details

🔗 Related Projects

📞 Support


Made with ❤️ for better user experiences

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ux_journey_scraper-0.2.0.tar.gz (57.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ux_journey_scraper-0.2.0-py3-none-any.whl (59.2 kB view details)

Uploaded Python 3

File details

Details for the file ux_journey_scraper-0.2.0.tar.gz.

File metadata

  • Download URL: ux_journey_scraper-0.2.0.tar.gz
  • Upload date:
  • Size: 57.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for ux_journey_scraper-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c52c257612a7b75c36362d6e55f58d20ca9d6c60825616570f451e260ea94470
MD5 3f4fa86d6537be9b25285cb58aa20afd
BLAKE2b-256 92d6d6f2dcb9d83a2df60ba153cd54d1f7a5aa85d691883b31140cc59a839cea

See more details on using hashes here.

File details

Details for the file ux_journey_scraper-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ux_journey_scraper-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96b72873ce2acdfa55340de6b616b383b501f76624427b85f479d19a300989c1
MD5 ffd41224f94f19765f7e286142934807
BLAKE2b-256 38c85581569db21a543151121382d7b2bc850e9714680791d62d353c720783cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page