Sub topic 2
The UTM parameters and what each one means
This chapter assumes you can read a URL query string, you have a GA4 property with a web data stream installed, and you can open GA4 reports. Here you will learn what each UTM parameter does, which GA4 dimension it fills, and which parameters you must always set. Building URLs, naming rules, and channel grouping each get their own chapter.
What a UTM parameter is
UTM stands for Urchin Tracking Module. Urchin was the analytics product that Google bought and turned into Google Analytics. A UTM parameter is a key-value pair in the query string of a link. It tells the analytics tool where a visitor came from and why.
When someone lands on your site through a tagged link, the browser requests the full URL. The GA4 tag on the page reads the URL, including the utm_ pairs, and sends it to Google as the page location of a page_view event. GA4 then uses those values to describe the session's traffic source. The visitor does not see or type any of this. Your site does not need extra code to read the parameters.
Here is a complete tagged URL:
https://example.com/spring-sale?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale_2026&utm_content=hero_buttonThe part before ? is the landing page. Each pair after it begins with utm_ and is separated from the next by &.
The core three
GA4 expects three parameters on any manually tagged campaign link. Together they answer who sent the visitor, by what kind of channel, and as part of which effort.
utm_source
utm_source names the specific place the link was shown. Typical values are newsletter, google, linkedin, partner_acme, or podcast_devtalk. It answers "which one?".
In GA4 it becomes the Session source dimension (and First user source, which records the source of a user's first visit).
utm_medium
utm_medium names the type of channel. Typical values are email, cpc, social, affiliate, referral, or display. It answers "what kind?".
In GA4 it becomes Session medium. This is the parameter with the most side effects. GA4's default channel grouping applies rules to the source and medium together, and the medium carries most of the weight. A medium of email puts the session in the Email channel. A medium of cpc or ppc is treated as paid. A made-up medium such as blast has no rule and usually ends up in Unassigned. The channel grouping chapter covers the rules. For now, treat the medium as a controlled vocabulary, not free text.
utm_campaign
utm_campaign names the marketing effort that the link belongs to. Typical values are spring_sale_2026, product_launch_q3, or webinar_series_may. It answers "which initiative?".
In GA4 it becomes Session campaign. Source and medium describe the channel. The campaign ties together all the links, across channels, that serve one initiative. The same campaign name can show up under newsletter / email, linkedin / social, and google / cpc, so you can compare channels inside one campaign.
The optional two
Two more parameters add detail inside a campaign. Use them when you have a real question they can answer.
utm_term
utm_term records the keyword or audience term that triggered the ad. It was designed for paid search, for example running_shoes. GA4 shows it as Session manual term. If you use Google Ads with auto-tagging, Google supplies keyword data itself, so you mostly set utm_term on non-Google paid search or on audience-targeted ads.
utm_content
utm_content tells apart links that share the same source, medium, and campaign. Use it for:
- two buttons in the same email (
hero_buttonandfooter_link) - two creatives in the same ad set (
banner_blueandbanner_red) - a text link versus an image link
GA4 shows it as Session manual ad content. It is the parameter for A/B comparisons inside a single placement.
How the parameters map to GA4
The table summarizes the mapping from query string key to GA4 dimension.
| URL parameter | Role | Required for manual tagging | GA4 session-scoped dimension |
|---|---|---|---|
| `utm_source` | Where the link was placed | Yes | Session source |
| `utm_medium` | Type of channel | Yes | Session medium |
| `utm_campaign` | Marketing initiative | Yes | Session campaign |
| `utm_term` | Keyword or audience term | No | Session manual term |
| `utm_content` | Variant within a placement | No | Session manual ad content |
| `utm_id` | Campaign identifier | No | Session campaign ID |
GA4 also builds combined dimensions from these. Session source / medium joins the first two with a slash, such as newsletter / email. Session campaign is a separate dimension that you can add to any report or Exploration.
utm_id and the other additional parameters are covered in a later chapter. They are in the table so you know they exist and that they map to their own dimensions.
Reading the example URL
Take the URL from earlier and decode it pair by pair.
| Pair | Meaning |
|---|---|
| `utm_source=newsletter` | The link sat in your newsletter |
| `utm_medium=email` | The channel type is email |
| `utm_campaign=spring_sale_2026` | It belongs to the spring sale |
| `utm_content=hero_button` | It was the large button, not another link in the same email |
A visitor who clicks it starts a session. In the Traffic acquisition report, the row for the session shows newsletter / email as source and medium. Add the campaign dimension to see spring_sale_2026. Add the manual ad content dimension to split by hero_button.
Rules that apply to every parameter
Names are lowercase and exact
GA4 looks for the keys utm_source, utm_medium, utm_campaign, and the rest. A misspelled key such as utm_souce or utm-source is not recognized. The value is ignored, and the visit is attributed by other signals, such as the referrer or direct. Write the keys in lowercase.
Values are stored as you send them
GA4 does not clean up your values. Newsletter, newsletter, and NEWSLETTER can appear as separate rows in reports, and so can Spring_Sale and spring_sale. This is why a naming convention matters. It gets its own chapter.
Encode special characters
A space, &, #, or + in a value changes how the URL is parsed. An unencoded & ends the value early and starts a new parameter. A space is sent as %20 or +, which looks messy in reports. The safest approach is to avoid spaces and punctuation and use letters, digits, hyphens, and underscores.
Put the query string before the fragment
A URL can have a fragment, which is the part after #. Browsers do not send the fragment to servers, and GA4 does not read UTM parameters that sit in it. This URL loses its tagging:
https://example.com/pricing#plans?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale_2026Move the fragment to the end:
https://example.com/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale_2026#plansUse UTM values only on inbound links
Tag links that bring people to your site from somewhere else. Do not tag links between your own pages. If an internal link carries UTM parameters, a click on it can start a new session and replace the original source with your internal value. That destroys the attribution you want to measure. The pitfalls chapter returns to this.
Checking parameters in the browser
You can confirm that a landing page still has its parameters, for example after redirects. Open the browser console on the landing page and run this:
const params = new URLSearchParams(window.location.search);
const utm = Object.fromEntries(
[...params].filter(([key]) => key.startsWith('utm_'))
);
console.log(utm);
// { utm_source: 'newsletter', utm_medium: 'email', utm_campaign: 'spring_sale_2026', ... }URLSearchParams decodes the query string into pairs. The filter keeps only keys that start with utm_. If the printed object is empty, a redirect or a link shortener removed the parameters before the page loaded. GA4 cannot recover them, so fix the redirect first and check GA4 afterward.
What happens when parameters are missing
The three core parameters work as a set. These cases are common:
| What you tag | What GA4 usually reports |
|---|---|
| All three core parameters | Source, medium, and campaign show your values |
| Source and medium, no campaign | Source and medium show your values. Campaign shows `(not set)`. |
| Campaign only | Source and medium are not taken from your tag, and the campaign may be reported oddly. Treat the link as incorrectly tagged. |
| Source only | Treat as incomplete. The medium is missing, so channel assignment is unreliable. |
| No `utm_` parameters | GA4 falls back to the referrer, auto-tagging data, or direct |
(not set) is GA4's placeholder for "no value was provided for this dimension". It is a normal report value, not an error message. Seeing it in the campaign column for a link that you meant to tag is the signal to inspect the URL.
Choosing which parameters to set
A simple decision process works for most links:
- Always set
utm_source,utm_medium, andutm_campaign. - Add
utm_contentif the same placement holds more than one link, or you are testing creatives. - Add
utm_termif the traffic comes from paid search and you cannot rely on auto-tagging for keyword data. - Do not add parameters you will never report on. Each extra field is another place for inconsistent values.
A common mistake is to put everything in utm_campaign, such as spring_sale_email_hero_button. This blocks you from grouping by campaign alone, because every variant becomes its own campaign row. Keep each piece of information in the parameter designed for it.
Summary of the parameter roles
| Question you want to answer | Parameter to use |
|---|---|
| Which site, list, or publisher sent the click? | `utm_source` |
| What type of channel was it? | `utm_medium` |
| Which initiative was it part of? | `utm_campaign` |
| Which keyword or audience term? | `utm_term` |
| Which link or creative within the placement? | `utm_content` |
Exercise
A colleague sends this link in a LinkedIn post: https://example.com/guide?utmsource=LinkedIn&utmmedium=paid social&utmcampaign=Guide Launch&utmcontent=post_1. Name two problems with the parameter values for reporting, and say which GA4 dimension each of the four parameters fills.
Show answer
Problems: the values mix capitals and contain spaces, so LinkedIn can appear as a separate row from linkedin, and paid social and Guide Launch contain spaces that need encoding and look messy in reports. Also, paid social is not a standard medium, so it may not match a channel rule. Prefer linkedin, paid_social (or whatever medium your convention defines), and guide_launch. Dimensions: utm_source fills Session source, utm_medium fills Session medium, utm_campaign fills Session campaign, and utm_content fills Session manual ad content.
Exercise
You tag a link as https://example.com/pricing#plans?utmsource=partner&utmmedium=referral&utmcampaign=partnerq3. In GA4 the visit shows up as direct traffic. What is wrong, and how do you fix it?
Show answer
The query string sits after the # fragment. Browsers do not send the fragment to the server, and GA4 does not read UTM parameters from it, so the tagging is lost. Move the fragment to the end: https://example.com/pricing?utmsource=partner&utmmedium=referral&utmcampaign=partnerq3#plans
Exercise
A report shows a row with campaign (not set) for traffic from newsletter / email. List two things you would check.
Show answer
First, check whether the link in the email included utm_campaign at all, since a missing parameter gives (not set). Second, check whether a redirect or link shortener stripped the parameter, for example by opening the link and running the console snippet that prints the utm_ parameters on the landing page. Another possible cause is a misspelled key, such as utm_campain.