What are UTM codes?
What UTM codes are, what each UTM parameter means, how to build and name them, where not to use them and how to read the results in Google Analytics 4.
UTM codes, also called UTM parameters, are short pieces of text added to the end of a URL so that your analytics tool can tell which channel, campaign and link brought each visitor. UTM stands for Urchin Tracking Module, named after Urchin, the analytics software Google bought in 2005 and turned into Google Analytics. They cost nothing and are one of the simplest ways to find out which of your marketing actually works.
This guide explains what UTM codes are, what each parameter means, how to build and name them consistently, where not to use them and how to read the results in Google Analytics 4 (GA4).
What are UTM codes?
Here is a link with UTM codes added:
https://www.example.com/offer/?utm_source=newsletter&utm_medium=email&utm_campaign=autumn_sale&utm_content=top_button
The page that loads is the same as without the codes. The difference is what your analytics records: this visit came from the newsletter, through email, as part of the autumn sale campaign, via the button at the top. Without those codes, the same visit might be filed as “direct” or “referral” and you would not know which email, ad or post deserves the credit.
The UTM parameters explained
Google’s documentation lists these parameters for GA4:
| Parameter | What it identifies | Example |
|---|---|---|
utm_source | Where the traffic comes from | newsletter, instagram, google |
utm_medium | The type of channel | email, cpc, social, qr |
utm_campaign | The campaign, promotion or product | autumn_sale |
utm_id | A campaign ID, ideally matching the ID in your ad platform | c-1042 |
utm_term | The paid keyword | running_shoes |
utm_content | Which link or creative was clicked, to tell similar links apart | top_button, video_ad_a |
utm_source_platform | The platform that sent the traffic | meta_ads |
Google says you should always use utm_source, utm_medium and utm_campaign when you add parameters, and strongly recommends setting utm_id and utm_source_platform too. If a parameter is missing, it appears as “(not set)” in reporting. Values are case sensitive, so Google and google are counted as different sources, and lowercase is the recommended standard.
Why UTM codes matter
Analytics tools can identify some sources on their own, such as a click from a search results page or from another website. Many others are invisible or ambiguous: email apps, messaging apps, PDFs, QR codes on printed material, link-in-bio pages and some in-app browsers often arrive as direct traffic. UTM codes label the traffic yourself, so you can:
- Compare channels fairly, for example email against paid social.
- See which creative, subject line or placement brings the visits that convert.
- Judge campaigns by outcomes such as leads and sales, not only by clicks.
- Decide where to spend the next euro with evidence.
They pair well with experiments: tagging each variant of an ad or email lets you see which version performs, and our guide to A/B testing explains how to run those comparisons properly.
How to create UTM codes
With a builder. Google provides a Campaign URL Builder: enter your page address and the values, and it returns the full tagged link.
By hand or in a spreadsheet. Take your page URL, add a question mark, then add each parameter as name=value and separate them with &. A spreadsheet with one column per parameter and a formula that joins them keeps everything consistent and gives your team a shared record of every link ever created.
Steps to follow every time:
- Decide the campaign name and how it will be written.
- Choose the source (where the link will be published) and medium (the type of channel) from your agreed list.
- Add content if you have several links or creatives in the same place.
- Build the URL, test it by clicking it, and check that it appears correctly in GA4’s real-time report.
- Save the link in your tracking sheet.
Naming conventions that keep data clean
Most UTM problems come from inconsistent naming. Agree on rules and write them down:
- Lowercase only, because values are case sensitive.
- Underscores or hyphens instead of spaces.
- One spelling per source:
instagram, neverInstagram,instaandigin different weeks. - Use mediums that GA4 recognizes. GA4’s default channel groups classify traffic by medium: for example, a medium of
emailis grouped as Email, andcpcorpaidvalues from social sources count as Paid Social. Mediums likenewsletter-blastwill land in “Unassigned” or another channel you did not expect. - Descriptive campaign names, such as
autumn_sale_2026, notpromo1. - Never put personal data in UTM values. Do not include email addresses, names or user IDs in a URL parameter. It breaches Google Analytics terms, and it puts personal data in places such as browser histories and server logs.
Example set-ups
Imagine a retailer planning an autumn sale. These tagged values are hypothetical:
| Placement | source | medium | campaign | content |
|---|---|---|---|---|
| Newsletter, main button | newsletter | email | autumn_sale | main_button |
| Instagram paid ad, video A | instagram | paid_social | autumn_sale | video_a |
| Link in Instagram bio | instagram | social | autumn_sale | bio_link |
| QR code on in-store flyer | flyer | qr | autumn_sale | store_window |
| Partner mention | partner_blog | referral | autumn_sale | article_link |
After the campaign you can compare channels and creatives, and then link results to revenue in your analytics.
Where not to use UTM codes
- On links inside your own website. If a visitor clicks an internal link with UTM values, GA4 may attribute the visit to that tag and overwrite the original source. Use event tracking for internal clicks instead.
- On Google Ads links, if auto-tagging is on. Google Ads uses a
gclidparameter, and in GA4 auto-tagging takes priority over manual tagging, according to Google’s auto-tagging help page. Keep auto-tagging enabled and leave Google Ads links untouched unless you have a specific reason. - On organic search results. You do not control how search engines display your pages.
- On links shared by others. You cannot tag a link someone else posts.
How to read UTM data in GA4
In GA4, open the reports for traffic acquisition and look at session source, medium and campaign. You can add secondary dimensions or build an exploration to split by utm_content. From there, check key events (leads, purchases) by campaign and compare engagement, not only visits.
What you see also depends on your tag and consent setup. If visitors decline analytics storage and you use no modeling, some visits will not appear, so connect UTM reporting with a proper consent configuration; see Consent Mode v2. Our analytics and CRO service can help set that up.
Common mistakes with UTM codes
- Using different spellings for the same source.
- Forgetting to tag emails, so email shows as direct traffic.
- Tagging internal links.
- Writing vague campaign names no one understands three months later.
- Keeping no record of the links created.
- Creating very long tagged URLs and pasting them where space is limited, instead of using a QR code or a short link you control.
- Mixing up
utm_campaignandutm_content: the first is the initiative, the second is the specific link or creative.
Where UTM codes fit in your marketing
UTM codes belong in every email you send, so they work well with email marketing automation, and in every paid and social link. A paid media plan without consistent tagging makes it hard to learn which channel pays off; see our digital advertising service. Measurement underpins every other decision, which is why it features in our overview of the latest digital marketing trends.
Frequently asked questions
What does UTM stand for?
Urchin Tracking Module. Urchin was an analytics product that Google acquired in 2005, and its technology became the basis of Google Analytics.
Do UTM codes affect SEO?
Tagged URLs show the same page as the clean URL, so they should not create new content. To avoid duplicates in search, make sure the page declares its clean URL with a canonical tag, and do not tag links on your own site.
Do I need UTM codes for every link?
Use them on links you publish outside your site, such as emails, ads, social posts, partner pages and QR codes. Skip them on internal links and on Google Ads if auto-tagging is enabled.
Are UTM codes free?
Yes. They are only text added to a link, and Google offers a free builder. The cost is the time it takes to keep naming consistent.
Can I use UTM codes with GA4?
Yes. GA4 reads UTM parameters and shows them as session source, medium and campaign, along with the other parameters in the table above.
If you want to set up tracking so that every campaign can be measured, our email marketing and analytics teams can help, and you can contact us for a free first diagnosis.


