UTM parameters explained: tagging links that analytics can read

Updated:

UTM parameters are labels added to the end of a link so that an analytics tool can tell which campaign brought a visitor. A newsletter link such as https://example.com/offer?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale says the visit came from the newsletter, through email, for the spring sale. The page that opens is the same with or without them; only the reports change. This guide follows Google Analytics 4 (GA4), the most common reader of these tags, and notes where other tools differ.

The fields

Google says to always use utm_source, utm_medium and utm_campaign, and strongly recommends utm_id and utm_source_platform as well, because a missing field shows as (not set) in reports. The others are optional. In GA4 the values appear in the Traffic acquisition report and in dimensions tied to the start of the session.

ParameterRecordsExampleIn GA4
utm_sourcewhere the visit comes from: a site, newsletter or platformnewsletterSession source
utm_mediumthe type of channelemailSession medium
utm_campaignthe promotion, product or sloganspring_saleSession campaign
utm_idthe campaign ID, the same one used for campaign data importsabc.123Session manual campaign ID
utm_termthe paid keywordrunning+shoesSession manual term
utm_contentwhich link or creative was clicked, to tell two of them apartlogolinkSession manual ad content
utm_source_platformthe platform that sent the trafficSearch Ads 360Session manual source platform
utm_creative_formatthe creative type: display, native, video …videonot currently reported
utm_marketing_tacticthe targeting: remarketing, prospecting …remarketingnot currently reported

UTM builder

How the medium decides the channel

GA4 sorts every visit into a default channel such as Email, Organic Social or Display, using fixed rules on the source, the medium and sometimes the campaign name. These rules are not case-sensitive, and they cannot be edited. A medium that matches none of them, and a source that is not on one of Google's lists, leaves the visit in Unassigned. The rules for manually tagged links include:

utm_mediumChannel
email, e-mail, e_mail, e mail (in the medium or the source)Email
social, social-network, social-media, sm, social network, social mediaOrganic Social
cpc, ppc, retargeting, or anything containing cp or starting with paidPaid Search, Paid Social, Paid Video or Paid Shopping, depending on the source; Paid Other otherwise
display, banner, expandable, interstitialDisplay
affiliateAffiliates
referral, app, linkReferral
organicOrganic Search
sms (in the medium or the source)SMS
audioAudio
ending in push, or containing mobile or notificationMobile Push Notifications
containing videoOrganic Video

So utm_medium=newsletter with utm_source=newsletter matches nothing and lands in Unassigned, while utm_medium=email lands in Email. The same happens to print or qr: GA4 has no channel for printed material. If you need one, an Editor can create custom channel groups (two in a standard property), and Google says they can be applied to past data as well.

A naming convention

The channel rules ignore case, but the reports do not: utm_source=google and utm_source=Google are two rows, and so are Meta and meta. Google's own advice is a strict convention, with lowercase as the standard, one source per platform (facebook and instagram separately), one medium per channel and one campaign name per campaign, so a single effort is not split across several rows.

Keep the agreed values in a shared sheet and copy them from there. A misspelt medium is not an error anywhere; it just quietly creates another row, or another visit in Unassigned.

The tags go in the query string, after a ? and before any #. When the address already has a query string, they are added with & instead of a second ?. Anything after # is the fragment, which the browser handles itself, so tags written there are not part of the query at all.

Values have to be encoded. A space becomes + (or %20), & becomes %26 and # becomes %23, otherwise they end the value early. Letters outside ASCII are written as their UTF-8 bytes: “promoção de verão” becomes promo%C3%A7%C3%A3o+de+ver%C3%A3o. A builder does this for you; to read an encoded link back, a URL decoder shows the original text. Do not repeat a parameter in the same link, since it is then up to each tool which of the two values counts.

URL encoder / decoder

Where not to use them

QR codes, print and other tools

A QR code is a good place for UTM tags: a scanned code usually opens with no referring page, so without tags the visit looks like direct traffic. Tag the URL before generating the code, for example utm_source=flyer&utm_medium=qr&utm_campaign=spring_sale_2026, and remember that qr lands in Unassigned unless you set up a custom channel group. A shorter link also makes a less dense code that scans more easily.

Other analytics tools read the same tags. Matomo detects them without extra setup: utm_campaign, utm_source and utm_medium feed its campaign name, and utm_term the campaign keyword; its Marketing Campaigns Reporting plugin adds utm_content and utm_id.

QR & Wi-Fi QR generator

Frequently asked questions

Which UTM fields are required?

None is technically required, but Google says to always use utm_source, utm_medium and utm_campaign. Its own URL builder marks source and medium as required, and asks for either a campaign name or a campaign ID.

Why do my campaign visits show as Unassigned?

Usually because the medium is not one GA4 recognises, for example newsletter or qr. Use a standard medium such as email, social or cpc, or create a custom channel group.

Are UTM values case-sensitive?

In GA4 reports, yes: email and Email are two rows. The channel rules are not, so both still count as Email.

Can I add UTM tags to Google Ads links?

You can, but with auto-tagging on, GA4 uses the gclid data and the manual tags do not override it.

Do UTM parameters change the page?

No. They are only read by analytics. The server receives them like any other parameter, but the page shown is the same.

References

  1. Google Analytics Help — [GA4] URL builders: Collect campaign data with custom URLs
  2. Google Analytics Help — [GA4] Default channel group
  3. Google Analytics Help — Custom channel groups
  4. Google Analytics Help — Traffic-source dimensions (session manual dimensions)
  5. Google Analytics Help — Best practices to avoid sending personally identifiable information (PII)
  6. Google Ads Help — About auto-tagging
  7. Google Analytics Demos & Tools — Campaign URL Builder
  8. Matomo FAQ — Does Matomo support Google Analytics campaign parameters?
  9. RFC 3986 — Uniform Resource Identifier (URI): Generic Syntax (query and fragment)
  10. WHATWG URL Standard — application/x-www-form-urlencoded

Related guides