← All work
2024 · Experimentation Developer

Automated Analytics & Tracking Audits

A tool I built that connects to a client's GA4 and GTM, crawls the site, and reports what's actually being tracked versus what should be.

  • Node.js
  • Playwright
  • GA4
  • GTM
  • JavaScript

Problem

Every engagement opens with the same question: what does this client's analytics setup actually look like? Answering by hand — digging through GA4, reading the GTM container, clicking around to see what fires — is slow, and two people come back with two different stories. The start of an engagement gets spent reconstructing what's there instead of acting on it.

Approach

I built a tool that answers it automatically. Given GA access, it pulls a 30-day GA4 snapshot, reads the GTM container for what's configured, and runs a Playwright crawl that records the GA and dataLayer events that actually fire.

What makes it useful is what I treat as truth. I don't trust configuration — a tag can be set up perfectly and still not fire, or fire with the wrong data, which is exactly what a manual review skims past. So the tool lines up all three views — configured, fired, and reported — and their disagreements become the report: a scorecard of specific fixes.

Results

The opening of an engagement goes from manual reconstruction to one picture the whole team works from. Because it watches real behavior instead of reading config, it catches the silent failures a hand audit misses — the tag that looks fine and isn't. Trust what fires, not what's configured to.

Outcome — One consistent picture of a client's setup at the start of an engagement