utm.new
guide ·

Use AI to generate and govern your UTM taxonomy

Prompt patterns for getting an LLM to design a UTM naming convention, validate links at scale, and catch casing drift — plus where AI should never be in charge.

A UTM convention is mostly a writing problem: name things consistently, document the rules, and notice when someone breaks them. Those are exactly the chores an LLM is good at. Used well, an AI can draft a taxonomy faster than a committee and audit a thousand existing URLs without getting bored.

Used badly, it invents plausible-looking sources that nobody agreed on and quietly contradicts your existing reports. The difference is governance. Here’s how to get the speed without the drift.

Where AI genuinely helps

Three jobs, in order of how much time they save:

  1. Drafting the convention. Give the model your channels and let it propose a structured naming scheme. You’ll edit it, but you start from a complete first draft instead of a blank doc.
  2. Validating at scale. Paste a column of existing URLs and ask it to flag everything that violates the rules — uppercase values, underscores, unknown sources, missing parameters. This is the highest-leverage use.
  3. Normalizing drift. When you find Facebook, facebook, and fb-ads all in the wild, the model can map every variant to the canonical value so you know what to fix.

What it should not do: silently pick new source names, decide your channel taxonomy without sign-off, or be trusted to count. AI proposes; a human enforces; one builder is the source of truth.

A copy-paste prompt for designing the convention

Adapt the bracketed parts and hand this to ChatGPT, Claude, or whichever assistant you use:

You are helping me design a UTM parameter naming convention.

Context:
- Tool: GA4 (UTM values are case-sensitive).
- Channels we run: [paid search, paid social, email,
  affiliate, AI-assistant referral].
- AI-assistant traffic uses utm_medium=ai-assistant (the value
  GA4's native AI Assistants channel recognizes), with utm_source
  per assistant: chatgpt, perplexity, gemini, copilot, claude.

Rules to enforce in every value:
- lowercase only
- hyphen-separated (no spaces, no underscores)
- stable campaign names for a campaign's whole life
- utm_id reserved for the ad platform's dynamic macro

Output:
1. A table mapping each channel to its utm_source and
   utm_medium values.
2. The allowed value list for each parameter.
3. Five example tagged URLs, one per channel.
4. A short list of the most likely ways a team breaks this.

Do not invent channels or sources I didn't list. If something
is ambiguous, ask me before guessing.

That last line matters. Without it, models fill gaps with confident guesses. With it, they surface the ambiguity instead of papering over it.

The conventions this should produce line up with UTM parameters best practices for the general rules and A UTM convention for the AI search era for the AI-specific source and medium values. Feed those in as context if you want the output to match exactly.

This is the one to run regularly. Drop in a list of URLs you’ve actually used:

Audit these UTM-tagged URLs against this convention:
- utm_source, utm_medium, utm_campaign must be lowercase
  and hyphen-separated.
- Allowed utm_source: [google, meta, linkedin, chatgpt,
  perplexity, gemini, copilot, claude, newsletter, partner].
- Allowed utm_medium: [cpc, paid-social, email, referral,
  ai, social].
- utm_campaign must use hyphens, never underscores or spaces.

For each URL, return: the URL, PASS/FAIL, and the specific
violation(s). Then give me a deduped list of every
nonstandard value you found and the canonical value it
should map to.

URLs:
[paste here]

The deduped mapping at the end is the deliverable. It tells you that ChatGPT, Chatgpt, and chat-gpt all need to become chatgpt — the exact casing drift that splits an AI channel into three rows and makes it look smaller than it is.

Why “AI proposes, humans enforce” is not optional

Two failure modes you’ll hit if you skip the human step:

Confabulated sources. Ask a model to “fill in reasonable UTMs” and it will happily produce utm_source=ai-search or utm_source=llm — reasonable-sounding values that aren’t in your scheme and immediately fragment your data. The fix is constraint: give it the allowed list and tell it not to invent.

Inconsistent runs. Run the same loose prompt twice and you may get paid-social once and social-paid the next time. The model isn’t malicious; it’s reaching for synonyms. Pin the vocabulary in the prompt and the variance drops.

The structural fix for both is to not let prose-generated URLs reach production at all. Use the LLM to design and audit the convention, then generate the actual links from one builder that enforces the rules mechanically. A builder can’t typo Chatgpt; a model under deadline can. Build your tagged links at utm.new and the convention holds regardless of which teammate (or assistant) drafted the campaign brief.

Closing the loop on enforcement

A taxonomy is only as good as the moment a URL gets created. The reliable pattern:

  1. Design the convention with an LLM, sign off as a human.
  2. Document it where the team looks — a pinned doc, a README. (We wrote about doing exactly this in How we rebuilt our UTM conventions.)
  3. Generate every link from one builder so the rules are enforced, not remembered.
  4. Audit periodically with the validation prompt to catch anything that slipped in by hand.

AI compresses steps 1 and 4 from an afternoon to a few minutes. It does not replace step 3. Keep a human and a builder in the loop, and you get the speed of letting a model do the tedious parts without inheriting its confident mistakes.

More in this series