UTM parameters: naming conventions that keep reports clean

Updated 5 min read

A UTM tag is a string you type by hand, and analytics reads it literally. Most of the damage comes from small differences in spelling that nobody notices until the report is already split.

The same campaign appears in three rows

Open the campaign report after a few months and you find Spring_Sale, spring_sale and spring-sale as separate lines. Each row holds a fraction of the sessions and conversions, and none of them is the real total.

The cause is that UTM values are case-sensitive in Google Analytics reporting, and punctuation counts as part of the value. Email and email are two media, not one. Different people tag different sends, each with a slightly different habit, and the report faithfully records all of them.

The fix is a short written convention that every link builder follows:

  • All lowercase, for every value.
  • One separator, either underscore or hyphen, never a mix. Underscore is the safer pick because it survives being read aloud and pasted into spreadsheets.
  • No spaces. A space is encoded as %20 (or + in some readers), and then shows up in a report as a space that is hard to see.
  • A fixed, short list of allowed utm_medium values that lives in one shared document.

The UTM link builder offers a fixed medium list for the same reason, and it warns when the landing URL already carries a parameter of the same name in a different case.

The five parameters and what each one is for

ParameterAnswersExample
utm_sourceWho sent the visitornewsletter, google, partner-site
utm_mediumWhat kind of traffic it isemail, cpc, social
utm_campaignWhich initiativespring_sale
utm_termWhich paid keywordrunning shoes
utm_contentWhich variant of the same ad or linkbanner_top, text_link

Source, medium and campaign are the ones to treat as required. Term only makes sense for paid search, and content only matters when you run two links to the same page inside one campaign. Filling every field on every link adds typing and more chances to be inconsistent, with nothing to analyse at the end.

Medium deserves the strictest control. Analytics tools use it to sort sessions into channels, so a value like newsletter instead of email can land the traffic in a channel you did not intend, such as Unassigned or Referral. Check how your reporting tool maps medium values before settling on a list.

A visitor arrives from a search result, reads a page, clicks a banner on your own site that points to /pricing/?utm_source=homepage&utm_medium=banner, and the session is now attributed to homepage / banner. The original source is gone from that session. You see inflated “banner” conversions and a drop in organic search that never actually happened.

UTM parameters describe how a visitor reached the site, so they belong on links that bring people in from outside: ads, emails, social posts, partner pages, QR codes. For clicks inside your own site, track the click as an event and leave the URL alone. If an old internal link already has UTMs, removing them is the repair, and the builder’s reverse section strips every utm_* parameter from a pasted URL while leaving other parameters untouched.

Order matters: the # fragment goes last

This link looks fine and tracks nothing:

https://example.com/pricing/#plans?utm_source=newsletter&utm_medium=email

Everything after # is the fragment. The browser keeps it for itself and does not send it to the server, and analytics scripts read the query string, which here is empty. The correct shape is path?query#fragment:

https://example.com/pricing/?utm_source=newsletter&utm_medium=email#plans

A related slip is a second ? in the URL, for example pasting a link that already has a query string and appending ?utm_source=... rather than &utm_source=.... Building the URL with a parser instead of by string concatenation avoids both mistakes, which is how the builder assembles links.

Encoding: spaces, ampersands and Chinese values

A URL may contain only ASCII characters, so everything else is percent-encoded. A space becomes %20, a Chinese character such as 春 becomes %E6%98%A5, and a literal & inside a value has to become %26. An unencoded & ends the value early and starts a new parameter: a campaign named q&a turns into the campaign q and a stray parameter a.

Analytics decodes these values again, so a report can display Chinese campaign names correctly. Even so, Latin lowercase values are easier to filter, to match in spreadsheets and to type into a query. If you need a readable Chinese label, keep the tag in ASCII and map it to the label in a lookup table.

The builder’s breakdown table puts the raw value beside the encoded one, so you can see exactly what ended up after the ?.

If a tagged link works in a browser but the report shows direct / none, check what sits between the click and the page:

  • Link shorteners. Many redirect services drop or fail to forward the query string. Tag the final landing page, then shorten that link if you need to, and test that the shortened link still arrives with its parameters.
  • Redirects on your own site. An HTTP-to-HTTPS or trailing-slash redirect that does not preserve the query string erases the tags before the page loads. Test by clicking the real link and looking at the address bar.
  • Hand-edited links. Someone shortens the URL in a post or removes “the ugly part”. Keep a master sheet of tagged links so nobody has to rebuild one from memory.

Keep the tagged URLs in a sheet

A naming convention only works if it is followed and findable. A shared spreadsheet with one row per link solves most of it. Useful columns are the full URL, the five parameter values, the placement (“June newsletter, hero button”), the owner and the date. When someone asks which link drove last month’s signups, the sheet answers without guesswork. The builder remembers your last campaign and source on the device you used, which saves retyping, but that is a convenience for one browser and not a record.

Pre-launch checklist

  1. Every value is lowercase, with one separator and no spaces.
  2. Medium comes from the agreed list.
  3. The tagged link is on external traffic only.
  4. # comes after the last parameter, and there is exactly one ?.
  5. The landing page is the final URL after redirects.
  6. Click the link yourself and confirm the session appears in real-time reporting with the intended source and medium.

Open the tool: UTM Link Builder & Campaign URL Generator

Back to guides

More guides