UTM tracking is a method of adding small text tags, called UTM parameters, to your URLs so that Google Analytics 4 can tell you exactly where each visitor came from, right down to the specific campaign, channel, or link they clicked. Without UTM parameters, GA4 groups much of your traffic under "direct" or broad channel labels. You know email sent visitors, but not which email, campaign, or link within it drove the conversion. UTM tracking fixes that gap by giving every link its own identity in your analytics data.
What Are UTM Codes?
UTM codes are added parts of a URL, short text snippets that carry information about where a visitor came from. A UTM code is not unique to the individual visitor, but to the origin of that traffic. As a business owner, you can customize UTM parameters to generate codes attributed to specific campaigns, traffic sources, and even individual link positions on a page.
UTM codes are also called UTM parameters or tracking tags. All three terms refer to the same thing.
What Do UTM Codes Tell You That Google Analytics Can't?
When using Google Analytics 4, you can often identify the referring domain: Google organic, email, social media, a guest post. But that only gives you the broad channel, not the specific campaign or link.
You might know that X (Twitter) sent 3,000 visitors last month, but do you know which posts drove that traffic? Or whether it was organic posts or paid ads? UTM parameters answer those questions by giving each link its own identity.
They can also tell you where on a page someone clicked. If you're promoting a tool in three places on one page, a sidebar ad, an in-text mention, and a CTA button at the bottom, you can create three separate UTM codes to track which placement converts best:
https://example.com?utm_source=landing-page&utm_content=displayad
https://example.com?utm_source=landing-page&utm_content=intext
https://example.com?utm_source=landing-page&utm_content=button
The only difference is the utm_content value at the end, which tells GA4 exactly which placement drove the click.
The 5 UTM Parameters and What Each Tracks
1. Campaign (utm_campaign)
Campaign tracking is the foundation of UTM analytics. At any given time you might be running several campaigns simultaneously. You need to separate the traffic to understand which is performing. Label campaigns with specific names like:
- buy-one-get-one-free
- 20pct-discount-april
- free-report-spring
This tells you which campaign is driving the most revenue, not just the most clicks.
2. Source (utm_source)
Source identifies the referring website or platform: the specific origin of the traffic. Examples: utm_source=facebook, utm_source=newsletter, utm_source=google. This is critical if you're publishing content or advertising across multiple platforms.
3. Medium (utm_medium)
Medium is the type of marketing channel: email, social, cpc, organic, affiliate. The code for an email campaign would be utm_medium=email. Medium lets you compare channels at an aggregate level: does email outperform paid social across all campaigns?
This matters especially when you're running Shopify marketing automation flows. UTM parameters let you identify which automated email sequence (welcome series, abandoned cart, post-purchase) drove each conversion in GA4.
4. Content (utm_content)
Content distinguishes between multiple links from the same source pointing to the same destination. For example, two links in the same email (a banner and a footer link) or two ad creatives in the same campaign. Use utm_content to identify which specific element generated the click.
5. Term (utm_term)
Term tracks the keyword associated with a paid ad click. Used primarily in Google Ads campaigns to identify which search term drove a visit. Example: utm_term=utm+tracking+tool. This data feeds back into your keyword strategy. High-converting terms should inform your SEO and bidding decisions.
Combining Parameters
You can combine any or all of the above parameters in a single URL for maximum data granularity:
https://example.com?utm_source=facebook&utm_medium=social&utm_campaign=20pct-discount-april&utm_content=banner
This single URL tells GA4: traffic came from Facebook (source), via a social post (medium), as part of the April 20% discount campaign (campaign), through a banner image (content).
UTM Naming Convention Templates
Inconsistent naming is the most common UTM mistake. These ready-to-use templates give you a starting convention you can adopt across your entire team from day one:
- Email newsletter: utm_source=newsletter | utm_medium=email | utm_campaign=may-2026-digest
- Automated email flow: utm_source=klaviyo | utm_medium=email | utm_campaign=abandoned-cart-flow
- Facebook organic post: utm_source=facebook | utm_medium=social | utm_campaign=product-launch-june
- Facebook paid ad: utm_source=facebook | utm_medium=cpc | utm_campaign=summer-sale-2026 | utm_content=carousel-v1
- Instagram bio link: utm_source=instagram | utm_medium=social | utm_campaign=bio-link
- Affiliate link: utm_source=affiliate-name | utm_medium=affiliate | utm_campaign=review-post
- Partner blog post: utm_source=partner-blog-name | utm_medium=referral | utm_campaign=guest-post
- TikTok paid ad: utm_source=tiktok | utm_medium=cpc | utm_campaign=brand-awareness | utm_content=video-ugc-1
Rules for all templates: lowercase only, hyphens instead of spaces, no special characters. Save these in a shared spreadsheet so every team member uses identical source and medium values across all campaigns.
UTM Tracking in Google Analytics 4
In Google Analytics 4 (which replaced Universal Analytics in July 2023), UTM data appears under Reports > Acquisition > Traffic Acquisition. The "Session source / medium" and "Session campaign" dimensions reflect your UTM parameters directly. GA4 also auto-tags Google Ads clicks by default, but for all other paid channels and email platforms, UTM parameters are required to get accurate attribution.
How to Read Your UTM Data in GA4
Most guides explain how to build UTM codes but stop before explaining how to actually use the data. Here is a practical walkthrough:
- Traffic Acquisition report: Go to Reports > Acquisition > Traffic Acquisition. Change the primary dimension to "Session campaign" to see revenue and conversions broken down by campaign name. This is the fastest way to compare email vs. social vs. paid performance in one view.
- Source/medium breakdown: Change the primary dimension to "Session source / medium" to see combinations like facebook/social, klaviyo/email, google/cpc. This reveals which specific platform-channel combinations drive the most valuable traffic.
- Landing page + campaign: In Explorations (the custom report builder in GA4), combine "Landing page" with "Session campaign" as dimensions to see which landing pages different campaigns drive traffic to. This helps diagnose campaigns that send traffic to the wrong page.
- Conversion by campaign: Add a conversion event (like "purchase") as a metric alongside sessions and engagement rate. This shows not just which campaign drives the most traffic, but which drives the most revenue, which is frequently a different answer.
Common UTM Tracking Mistakes to Avoid
UTM parameters are easy to implement incorrectly, and bad data is worse than no data. It leads to wrong decisions about where to invest. These are the most common errors:
- Inconsistent capitalisation: UTM parameters are case-sensitive. "Facebook" and "facebook" and "FACEBOOK" become three separate sources in GA4. Pick a convention (lowercase throughout) and apply it across every campaign from day one.
- Using spaces in parameter values: Spaces in UTM values either break the URL or get encoded as
%20. See our guide on how URL encoding works to understand what these percent codes mean. Use hyphens (spring-sale-2025) or underscores (spring_sale_2025) instead to keep reports clean and readable. - Adding UTM parameters to internal links: Tagging links that point to other pages on your own site causes session fragmentation in GA4. GA4 treats the click as a new session from an internal source, losing attribution for the original campaign. UTM parameters are for external links only.
- Not using UTM on all paid channels: Google Ads auto-tags clicks by default, but LinkedIn, Meta, TikTok, and email platforms do not. If you're running paid campaigns on any non-Google channel without UTM parameters, that traffic shows up as "direct" in GA4.
- Creating new campaign names for every minor variation: Too many campaign names make reports impossible to analyse. Group related activity under one campaign name (e.g., "summer-sale-2025") and use utm_content to distinguish individual creatives within it.
- Building UTM codes by hand: Manual typing introduces typos that silently break attribution. Always use a UTM builder tool to generate codes correctly.
How Safari's ITP Affects UTM Tracking
Most UTM tracking guides skip this entirely, but it matters more every year: Safari's Intelligent Tracking Prevention (ITP) actively limits how long attribution cookies survive in the browser. If a large share of your audience uses Apple devices, this gap in your data is real and growing.
What Is ITP?
ITP is Apple's privacy framework built into Safari, the default browser on every iPhone, iPad, and Mac. It was designed to prevent third-party advertising trackers from following users across websites. The side effect is that it also caps the lifespan of first-party cookies, including the ones GA4 uses to store attribution data from UTM parameters.
How It Affects UTM Attribution
When a visitor lands on your site via a UTM-tagged link, GA4 records the source, medium, and campaign in a cookie. Under ITP, that cookie is deleted after 7 days on Safari. This means:
- A customer who clicks your email campaign on Tuesday and buys the following Wednesday (8 days later) will show up as "direct" in GA4, not as email traffic.
- Any multi-touch attribution model that relies on GA4 cookies will undercount email and social contributions for Safari users.
- iOS users, a segment with above-average purchase intent on Shopify stores, are disproportionately affected because Safari is the default iPhone browser.
Why Shopify Stores Feel This Most
According to Shopify's own data, over 60% of Shopify store traffic comes from mobile devices, and a large share of that is iOS Safari. If your store sells fashion, beauty, or lifestyle products where iPhone users over-index, you could be misattributing a meaningful portion of email-driven revenue to "direct."
What to Do About It
- Capture UTM data on the landing page. Push UTM parameters into your data layer or CRM at the moment of the first visit, before any cookie expiry risk. Klaviyo and Omnisend can capture UTM source data at opt-in so you have a record tied to the contact, not the browser session.
- Shorten your attribution window to match ITP reality. If your GA4 attribution window is set to 30 days, you're comparing apples to ITP-degraded data. Consider running a 7-day window alongside your standard window so you can see what ITP is costing you.
- Consider server-side tracking for high-revenue periods. Server-side tagging captures attribution data before the browser can interfere. See the section below on when to upgrade.
UTM Tracking vs. Server-Side Tracking: When to Upgrade
Standard UTM tracking is client-side: the browser reads the URL parameters, fires a GA4 event, and stores attribution in a cookie. This works well for most sites, but it has a ceiling. Ad blockers, ITP, and browser privacy settings all interfere with client-side data collection. Server-side tracking moves part of that process to your server, where the browser cannot interfere.
How They Differ
With client-side UTM tracking, the flow is: visitor clicks UTM link, browser reads parameters, GA4 JavaScript fires, cookie is set. If the browser blocks the script or deletes the cookie, the attribution is lost.
With server-side tracking, the flow is: visitor clicks UTM link, your server receives the request, the server forwards the event data to GA4 directly. The browser is out of the loop. ITP cannot touch server-to-server data, and most ad blockers cannot intercept it.
When a Shopify Store Should Consider Server-Side Tracking
- Revenue above $1M/year. Below this threshold, the implementation cost (developer time, GTM server container fees) typically outweighs the data improvement. Above it, even a 10% reduction in unattributed revenue is worth recovering.
- iOS traffic above 50% of sessions. Check this in GA4 under Tech > Tech Details > Operating System. If more than half your sessions come from iOS, ITP is actively degrading your attribution quality today.
- Running multi-touch attribution. If you're using a third-party attribution tool that needs to stitch sessions across devices and days, client-side cookies will produce gaps. Server-side data gives the stitching model more complete inputs.
Tools for Shopify Server-Side Tracking
- Elevar: The most widely used server-side tracking solution built specifically for Shopify. It handles GA4, Meta CAPI, TikTok Events API, and Klaviyo simultaneously from one implementation. Pricing starts around $200/month for mid-market stores.
- GA4 server-side via Google Tag Manager: Google's native option. Requires a server container in Google Cloud (or similar), developer setup, and ongoing maintenance. More flexible but more complex than Elevar.
For most small Shopify stores, standard UTM tracking with consistent naming conventions and ITP-aware attribution windows is enough. Server-side is a genuine upgrade, but only when the data gaps are large enough to justify the cost.
UTM Tracking Audit Checklist
Before you consider your UTM setup complete, run through this checklist. Each item represents a gap that silently degrades your attribution data when it's missing.
| Checkpoint | What to Verify |
|---|---|
| Naming convention documented | A shared doc or spreadsheet defines approved utm_source, utm_medium, and utm_campaign formats. Every team member has access to it. |
| All email links tagged | Every link in every email campaign and automated flow includes utm_source, utm_medium=email, and utm_campaign. Test by clicking a live link and checking the URL. |
| All paid channels tagged | Meta, TikTok, LinkedIn, Pinterest, and any other non-Google paid channel has UTM parameters on every ad destination URL. Google Ads auto-tags, but all others require manual UTMs. |
| Internal links are NOT tagged | No links pointing to your own domain carry UTM parameters. Internal UTMs break session attribution in GA4. |
| UTM data flowing into GA4 | Check Traffic Acquisition > Session source/medium in GA4. You should see your expected sources (e.g., klaviyo/email, facebook/social) appearing with real traffic. |
| Custom GA4 reports built | At minimum: a campaign revenue report and a source/medium conversion report exist as saved reports or Explorations so the team can access data without rebuilding it each time. |
| Attribution window defined | Your GA4 attribution model and lookback window match your actual buying cycle. A 7-day window for impulse purchases; 30 days for higher-consideration products. |
| Affiliate and influencer links tracked | Each creator or affiliate has a unique utm_source or utm_content value. You can pull a report showing revenue by affiliate without relying on the affiliate platform's own numbers. |
UTM Tracking for Shopify Stores
For Shopify store owners, UTM tracking is particularly valuable because it bridges the gap between marketing spend and revenue. GA4 shows you sessions and conversions, but connecting a specific Instagram post to a $480 order requires UTM parameters on every link you publish. For a full breakdown of how to build email flows around UTM-tracked campaigns, see our guide to email marketing on Shopify. Key applications for Shopify merchants:
- Email campaigns: Tag every link in every Klaviyo, Omnisend, or Shopify Email campaign with utm_source=klaviyo (or your platform), utm_medium=email, utm_campaign=your-campaign-name. This lets you compare revenue by campaign, not just by channel.
- Influencer and affiliate links: Give each creator their own utm_source or utm_content value. This makes it trivial to see which affiliate drove $2,000 in orders and which drove zero, without relying on the affiliate app's own reporting.
- Social media bio links: Your Instagram or TikTok bio link should include UTM parameters so you can separate bio traffic from direct or organic search traffic in GA4.
- Paid ads (non-Google): Any TikTok, Meta, Pinterest, or Snapchat ad campaign needs manual UTM parameters. Auto-tagging only applies to Google Ads.
How to Create UTM Codes For Your Website
To create UTM codes, use the Gochyu UTM Builder, a free, easy-to-use tool that generates correct UTM URLs without typos. Here is a step-by-step guide:
Step 1: Access , Open the UTM Builder.
Step 2: Enter the destination URL , The page you want visitors to land on (e.g., https://example.com/landing-page). If your destination URL contains special characters or non-ASCII text, use the URL decode tool to verify the encoded version resolves correctly before publishing your campaign link.
Step 3: Campaign Source , Where this link will be placed (e.g., facebook, newsletter, partner-blog).
Step 4: Campaign Medium , The channel type (e.g., email, social, cpc, affiliate).
Step 5: Campaign Name , A descriptive name for the campaign (e.g., april-sale-2024, welcome-series).
Step 6: Campaign Term (optional) , The paid keyword, if applicable.
Step 7: Campaign Content (optional) , The specific link position or creative (e.g., header-banner, footer-link, cta-button).
Step 8: Copy and use the generated URL , The complete UTM URL is generated automatically at the bottom. Paste it anywhere you'd use a regular link. The code updates in real time as you change any field.
For more advanced use cases, including UTM tracking for email campaigns, Google Ads integration, and reporting setup, see our dedicated guide on how to use UTM tracking.
, -* read the rest of the post and open up an offer