UTM Campaign URLs, Explained

After reading this you can tag a link so your analytics tool attributes the visit to the right source, medium and campaign, without breaking the URL or splitting one channel into three.

What a UTM-tagged URL is

A UTM-tagged URL is an ordinary link with extra query parameters bolted on. The parameters carry campaign metadata that analytics tools read and file under named channels. The prefix utm_ stands for Urchin Tracking Module, the analytics product Google bought in 2005. The convention outlived the product.

Here is the hook. You email a newsletter with a plain link to https://shop.example.com/spring. In your reports that visit lands in a vague bucket like "direct" or "referral", mixed in with everyone else. Tag the same link and it becomes:

https://shop.example.com/spring?utm_source=newsletter&utm_medium=email&utm_campaign=spring-sale-2026

Now the click reports as source newsletter, medium email, campaign spring-sale-2026. Nothing about the destination page changed. You added labels the analytics tool understands.

The five parameters and what each one means

There are five recognized parameters. Three are effectively required if you want clean reports, two are optional.

utm_source
Where the link lives. Examples: google, newsletter, facebook. This answers "which property sent the visitor".
utm_medium
The channel type. Examples: cpc, email, social, affiliate. This answers "what kind of marketing was it".
utm_campaign
The specific push. Examples: spring-sale-2026, launch-q3. This groups every link that belongs to one effort.
utm_term
Optional. Originally the paid keyword, so running-shoes for a search ad on that term.
utm_content
Optional. Distinguishes two links that are otherwise identical, for example header-button versus footer-link in the same email. Use it for A/B tests.

The three that matter most are source, medium and campaign. In Google Analytics 4, if you supply a source and a medium but leave campaign blank, the campaign field simply shows (not set). Leave both source and medium blank and the visit falls back to whatever the tool infers from the referrer.

When to tag and when to leave a link alone

Tag any link where you control the destination and want to measure the traffic it drives: email campaigns, paid ads, social posts, QR codes on print, banner placements, partner links.

Do not tag internal links between pages of your own site. This is the single most damaging mistake. When a visitor clicks an internal UTM link, most analytics tools start a new session and reassign the source. A person who arrived from cpc and then clicked an internal button tagged utm_source=homepage is now recorded as coming from your own homepage, and your paid campaign loses the conversion credit. Internal navigation needs no UTM tags.

Never put UTM parameters on internal links. You will overwrite the original acquisition source and inflate self-referrals. If you need to measure internal clicks, use event tracking, not campaign URLs.

How the URL is assembled

A tagged URL follows the standard query-string grammar. The structure is:

\text{base} + \texttt{?} + k_1 \texttt{=} v_1 + \texttt{\&} + k_2 \texttt{=} v_2 + \dots

Here base is the destination page, the ? starts the query string, each k=v pair is one parameter, and & joins pairs. If the base already contains a ?, the builder must join with & instead of adding a second ?. A URL with two question marks is malformed and most servers ignore everything after the second one.

Values must be percent-encoded. A space becomes %20, an ampersand inside a value becomes %26, and a plus sign becomes %2B. Consider a campaign named summer sale & more. Left raw, the stray & would be read as a parameter separator and truncate your campaign name to summer sale . Encoded correctly it reads:

utm_campaign=summer%20sale%20%26%20more

This is why hand-typing tags is risky and a builder is worth the two seconds it saves.

A worked example using the demo data

Building the spring sale link

Load the tool defaults and follow the assembly step by step. The demo starts from a base URL of https://shop.example.com/spring with source newsletter, medium email, campaign spring-sale-2026.

  1. Start with the base: https://shop.example.com/spring.
  2. The base has no existing query string, so append ?.
  3. Add the first pair: utm_source=newsletter.
  4. Join and add the second: &utm_medium=email.
  5. Join and add the third: &utm_campaign=spring-sale-2026.

The result is:

https://shop.example.com/spring?utm_source=newsletter&utm_medium=email&utm_campaign=spring-sale-2026

Every character here is URL-safe, so no encoding was needed. Count the parameters: 3 pairs, 2 & separators, 1 ?. That ratio (n pairs need n minus 1 ampersands) is a quick sanity check. If you see 3 pairs and 3 ampersands, one is stray.

Reading the numbers in your reports

Once the links run, your analytics tool groups sessions by the values you set. Suppose over one week the spring campaign drove these sessions by medium:

Four mediums under one campaign. Email led with 4,200 sessions, affiliate trailed at 650.

The total is 4200 + 3100 + 1800 + 650 = 9750 sessions. Email's share is 4200 / 9750 = 0.4308, or 43.08 percent. That single number tells you where the campaign's reach actually came from. If your budget went 60 percent to cpc but cpc delivered only 3100 / 9750 = 0.3179 (31.79 percent) of sessions, the spend and the return are out of line.

Compare shares, not raw counts, when campaigns run for different lengths of time. A campaign that ran 3 days will always look small next to one that ran 30 days. Normalize to sessions per day before you judge performance.

The case-sensitivity trap, shown with numbers

Analytics tools treat UTM values as case-sensitive strings. Email, email and EMAIL are three separate mediums. This is the quietest way to corrupt a report. The widget below shows how one inconsistency fragments a single channel.

Imagine 9,750 email sessions that should sit in one row. If 70 percent of your links use email, 20 percent use Email and 10 percent use EMAIL, the report splits them into rows of 6,825, 1,950 and 975. The largest row now shows only 6,825, understating your true email traffic by 30 percent.

The fix is a rule, not vigilance: lowercase everything, always. Pick email once and never type Email again. The same discipline applies to hyphen versus underscore. spring-sale-2026 and spring_sale_2026 are two campaigns to the tool, not one.

Common mistakes to avoid

  • Mixing case. Covered above. Lowercase is the only safe default.
  • Redundant source and medium. Setting utm_source=facebook with utm_medium=facebook tells you nothing. Medium should be a type like social, not a repeat of the source.
  • Spaces left raw. A space in a value breaks some link parsers. Use hyphens in names and let the builder encode any real spaces to %20.
  • Tagging internal links. The self-referral problem again. Only tag links that cross from another property into your site.
  • Inconsistent campaign names across a team. One person writes q3launch, another writes q3-launch. Agree on a naming pattern and write it down.

Related tools on this site

No related tools are listed for this guide. Build and copy your tagged URL directly in the UTM Campaign URL Builder, then verify the encoding by pasting the result back into the base field to confirm the query string parses cleanly.

Frequently asked questions

Do UTM parameters hurt my SEO?

They do not lower your rankings, but they create duplicate URLs. The page /spring and /spring?utm_source=newsletter are the same content at two addresses. Set a canonical tag pointing to the clean URL so search engines index one version. UTM tags are for measuring visits, not for pages you want crawled and ranked.

Which parameters are actually required?

Google Analytics 4 will record a campaign session if you provide at least utm_source and utm_medium. Campaign, term and content are optional but recommended. Without source and medium the visit falls back to referrer-based attribution.

Can I put UTM tags on a QR code?

Yes. A QR code just encodes a URL, so encode the fully tagged link. This is the standard way to attribute print, packaging or event scans to a campaign. Keep the URL short, because longer URLs produce denser QR codes that are harder to scan.

Does the order of parameters matter?

No. ?utm_source=x&utm_medium=y and ?utm_medium=y&utm_source=x are read identically. Order changes nothing in the report. Consistent ordering only helps humans skim the URL.

What happens if I use a custom parameter that is not a utm_ one?

Analytics tools ignore parameters they do not recognize, so a stray ?ref=twitter will not populate the campaign report. Some tools let you map custom parameters, but by default only the five utm_ keys feed the standard acquisition reports.