runbookify
← All plans
Marketing Operations / UTM / Attribution & Analytics

UTM Audit & Cleaner

Import a list of campaign URLs (from your analytics export or a link-building sheet), automatically find the missing, malformed, and inconsistently-tagged UTMs - including all the FB/fb/Facebook case-and-spelling variants that splinter your reports - and get a proposed normalization map that an analyst reviews and approves before any corrected link or mapping table is ever exported. Nothing is silently rewritten.

IntermediateA weekendBuilds onNext.js (App Router) on VercelSupabase (Postgres, Auth, Storage, RLS)Resend (email notifications and digests)
What you'll build

A private internal tool where you import campaign URLs, automatically detect missing, malformed, and variant UTM tags, group the fuzzy variants for one-click standardization, review a proposed normalization map, approve it, and export corrected links plus a mapping table as clean CSVs - all with login, row-level security, a full audit trail, a human approval gate, and duplicate protection on the canonical source/medium/campaign tuple.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.

Before you start

  • A free Supabase account
  • A free Vercel account
  • A free Resend account
  • A CSV of campaign URLs or a source/medium/campaign export from your analytics
  • Your canonical naming standard (the approved values for source, medium, campaign)

The problem this kills

Your attribution reports are a mess and you know it. Years of campaign links got tagged by different people, agencies, and tools - so now your analytics shows facebook, Facebook, FB, fb, and facebook.com as five different sources. Mediums are a free-for-all: cpc, CPC, paid, paid-social. Campaign names have typos, stray capital letters, and trailing spaces. Some links have no UTMs at all; others are malformed and break on import.

The result: every report under-counts your real channels, splits one campaign across a dozen rows, and forces someone to spend a painful afternoon in a spreadsheet doing find-and-replace by hand - hoping they don't miss a variant or break a historical comparison.

You've probably been told the fix is a "tagging governance process" and a locked-down spreadsheet. That doesn't clean up the years of mess you already have, and it doesn't catch the next typo. What you actually need is a tool that reads your links, surfaces every inconsistency, proposes a clean mapping, and lets a human approve it before anything changes.

What you'll build

A private internal web app that:

  • Imports a CSV of campaign URLs (or a source/medium/campaign export from your analytics).
  • Parses every URL and pulls out its UTM parameters - source, medium, campaign, term, content.
  • Detects the problems: missing UTMs, malformed URLs, and the case/spelling/spacing variants that should be one value.
  • Groups the fuzzy variants so FB, fb, and Facebook show up together, ready to collapse to your canonical facebook in one click.
  • Proposes a normalization map - a plain table of "messy value -> approved value."
  • Stops and waits for an analyst to review and approve the map. Nothing is rewritten silently.
  • Exports two clean CSVs once approved: corrected links, and the mapping table so your historical and future reporting finally line up.

What's inside the Implementation Plan

The plan is a single markdown file you paste into Claude Code, an AI coding agent that writes and runs the software for you. You don't write code - you answer questions and approve what it builds.

It starts by interviewing you about your business. Before writing a single line, the agent asks how you tag links today, which analytics tool and link sheets you use, the exact field and naming conventions in your data (your real source/medium/campaign values, your SKU or campaign-code format), your typical and peak link volumes, your approval rules, and your messiest edge cases. It reflects a short tailored spec back to you and waits for your thumbs-up - so the tool fits your tagging reality, not a generic template.

Then it walks you, step by step, through building the importer, the UTM parser, the variant detector, the variant-grouping and approval screen, and the CSV exports - each step ending with a ready-to-paste prompt. It closes with a "how to know it works" checklist and a no-API fallback so you can build the whole thing today using just CSVs.

The governance it includes (this is the point)

This isn't a throwaway script - it's an internal tool you can trust with reporting that matters:

  • Login, so only your team can use it.
  • Row-level security, so people only ever see their own organization's data.
  • A full audit trail - who imported what, who approved which mapping, and when.
  • A hard human-in-the-loop approval gate - the AI proposes the normalization map, an analyst reviews and approves it, and only then are corrected links and the mapping table produced.
  • Duplicate guards - the same link can't be processed twice, keyed on the canonical (source, medium, campaign) tuple after normalization.

Who it's for

Marketing ops specialists and analysts who are cleaning up years of inconsistent UTM tagging and need their attribution reporting to finally hold together - without rewriting anything by hand or trusting a black box to silently change their data.

You've got this. Paste the first prompt and let the agent interview you.

Gated download

Enter your email — the plan downloads instantly and a copy lands in your inbox.

By submitting your email you'll also receive the weekly runbookify newsletter. You can unsubscribe at any time.