UTM codes are short tags added to the end of a link so your analytics tool knows exactly where a visitor came from. Without them, traffic from an email, a social post or a partner newsletter often lands in a vague bucket such as direct or referral, and you cannot tell which campaign actually worked.
This guide explains each UTM parameter, shows how to build links, and shares the naming habits that keep your Google Analytics 4 reports clean.
Key takeaways
- UTM parameters tell analytics tools the source, medium and campaign behind a click.
- Source, medium and campaign are the three you should use on every tagged link.
- Consistent lowercase naming matters more than anything else.
- Never add UTM tags to internal links on your own website.
- In GA4, review results under Traffic acquisition using session source, medium and campaign.
What is a UTM code?
UTM stands for Urchin Tracking Module, named after the analytics company Google acquired before launching Google Analytics. A UTM code is a set of query parameters added after a question mark in a URL. For example:
https://tutorialsmania.com/courses/?utm_source=newsletter&utm_medium=email&utm_campaign=november_courses
The page loads normally for the visitor. Your analytics tool reads the tags and records the visit against that source, medium and campaign.
The five UTM parameters
- utm_source: where the traffic comes from, such as google, facebook, newsletter or a partner site name.
- utm_medium: the type of channel, such as email, cpc, social, paid_social or referral.
- utm_campaign: the specific campaign or promotion, such as spring_sale or webinar_ai.
- utm_term: optional, mainly for paid search keywords.
- utm_content: optional, used to tell apart two links in the same campaign, such as a header button and a footer link.
GA4 also supports utm_id for linking campaigns to imported cost data, plus newer parameters such as utm_source_platform, but most teams only need the five above.
How to build a UTM link
- Start with the final landing page URL.
- Choose your source, medium and campaign values from an agreed naming list.
- Use Google’s Campaign URL Builder or a shared spreadsheet to generate the link.
- Test the link: open it, then check the GA4 Realtime report to see the campaign appear.
- Shorten the link if it will be shared in print or on social media.
Naming rules that keep reports clean
UTM values are case sensitive, so Email, email and EMAIL appear as three different mediums. A simple naming standard prevents this.
- Use lowercase for every value.
- Use underscores or hyphens instead of spaces, and pick one style.
- Match GA4 default channel rules for medium, for example email, cpc, social or referral, so traffic lands in the right channel group.
- Keep a shared tracking sheet listing every tagged link, its owner and its launch date.
- Keep campaign names descriptive but short, such as product_launch_ai rather than a long sentence.
Common UTM mistakes
- Tagging internal links: a UTM link inside your own site starts a new session and overwrites the original source, which corrupts your data.
- Inconsistent values: mixing facebook, Facebook and fb splits one source into three rows.
- Wrong medium: using a made-up medium can push traffic into the Unassigned channel in GA4.
- Tagging organic search: Google already identifies organic search traffic, so tags are not needed there.
- Forgetting auto-tagging: Google Ads uses auto-tagging through the gclid parameter, so manual UTMs are usually unnecessary for those ads.
How to read UTM data in GA4
Open Reports, then Acquisition, then Traffic acquisition. Change the primary dimension to Session source / medium or Session campaign to compare performance. Add conversions or key events to see which campaigns produce results, not just clicks. For deeper analysis, build an Explorations report filtered by campaign. Our guide to user behaviour in GA4 covers how to read engagement once visitors arrive.
Frequently asked questions
Do UTM codes affect SEO?
No. UTM parameters do not change rankings. Use canonical tags so search engines treat tagged URLs as the same page.
Which UTM parameters are required?
Technically only utm_source is needed, but always use source, medium and campaign together for useful reports.
Can I use UTM codes on social media posts?
Yes. Tagging links in posts, bios and stories is one of the most common uses, and it shows which platform and post drive real results.
Final thoughts
UTM codes take seconds to add and save hours of guesswork later. Agree a naming standard, tag every external campaign link and review the data regularly. To build these skills with guidance, explore our live training courses or browse more digital marketing guides.
