---
name: utm-campaign-tracking
description: Governs campaign URL tagging and the quality of source and medium data, so an AI agent builds UTM links that classify correctly in GA4, keeps a single source of truth against auto-tagging, and never corrupts attribution. Use when the request mentions UTM parameters, utm_source, utm_medium, utm_campaign, campaign tags, tracking links, a UTM spreadsheet or builder, source and medium, channel grouping, "why is my traffic showing as direct or unassigned", self-referrals, or campaign naming conventions. Do NOT use for designing the event taxonomy (event-tracking-plan), server-side ad conversions and the Conversions API (conversion-tracking-capi), validating that tags fire (analytics-qa-validation), or analysing campaign performance once collected (funnel-analysis, paid-media-reporting).
license: CC BY 4.0. Free to use and adapt with credit to Afeez Adebayo.
metadata:
  author: Afeez Adebayo
  website: https://afeezadebayo.com
  linkedin: https://www.linkedin.com/in/afeez-adebayo/
  source: https://afeezadebayo.com/skills-md/data/analytics-tracking/utm-campaign-tracking/
  category: data
  subcategory: analytics-tracking
  version: 1.0.0
  created: 5 November 2026
  updated: 5 November 2026
---

# UTM campaign tracking

A UTM is five small parameters bolted onto a link, and they decide how every campaign visit is filed for the life of the dataset. Get them consistent and a report groups itself. Get them loose and the same campaign scatters across `Facebook`, `facebook` and `FB`, paid clicks land in the wrong channel, and a tagged internal link quietly rewrites where your users came from. This skill makes an AI agent treat campaign tagging as data governance: one set of rules, an allowed list of values that matches how the analytics tool classifies traffic, and a check before any link ships.

The cost of a mistake here is unusual, because campaign data is written once and is hard to change. A typo in `utm_source` becomes permanent history in GA4 that can only be repaired retroactively in the warehouse. So the work is preventive: decide the grammar, hold the allowed values, and never tag a link that should not be tagged.

## When to use this skill, and when not to

Use this skill to design a UTM convention, to build or audit a campaign-link registry, to fix traffic that lands in Direct or Unassigned, to stop self-referrals, or to set campaign naming rules. It fires on UTM parameters, `utm_source` and `utm_medium`, campaign tags, tracking links, source and medium, channel grouping, or a UTM spreadsheet or builder.

Do not use it to design the event taxonomy, which is the sibling `event-tracking-plan`. Do not use it for server-side ad conversions and the Conversions API, which is `conversion-tracking-capi`. Do not use it to check that tags actually fire, which is the sibling `analytics-qa-validation`. Do not use it to analyse campaign performance once the data is collected, which is `funnel-analysis` or `paid-media-reporting`. Campaign tagging is the inbound source-and-medium contract that feeds those skills; design it here and hand the rest off by name.

## Inputs the agent must have before starting

Ask for these in one message, and do not invent them:

1. The analytics tool that reads the links (GA4, Adobe, Piwik PRO), because its channel rules decide which `utm_medium` values are safe.
2. The channels in use: paid search, paid social, organic social, email, affiliates, display, SMS, referral partners, print or offline QR codes.
3. Which ad platforms auto-tag. Google Ads adds a `gclid` and Meta adds an `fbclid` on their own; these must not also be hand-tagged.
4. Any existing UTM links or a current spreadsheet, so the audit is grounded in what is live.
5. Who creates campaign links today, and whether there is a shared registry or builder.
6. The campaign-naming information the business needs to slice by, such as quarter, region, objective or offer.

If the analytics tool is unknown, stop and ask: the allowed `utm_medium` values depend entirely on how that tool groups channels.

## Workflow

### Step 1. Set the parameter grammar

Write the rules once and apply them to every link.

- The five parameters are `utm_source`, `utm_medium`, `utm_campaign`, `utm_term` and `utm_content`. Require `utm_source`, `utm_medium` and `utm_campaign` on every manual link. Use `utm_content` to tell two creatives or placements apart, and leave `utm_term` to automated keyword tagging rather than filling it by hand.
- Lowercase everything. Analytics tools report `Facebook` and `facebook` as two different sources, so a single casing rule prevents split rows.
- Use hyphens for multi-word values and never spaces. A space becomes `%20` or `+` in the URL and reads as broken text in reports.
- No personal data in any parameter, ever. UTMs sit in the URL, are shared, bookmarked and logged, so an email, a name or a user id in `utm_campaign` leaks it everywhere; keep identifiers out.

### Step 2. Build the allowed-value list for source and medium, aligned to the channel rules

`utm_medium` is the parameter that decides the channel, so its values are not free text. Fix a short allowed list that maps cleanly onto how the tool groups traffic, because a value just outside the rule drops the visit into Unassigned.

For GA4, as last checked on 5 November 2026, the default channel group assigns traffic by rules such as these, which are version-dependent, so re-check the GA4 documentation before relying on them:

- Organic Search: `utm_medium` exactly `organic`, or a known search source.
- Paid Search: `utm_medium` matching the pattern for `cpc`, `ppc`, `paid` or `retargeting` with a search source. Use `cpc`; note that `cost-per-click` does not match and lands in Unassigned.
- Organic Social: `utm_medium` one of `social`, `social-network`, `social-media` or `sm`.
- Paid Social: a paid medium with a social source.
- Email: `utm_medium` `email` (a few spellings such as `e-mail` also map; standardise on `email`).
- Display: `utm_medium` one of `display`, `banner`, `cpm`.
- Affiliates: `utm_medium` `affiliate`. SMS: `sms`. Referral: `referral`.

Medium matching is not case sensitive, but source casing still creates separate report rows, which is the second reason to lowercase everything. Prefer `paid-social` and `organic-social` over a bare `social` so paid and organic do not blur.

### Step 3. Define the campaign-name pattern

Give `utm_campaign` a fixed shape so campaigns sort and filter. A pattern such as `yyyyqq-region-objective-descriptor` (for example `2026q4-uk-leadgen-webinar`) lets anyone read a campaign at a glance and lets a report group by any segment. Document the allowed values for each slot. Keep `utm_content` for the A/B or placement detail, not for information that belongs in the campaign name.

### Step 4. Decide auto-tagging versus manual tagging, and never run both

Two sources of truth is the most expensive UTM mistake. Google Ads and Meta tag their own clicks automatically, and adding manual UTMs on top creates conflicting records; the automatic id usually wins, but when auto-tagging fails the manual tag takes over and the same channel reports under two names. The rule: let a platform that auto-tags do the tagging, and reserve manual UTMs for channels that have no automatic tagging, such as email, organic social, newsletters, partners and offline codes. A platform that mixes the two can mislabel a meaningful share of its paid clicks for weeks before anyone notices.

### Step 5. Never tag internal or self-referring links

A UTM on a link that points to your own site starts a new session and overwrites the real source, so a visitor who arrived from organic search gets reattributed to a made-up internal source, and everything they do next is credited to it. The same damage comes from putting a UTM on a canonical URL submitted to Search Console or in an email-signature link back to your own site. Tag only links that bring people from another property to yours. For movement inside the site, use click events in the tag manager or enhanced measurement, not UTMs.

### Step 6. Put it in a registry and QA before launch

A convention with no enforcement rots within a quarter. Hold the rules in a shared registry: a spreadsheet with data-validation dropdowns for source and medium, the documented campaign-name pattern, and one row per link, or a dedicated UTM builder once the business runs more than roughly a hundred campaigns a month. Run every new link through a pre-publish check before it goes out, because once a mistagged link is clicked the bad rows are permanent and can only be mended retroactively in the warehouse. Generating links is reversible; publishing them is not, so default to proposing links for review rather than shipping them.

## Worked example

A team reports that a third of their email traffic shows up as Direct and their Google Ads numbers look doubled. The quick fix is to add more UTMs, which would make both problems worse.

Running the workflow: Step 1 finds email links tagged `utm_source=Newsletter` with `utm_medium=Email` and others with a trailing space, so the same campaign splits across cased and padded rows; the rule becomes lowercase, hyphenated, no spaces. Step 2 finds the newsletter using `utm_medium=newsletter`, which no channel rule matches, so it fell into Unassigned and then looked like Direct in some views; it is standardised to `email`. Step 3 gives campaigns the pattern `2026q4-uk-nurture-week3` in place of free-text names. Step 4 explains the doubled Google Ads figure: the team auto-tagged in Google Ads and also added manual `utm_source=google-ads` links, creating two records per click; the manual tags are removed so auto-tagging is the single source of truth. Step 5 finds a UTM on the site's own header logo link, which had been resetting sessions and inflating an internal source; it is replaced with a tag-manager click event. Step 6 moves everything into a shared sheet with dropdowns and a pre-launch check.

The email traffic now classifies as Email, the Google Ads count halves to the true number, and the internal source disappears. No historical data could be changed, so the team also notes the break date for anyone comparing periods.

## Templates you can use verbatim

Approved medium to channel map (GA4; verify against current docs):

```
utm_medium      ->  GA4 default channel
cpc             ->  Paid Search (with a search source)
paid-social     ->  Paid Social (with a social source)
organic-social  ->  Organic Social
email           ->  Email
display         ->  Display
affiliate       ->  Affiliates
sms             ->  SMS
referral        ->  Referral
Avoid: social (blurs paid and organic), cost-per-click (lands in Unassigned), free text
```

UTM registry columns (one row per link):

```
date | owner | channel | utm_source | utm_medium | utm_campaign | utm_content | final_url | full_tagged_url | notes
Rules: source and medium are dropdowns from the allowed list. utm_campaign matches yyyyqq-region-objective-descriptor.
No personal data in any field. No internal-link rows. Auto-tagged platforms are not listed here.
```

Pre-publish checklist for one link:

```
[ ] All lowercase, hyphens not spaces
[ ] utm_medium is on the allowed list and maps to the channel you expect
[ ] utm_source and utm_campaign present; campaign name matches the pattern
[ ] This link points to your site from somewhere else (not an internal or self-referring link)
[ ] The destination platform does not already auto-tag this click
[ ] No email, name or id anywhere in the URL
```

Prompt to start: "Audit our UTM tagging for [tool]. Here is the current campaign-link spreadsheet and a sample of live links: [paste]. Fix the grammar, align mediums to the channel rules, flag any internal-link or double-tagging problems, and give me a registry with dropdowns."

## Failure modes and anti-patterns

1. Free-text or inconsistent casing. You spot it as `Facebook`, `facebook` and `FB` as separate sources and the same campaign split across rows. Fix it with the lowercase, hyphen, no-space rule and dropdowns in the registry.
2. A medium that no channel rule matches. You spot it as traffic in Unassigned or lumped into Direct. Fix it by restricting `utm_medium` to the allowed list in Step 2 so every value maps to a channel.
3. Manual tags on an auto-tagging platform. You spot it as doubled paid numbers or a channel reporting under two source names. Fix it by letting the platform auto-tag and removing the manual UTMs for that channel.
4. UTMs on internal or self-referring links. You spot it as a strange internal source with high traffic and shrinking organic and direct. Fix it by removing the tags and using tag-manager click events instead.
5. No registry or pre-launch check. You spot it as the convention decaying within a quarter and new ad-hoc values appearing. Fix it with the shared registry and the pre-publish checklist, and QA links before they ship because the data cannot be fixed afterwards.

## Quality bar for the tagging scheme

Before handing over, confirm every item:

- One grammar is written down: lowercase, hyphens, no spaces, and which parameters are required.
- `utm_medium` is a closed allowed list, and every value maps to a known channel in the tool.
- The campaign-name pattern is documented with allowed values per slot.
- Auto-tagged channels are excluded from manual tagging, and the single source of truth is stated.
- No link in the scheme points at the site's own pages, and no canonical or email-signature self-link carries a UTM.
- No parameter contains personal data.
- A registry with dropdowns and a pre-publish checklist exist, and links are reviewed before launch.
- Any version-dependent channel rule was verified against current documentation, not assumed.

## Tool-specific appendix

```
GA4
- Default channel group assigns by source and medium with fixed rules; the group cannot be edited (you can
  build a custom channel group for reporting). Medium matching is not case sensitive, but source casing
  creates separate rows. cpc maps to Paid Search; cost-per-click does not and lands in Unassigned.
- A campaign-info change starts a new session, which is why a tagged internal link reattributes the visit.
- Historical source and medium cannot be edited in GA4; corrections happen only in the BigQuery export.

Google Ads
- Auto-tagging adds a gclid and populates GA4 campaign dimensions automatically. Do not also apply manual
  UTMs to Google Ads links; keep auto-tagging as the single source of truth.

Meta and other ad platforms
- Meta adds fbclid. For channels you tag by hand (email, organic social, partners, offline QR), apply the
  manual UTM convention. Decide per platform whether auto-tagging or manual tagging owns the click, never both.

Campaign URL builders and registries
- A shared sheet with data-validation dropdowns enforces the allowed values for small programmes. For roughly
  a hundred or more campaigns a month, a dedicated UTM builder with a locked taxonomy pays for itself.
```

## Sources

- Google Analytics 4, Default channel group definitions (source and medium assignment rules for Organic Search, Paid Search, Organic and Paid Social, Email, Display, Affiliates, SMS, Referral). Last verified 5 November 2026; the rules are version-dependent, so re-check before relying on specific values.
- Practitioner guidance on UTM naming conventions and failure modes (lowercase and hyphen rules, permanent typos, the internal-link session reset, auto-tagging versus manual tagging conflicts, registry governance). Last verified 5 November 2026.
- Google Ads auto-tagging behaviour (gclid, single source of truth with GA4). Last verified 5 November 2026.
- Related skills: event-tracking-plan (the event taxonomy), conversion-tracking-capi (ad conversions), analytics-qa-validation (checking tags fire), and paid-media-reporting and funnel-analysis (analysis).
