Skip to content

Repository files navigation

Landing Page Pre-Flight Auditor

A Playwright-powered auditor that answers a practical paid-media question:

Is this landing page technically safe to put ad spend behind?

The tool opens any URL in a real Chromium browser, captures client-observable evidence, classifies ad/analytics tags, attempts the primary ecommerce action when product/cart structure is present, compares product truth against tracking payloads, and emits a stakeholder-ready HTML report plus raw technical artifacts.

Why This Matters

Most pixel checks stop at "did a tag fire?" This auditor goes further:

  • Did the page load cleanly in a real browser?
  • Which tracking providers actually fired?
  • Did Add to Cart work?
  • Did conversion-like tracking fire after the user action?
  • Did tracked price/currency/product/variant match what the customer saw?
  • Are duplicate events likely to inflate measurement?
  • What could not be verified safely?

Demo Proof

Live GitHub Pages view:

Primary assignment target:

Additional ecommerce proof:

Quick Start

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python -m playwright install chromium

Run an audit:

python run_audit.py --url "https://neemans.com/products/duoform-sneakers-for-men-ecru"

Run with the optional Groq duplicate-event judge:

GROQ_API_KEY=... python run_audit.py \
  --url "https://neemans.com/products/duoform-sneakers-for-men-ecru" \
  --llm-duplicates

Outputs

Each run creates:

  • sample_report/<run_id>.html - stakeholder report
  • sample_report/<run_id>.json - machine-readable summary
  • sample_report/<run_id>_assets/*.png - portable report screenshots
  • artifacts/<run_id>/network.jsonl - captured network log
  • artifacts/<run_id>/dom_snapshots.json - before/after DOM evidence
  • artifacts/<run_id>/raw_audit.json - raw browser capture
  • artifacts/<run_id>/trace.zip - Playwright trace
  • artifacts/<run_id>/network.har - HAR evidence
  • artifacts/<run_id>/screenshot_full.png
  • artifacts/<run_id>/screenshot_after_interaction.png
  • artifacts/<run_id>/judgment_log.jsonl when --llm-duplicates is used and an ambiguous duplicate needs model review

Verdicts

  • READY: no blockers, high-risk findings, watch items, or unverifiable critical checks.
  • READY WITH CAUTION: no blockers/high-risk findings, but watch or unverified items remain.
  • NOT READY: at least one blocker or high-risk measurement/interaction issue.

Finding severities:

  • BLOCKER
  • HIGH RISK
  • WATCH
  • PASS
  • UNVERIFIED

Scope

Universal checks run for every URL:

  • navigation status and final URL
  • console/page errors
  • failed critical browser requests
  • known tracking provider detection
  • page/product-view style event detection
  • duplicate tracking request detection
  • screenshot, HAR, trace, and JSON evidence

Deep ecommerce checks run when product/cart structure is detected:

  • visible and structured product truth
  • Shopify product JSON, JSON-LD, cart forms, variant/SKU
  • Add-to-Cart interaction
  • post-click conversion-like event detection
  • price/currency/product/variant payload correspondence
  • event timeline and payload correspondence tables

If ecommerce structure cannot be inferred safely, the report says UNVERIFIED instead of pretending.

LLM Boundary

The deterministic analyzer produces the report by default. Groq is optional and only used via --llm-duplicates for ambiguous duplicate/event-intent classification. The model never decides whether requests happened, whether numeric values match, or what the final verdict is. Every attempted model judgment is logged with timestamp, model, input, prompt, and output.

Project Map

Verification

python3 -m unittest discover -s tests
python3 -m compileall -q auditor tests run_audit.py
python run_audit.py --url "https://neemans.com/products/duoform-sneakers-for-men-ecru"

Demo Video

No video file is currently included in the repository. The submission includes browser-rendered report screenshots, HTML reports, JSON summaries, HAR files, and Playwright traces generated by live runs.

About

Real-browser preflight auditor with observable evidence, safe action checks, and raw trace artifacts

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages