UTM tagging guide: a naming scheme that keeps attribution reports clean
How to use utm_source, utm_medium and utm_campaign consistently, with a naming scheme, examples for common channels and mistakes to avoid.
Use utm_source for the site or platform, utm_medium for the channel type (cpc, email, social) and utm_campaign for the campaign, always in lower case and from one shared naming list. Consistency matters more than the exact names: one spelling per source keeps reports from splitting.
UTM parameters are small tags added to the links you share, such as ?utm_source=newsletter&utm_medium=email&utm_campaign=spring-sale. Analytics and attribution tools read them to tell where a visit came from. They cost nothing and they are the single biggest factor in whether your channel reports make sense. This guide sets out a simple, consistent scheme and shows how it maps to channels in Sourcetrail.
The five parameters
| Parameter | Answers | Example |
|---|---|---|
| utm_source | Who sent the visit? | google, facebook, newsletter, partner-acme |
| utm_medium | What kind of channel? | cpc, paid-social, email, referral, social |
| utm_campaign | Which campaign? | spring-sale-2026, product-launch |
| utm_content | Which ad or link? | hero-button, video-a |
| utm_term | Which keyword? | crm-for-freelancers |
Source, medium and campaign are the ones to use every time. Content and term are optional detail.
Rules that prevent messy reports
- Lowercase everything.
Emailandemailare different values to most tools. - Use hyphens, not spaces. Spaces become
%20and are easy to mistype. - Pick one word per idea. Choose
cpcorppcand stick with it, or make your channel rules accept both. - Don't tag internal links. A UTM on a link from your own homepage overwrites the real source of the visit.
- Write the scheme down in a shared document and copy links from it.
A scheme for common channels
- Search ads:
utm_source=google(or the engine),utm_medium=cpc,utm_campaign=<campaign name>,utm_term=<keyword>. - Social ads:
utm_source=facebook,utm_medium=paid-social,utm_campaign=<campaign>,utm_content=<ad name>. - Organic social posts:
utm_source=linkedin,utm_medium=social. - Newsletter:
utm_source=newsletter,utm_medium=email,utm_campaign=<issue or date>. - Partners and affiliates:
utm_source=<partner name>,utm_medium=referraloraffiliate. - Offline (QR codes on print):
utm_source=flyer,utm_medium=offline,utm_campaign=<event>.
Many ad platforms can add tags automatically or through URL templates; check that their values follow your scheme.
How tags become channels in Sourcetrail
Sourcetrail sorts each visit into a channel with an ordered list of rules, for example "utm_medium is one of cpc, ppc → Paid search" and "utm_medium is email → Email". Visits without tags are classified from the referrer: search engines as Organic search, social sites as Social, other sites as Referral, and visits with nothing to go on as Direct. Ad click ids such as gclid and msclkid also count: by default they mark a visit as Paid search. Rules are checked in order and the first match wins, so put specific rules first.
Because Sourcetrail stores the raw tags, you can edit, reorder or reset the rules and every report re-classifies past visits immediately. If you discover that half your team used paid_social and the other half paid-social, add both to the rule and your history is fixed. See attribution models and channel rules.
Sessions and campaign changes
Sourcetrail starts a new session (a new touchpoint) after 30 minutes of inactivity, or when a visit arrives with different campaign tags or a different referrer. That's why consistent tags matter for multi-touch models such as linear and position-based: each tagged return visit is a separate touch that can earn credit.
Checking your tags
- Open a tagged link in a private window.
- In Sourcetrail, the site page shows incoming visits within seconds; check the visit has the source, medium and campaign you expect, and lands in the right channel.
- Fix the link or the channel rule before the campaign goes out, not after.
Common mistakes
- Tagging links on your own site. A visitor who arrived from search and then clicks a tagged banner on your homepage gets a new session with the banner's tags, and search loses the credit.
- Reusing campaign names across years. Add the year or quarter:
spring-sale-2026. - Putting the channel in the source.
utm_source=emailtells you nothing about which list; use the list or tool as the source andemailas the medium. - Long, unreadable links. Use your link shortener for print and social, but tag the destination URL first.
Spend should use the same names
When you enter ad spend or import ad platform CSVs, use the same campaign names as your utm_campaign values. Then cost per acquisition and return on ad spend line up per campaign. For the full store setup, see Sourcetrail for online stores.
Try Sourcetrail free
Privacy-respecting marketing attribution: UTM tracking, server-side conversions, channel reports and ROAS. The Free plan needs no card; you can export or delete your data any time.