What are UTM codes, and why should you use them?
Most marketers know their campaigns are driving traffic. The harder question is which campaigns, on which channels, sending which audiences. Without UTM codes, that question is largely unanswerable — you're relying on guesswork and gut instinct instead of data.
UTM codes are one of the simplest and most powerful tools in a digital marketer's toolkit. They take minutes to set up and can completely transform your ability to measure what's working — across email, social media, paid ads, and beyond.
What are UTM codes?
UTM stands for Urchin Tracking Module. The name comes from Urchin Software Corporation, a web analytics company that Google acquired in 2005 — and whose technology became the foundation for Google Analytics.
UTM codes are short parameters you append to the end of any URL. They don't change where the link goes or how the page loads — they simply pass additional information to your analytics platform when someone clicks the link. That information tells you exactly where that visitor came from and what prompted the click.
For example, here's a plain URL for this article:
https://www.dailystory.com/blog/what-are-utm-codes-and-why-should-you-use-them
And here's the same URL with UTM codes added for an email newsletter campaign:
https://www.dailystory.com/blog/what-are-utm-codes-and-why-should-you-use-them?utm_source=newsletter&utm_medium=email&utm_campaign=2025-04-content-digest
When someone clicks that second link, your analytics platform records the source (newsletter), the medium (email), and the campaign name (2025-04-content-digest) — so you know exactly which send drove that visit.
ImportantUTM codes travel with the URL. If someone copies your tagged link from a Facebook post and shares it on LinkedIn, the UTM still reports the traffic as coming from Facebook. Keep that in mind when reading attribution data on broadly shared links.
Why should you use UTM codes?
Without UTM codes, your analytics platform has to guess where traffic came from — and it often gets it wrong. Email clicks frequently show up as "direct" traffic. Social referrals get lumped together. Paid campaigns blend with organic. The result is attribution data you can't trust and marketing decisions made on incomplete information.
UTM codes fix that by giving you precise, channel-level visibility. Here's what that unlocks in practice:
- Compare channels side by side. See whether your email campaign or your LinkedIn post drove more signups from the same landing page — with the exact same content.
- Prove ROI on specific campaigns. Tie a revenue outcome or conversion directly back to the specific email, ad, or social post that started the journey.
- Optimize budget allocation. When you know which channels consistently drive high-quality traffic, you can shift spend toward what actually works.
- Run more precise A/B tests. Use
utm_contentto differentiate two versions of the same ad or two CTAs in the same email — then let the data pick the winner. - Rescue misattributed traffic. Email traffic, in particular, is frequently miscategorized as "direct" without UTM codes. Tagging your links puts it where it belongs.
For teams running multiple campaigns across multiple channels simultaneously, UTM codes aren't optional — they're the difference between a reporting dashboard you can act on and one that just looks busy.
The five UTM parameters explained
There are five standard UTM parameters. The first three — source, medium, and campaign — are considered required. Term and content are optional but useful in the right context.
- utm_source — Where the traffic originates. This is the specific platform or publisher. Examples:
newsletter,facebook,google,linkedin - utm_medium — The marketing channel or type. Examples:
email,cpc,social,affiliate. For email campaigns, always useemail— this is what allows Google Analytics to correctly categorize the traffic in its Default Channel Groups. - utm_campaign — The specific campaign name. Keep these descriptive and consistent. Example:
2025-04-spring-promoorwelcome-series-week1 - utm_term — Used primarily for paid search to identify the keyword that triggered the ad. Example:
email-marketing-software - utm_content — Differentiates links within the same campaign. Useful for A/B testing or tracking multiple CTAs in one email. Examples:
header-cta,footer-link,image-banner
One technical note: UTM parameters are case sensitive. utm_medium=Email and utm_medium=email will appear as two separate entries in your analytics reports. Always use lowercase consistently across your entire team.
UTM codes in email marketing
Email is where UTM tracking pays its biggest dividends — and where it causes the most confusion when not set up correctly. Email clients don't pass referrer information to websites the way browsers do, which means clicks from email campaigns often appear in your analytics as "direct" traffic if you haven't tagged your links.
With properly tagged links, you can track performance at a granular level:
- Which email campaign in a nurture sequence drove the most conversions
- Whether a promotional email or a content email generates more site engagement
- Which specific link inside an email (header button vs. footer link) gets clicked most
- How email performance compares to social or paid on the same landing page
DailyStory handles UTM parameter configuration at the campaign level, automatically appending consistent tracking parameters to every link in your emails — no manual tagging of individual links required. This keeps your attribution data clean across every send, regardless of how many links are in the template.
Naming conventions: the make-or-break factor
The single most common reason UTM data becomes unusable is inconsistent naming. When one person uses utm_medium=Email, another uses utm_medium=email, and a third uses utm_medium=newsletter, your analytics splits what should be one data stream into three disconnected entries. You can no longer answer "how did email perform this quarter?" with any confidence.
A simple set of rules prevents this:
- Always use lowercase. No exceptions. UTM parameters are case-sensitive.
- Use hyphens, not spaces or underscores, in campaign names. This keeps URLs clean and avoids encoding issues. Example:
spring-sale-2025notspring sale 2025 - Prefix campaign names with a year-month. Example:
2025-04-spring-sale. This makes time-based filtering trivial without relying on date-range selectors. - Document your conventions in a shared location. A team wiki, a campaign brief template, or a shared spreadsheet — anywhere every team member can reference it.
- Require UTM values before any campaign launches. Retrofitting UTMs after a send is impossible. Make them a required field in your campaign planning process.
How to create UTM codes
The easiest way to build UTM-tagged URLs manually is Google's Campaign URL Builder. You fill in the fields for your destination URL and each UTM parameter, and the tool generates the complete tagged URL — no risk of typos in the parameter syntax.
For teams running ongoing campaigns at scale, managing UTMs manually gets unwieldy fast. Email marketing platforms like DailyStory let you configure UTM parameters once at the campaign level and automatically apply them to every tracked link — ensuring consistency without requiring anyone to hand-tag individual URLs.
Whichever approach you use, keep a master record of every UTM combination you've created — a shared spreadsheet works fine. This makes it easy to audit your naming conventions over time and avoids accidentally creating duplicate campaign names that split your reporting.
How to track UTM codes in Google Analytics 4
Google Analytics 4 (GA4) reads UTM parameters automatically — no additional configuration needed. When someone clicks a tagged link, GA4 captures the parameter values and makes them available in your acquisition reports.
To view your campaign data in GA4:
- In the left navigation, go to Reports → Acquisition → Traffic acquisition
- In the primary dimension dropdown, select Session campaign to see traffic broken down by
utm_campaignvalue - Add a secondary dimension (the blue "+" icon) and select Session source / medium to see a full breakdown of source and medium within each campaign
- For deeper analysis, go to Explore in the left navigation and create a blank exploration report — here you can combine any UTM dimensions with any metrics
One important nuance: GA4 uses its Default Channel Groups to categorize traffic into buckets like "Email," "Paid Search," and "Organic Social." If your UTM values don't match GA4's expected naming patterns — for example, using utm_medium=newsletter instead of utm_medium=email — your traffic may land in an "Unassigned" bucket. Following Google's Default Channel Group definitions when choosing your medium values keeps your channel reporting clean.
Also keep in mind: GA4 counts only users who actually land on and load your page — not everyone who clicks. This means your analytics numbers will be lower than the click counts reported by email platforms or link shorteners. That's normal and expected.
Start tagging. Stop guessing.
UTM codes are a small investment with an outsized return. Once you've established consistent naming conventions and integrated UTM tagging into your campaign workflow, you gain clear visibility into which channels and campaigns are actually driving results — and which ones are quietly burning budget.
For email campaigns specifically, the impact is immediate: traffic that previously vanished into "direct" becomes fully attributed, and you can finally compare email performance against every other channel on equal footing.
DailyStory's email marketing platform automatically applies UTM tracking to every campaign link, keeping your attribution data clean without adding steps to your workflow. See how DailyStory handles campaign tracking, or explore our tips for more effective A/B testing once your UTM foundation is in place.
Frequently asked questions
Below are some frequently asked questions about UTM codes.
Do UTM codes affect SEO?
No. UTM parameters are stripped by Google before a URL is evaluated for indexing. They have no impact — positive or negative — on your search rankings. Google also canonicalizes UTM-tagged URLs back to the clean version, so you won't end up with duplicate content issues from tagged links.
Do UTM codes work with analytics platforms other than Google Analytics?
Yes. UTM parameters are a widely adopted open standard, not a Google-specific feature. Most major analytics platforms — including HubSpot, Mixpanel, and Adobe Analytics — recognize and report on UTM parameters natively. DailyStory also reads UTM data to attribute campaign-level conversion activity.
Should I use UTM codes on internal links?
No — and this is a common mistake. Adding UTM parameters to links between pages on your own website will reset the session source in GA4, making it appear as though an internal page is the origin of that traffic. UTM codes should only be added to external links: emails, social posts, ads, partner placements, and any link that originates outside your website.
How many UTM parameters do I need to include?
At minimum, always include utm_source, utm_medium, and utm_campaign. These three give GA4 enough information to correctly categorize traffic and attribute it to the right campaign. utm_content and utm_term are optional — add them when you need link-level differentiation (A/B testing, multiple CTAs in one email) or paid keyword tracking.
Why is my UTM-tagged traffic showing as 'Unassigned' in GA4?
This usually means your utm_medium value doesn't match GA4's Default Channel Group rules. For example, utm_medium=newsletter won't be recognized as the Email channel — GA4 expects utm_medium=email. Similarly, utm_medium=social-media may not map correctly; GA4 expects utm_medium=social or utm_medium=organic_social. Review Google's Default Channel Group definitions and align your medium values accordingly.
Can UTM codes be used in SMS campaigns?
Yes. UTM codes work the same way in SMS as in email — you append them to any URL in your message. Because SMS links are often long and character count matters, it's common to pair UTM tracking with a URL shortener. DailyStory's SMS campaigns support tracking links that handle this automatically, keeping your messages concise while preserving full attribution data.
Can I track UTM data if I use a link shortener?
Yes, as long as the UTM parameters are on the destination URL before you shorten it. The shortener wraps the full tagged URL, so when someone clicks through the short link and lands on your page, the UTM parameters are still passed to your analytics platform. Just make sure you're shortening the complete URL — UTMs included — not the bare URL.