UTM parameters explained: tagging links that analytics can read
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.
| Parameter | Records | Example | In GA4 |
|---|---|---|---|
utm_source | where the visit comes from: a site, newsletter or platform | newsletter | Session source |
utm_medium | the type of channel | Session medium | |
utm_campaign | the promotion, product or slogan | spring_sale | Session campaign |
utm_id | the campaign ID, the same one used for campaign data imports | abc.123 | Session manual campaign ID |
utm_term | the paid keyword | running+shoes | Session manual term |
utm_content | which link or creative was clicked, to tell two of them apart | logolink | Session manual ad content |
utm_source_platform | the platform that sent the traffic | Search Ads 360 | Session manual source platform |
utm_creative_format | the creative type: display, native, video … | video | not currently reported |
utm_marketing_tactic | the targeting: remarketing, prospecting … | remarketing | not currently reported |
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_medium | Channel |
|---|---|
| email, e-mail, e_mail, e mail (in the medium or the source) | |
| social, social-network, social-media, sm, social network, social media | Organic Social |
| cpc, ppc, retargeting, or anything containing cp or starting with paid | Paid Search, Paid Social, Paid Video or Paid Shopping, depending on the source; Paid Other otherwise |
| display, banner, expandable, interstitial | Display |
| affiliate | Affiliates |
| referral, app, link | Referral |
| organic | Organic Search |
| sms (in the medium or the source) | SMS |
| audio | Audio |
| ending in push, or containing mobile or notification | Mobile Push Notifications |
| containing video | Organic 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.
utm_medium=emailNot Email, E-mail or newsletter: one agreed value per channel.utm_campaign=spring_sale_2026Lowercase, words joined with _ or -, and the same spelling in every link.utm_content=header_buttonNames the link inside the message, so two links in one email can be compared.
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.
Building the link correctly
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.
https://example.com/?utm_source=x#pricingRight: the query comes before the fragment.https://example.com/#pricing?utm_source=xWrong: the whole of ?utm_source=x is part of the fragment.https://example.com/shop?ref=7&utm_source=xAdded with & to the existing query string.
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.
Where not to use them
- On links between pages of your own site. The tags make the click look like a new campaign, and the original source of the visit can be overwritten in reports.
- On Google Ads links with auto-tagging. Auto-tagging adds a gclid parameter, and Google says that in GA4 auto-tagging takes priority over manual tagging, with no option to change it.
- With personal data. Google Analytics policy forbids sending personally identifiable information, and says that both the URL path and the parameters must be free of it: never put an email address or a name in utm_content or anywhere else in the link.
- Through a redirect you have not tested. Open the tagged link and check that the address that finally loads still carries the tags; a redirect or link shortener that drops the query string drops them too.
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.
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
- Google Analytics Help — [GA4] URL builders: Collect campaign data with custom URLs
- Google Analytics Help — [GA4] Default channel group
- Google Analytics Help — Custom channel groups
- Google Analytics Help — Traffic-source dimensions (session manual dimensions)
- Google Analytics Help — Best practices to avoid sending personally identifiable information (PII)
- Google Ads Help — About auto-tagging
- Google Analytics Demos & Tools — Campaign URL Builder
- Matomo FAQ — Does Matomo support Google Analytics campaign parameters?
- RFC 3986 — Uniform Resource Identifier (URI): Generic Syntax (query and fragment)
- WHATWG URL Standard — application/x-www-form-urlencoded
Related guides
- IP addresses explained: IPv4, IPv6 and the reserved ranges
- Subnets and CIDR explained: prefixes, masks and usable hosts
- DNS records explained: A, AAAA, CNAME, MX, TXT and NS
- Is a website down, or is it just you? How to check, step by step
- HTTP status codes and Cloudflare errors: what 403, 404, 429, 500, 503 and 521 mean
- Unix timestamps and time zones explained
- Counting dates: days between dates, leap years and ISO weeks
- Time zones and daylight saving time: meetings across cities
- Image formats explained: JPEG, PNG, WebP, AVIF and HEIC
- Image size explained: pixels, DPI, file size and quality
- Phone photos explained: HEIC, EXIF metadata and your privacy
- Password strength explained: length, entropy and passphrases
- Hash functions explained: SHA-256, checksums and password hashing
- JSON Web Tokens explained: claims, signatures and safe validation
- API keys explained: length, format, storage and rotation
- UUIDs explained: v4, v7 and choosing the right version
- QR codes explained: capacity, error correction and print size
- Percentages and VAT explained: adding, removing and stacking
- Common JSON errors and how to fix them
- CSV files explained: delimiters, quotes, encoding and Excel
- Text encodings explained: UTF-8, Base64 and URL encoding
- Regular expressions explained: classes, quantifiers and groups
- MB or MiB, Mbps or MB/s: file sizes and speeds explained
- Cron expressions explained: fields, steps and time zones
- Break-even, margin and ROAS explained: the numbers behind a small business
- Freelance rates explained: hourly rate, day rate and billable hours
- Editing PDFs in the browser: what merging, splitting and converting keep