UTM codes: what the five parameters do and how to use them

Google's own documentation says utm_source=Facebook and utm_source=facebook are two different sources. That one detail breaks more campaign reporting than anything else in tracking.

8 minute read

A UTM code is not really a code

It is a handful of extra key-value pairs stuck on the end of a URL after a question mark. Your web server ignores them, the page loads identically, and the visitor sees nothing different except a longer address bar. Your analytics tool reads them and files that visit under a source you chose rather than one it had to guess. The name is a leftover — Urchin Tracking Module, from the analytics product Google Analytics grew out of — and nothing about the format is owned by Google. Any tool that can parse a query string can read them, which is why the same tagged link works in GA4, in Plausible, and in most email platforms without you configuring anything. UTMs are a convention, not a feature. That is why they are portable, and also why they break so easily.

The three parameters you always set

Google's campaign URL documentation names utm_source, utm_medium and utm_campaign as the three to always include. Source is the specific place the click came from — linkedin, newsletter, partner-podcast — not a category. Medium is the type of channel: email, social, cpc, referral. Medium is the one doing the most work, because GA4's default channel groups are defined by matching source and medium against fixed lists, so a visit tagged medium=social gets filed as Organic Social while the same visit tagged medium=instagram gets filed as Unassigned. Campaign is the specific thing you are running: spring-sale, launch-week, ep-142. Leave any of the three empty and Google's documentation is blunt about the result — the gap shows up in your reports as "(not set)", which is worse than no data because it looks like data.

The two you set only when you have a reason to

utm_term was built for paid search keywords and has almost no use outside of ads. utm_content is the more useful of the pair: it separates two things pointing at the same destination, which is exactly the situation you are in when the same clip goes in your bio link and your story, or when an email has a text link and a button. Google also documents utm_id for a campaign ID, plus utm_source_platform, utm_creative_format and utm_marketing_tactic — and its own documentation notes the last two are not currently reported, so setting them buys you nothing today. The working rule is to add a parameter only when you can name the decision it will help you make. Five parameters you never look at are five more chances to typo something.

Why this matters far more for social than anywhere else

Normally your analytics tool works out the source itself: the browser sends a referrer header naming the page the click came from, which is why a link from someone's blog appears as a referral with nobody tagging anything. Social apps break that chain. Most open links inside their own embedded browser rather than handing off to Safari or Chrome, and those in-app browsers routinely drop or obscure the referrer. Meta adds a redirect of its own — the link shim — which is why sessions surface as l.facebook.com rather than facebook.com. With no referrer, no UTM and no click ID, GA4 leaves the session in Direct, alongside people typing your URL from memory. UTMs ride inside the URL, so they survive. Be sceptical of anyone quoting a precise share of social traffic misfiled this way: the mechanism is well documented, the size of it has never been credibly measured.

Lowercase everything, and write the convention down

Google's documentation states it plainly: parameter values are case sensitive, so utm_source=google and utm_source=Google are two different sources. GA4 has no setting to normalise them — it stores the exact string it receives and gives each unique string its own row. The result is one campaign split across LinkedIn and linkedin, each looking like half a campaign, and neither number matching what the platform reports. So: lowercase everything, hyphens rather than spaces or underscores for multi-word values, and a short written list of the source and medium values your team is allowed to use, kept somewhere people actually look. Medium especially should be a closed set of maybe six values. The convention matters less than the fact that it is written down and there is only one of it.

Where they belong, and the one place they must never go

UTMs describe how someone arrived, so they belong on anything pointing at your site from outside it: social bios and captions, email links, newsletter sponsorships, podcast show notes, QR codes, partner placements. They must never go on internal links between your own pages. The usual explanation is that an internal UTM restarts the session — that was true in Universal Analytics, but it is not how GA4 behaves. GA4 starts a session on a first visit or after thirty minutes of inactivity, not on a campaign change. What actually happens is that the session-scoped campaign dimensions get overwritten mid-session, so a visitor who genuinely arrived from your newsletter is recorded as arriving from homepage-banner. The damage is the same, and knowing the real mechanism tells you the fix: track internal clicks as GA4 events instead.

Where they show up in GA4, and one 2026 change

In the Traffic acquisition report, utm_source becomes Session source, utm_medium becomes Session medium and utm_campaign becomes Session campaign, with First user versions of each in User acquisition. utm_term and utm_content become Session manual term and Session manual ad content, and GA4 keeps both out of the standard reports — you need an Exploration or a custom report to see them. One recent change is worth knowing about: Google announced a Source Group dimension on 11 June 2026 that consolidates the scattered source values a single platform produces, collapsing facebook, fb and m.facebook.com into one row, applied retroactively across Facebook, Instagram and TikTok. It fixes the platform's mess for you. It does not fix yours — your own inconsistent campaign names are still yours to keep tidy.

FAQ

What are the five UTM parameters?

utm_source (where the click came from), utm_medium (the type of channel), utm_campaign (the initiative it belongs to), utm_term (paid search keyword) and utm_content (which of two creatives or placements it was). Google's documentation recommends always using the first three. Term and content are optional and mostly matter for ads and for A/B testing two links to the same page.

Are UTM codes case sensitive?

Yes. Google's Analytics documentation states directly that parameter values are case sensitive, so utm_source=google and utm_source=Google are recorded as separate sources. GA4 offers no case-normalisation setting and stores the string exactly as it receives it. Lowercase everything and use hyphens for multi-word values — this single habit prevents most of the fragmented reporting people blame on GA4.

Why does my social traffic show as direct in Google Analytics?

Usually because the link had no UTM parameters and the referrer was lost. Most social apps open links in an embedded in-app browser, and those browsers commonly drop the referrer header. With no referrer, no UTM and no click ID, GA4's rules put the session in Direct alongside people typing your URL. Tagging the link fixes it, because the parameters travel inside the URL.

Should I add UTM codes to Google Ads links?

Usually not by hand. With auto-tagging on, Google Ads appends a gclid that carries data UTMs cannot, and GA4 prefers the gclid over manual tags by default. There is a property setting to let manual tagging override auto-tagging, but it only applies when utm_source is actually populated. For most accounts, leave auto-tagging on and save UTMs for everything that is not Google Ads.

Sources

Related pages