How to Setup Shopify UTM Tracking: The Setup We Recommend

A while back, a Shopify merchant came to us with a familiar complaint: their GA4 numbers and their Shopify Marketing report disagreed so badly that neither was usable. They were spending around $14K/month across Meta, Google Ads, and Klaviyo. GA4 said email was their best channel. Shopify said it was “Direct.” Meta Ads Manager, of course, claimed credit for almost everything.

Their link history told the whole story in about ten minutes. The team had been tagging links by hand for two years. We found facebook, Facebook, FB, and fb-paid living in the same account as four separate sources. Their email links carried no UTMs at all, so every Klaviyo click that arrived with a stripped referrer got dumped into Direct. And someone had added utm_source=homepage to internal banner links, which was quietly overwriting the real acquisition source mid-session.

None of this is exotic. We’ve looked inside a lot of Shopify accounts, and the same handful of UTM problems shows up in almost every one. So instead of writing another “what does UTM stand for” explainer, this post is the playbook we give merchants — how to structure UTMs for Shopify, how to set them up channel by channel, and the mistakes that keep breaking attribution.

The 60-Second Version (If You Only Read One Section)

UTM parameters are the query-string tags (utm_source, utm_medium, utm_campaign, utm_content, utm_term) you append to any link pointing at your store. Shopify’s Marketing reports and GA4’s session attribution both read them. If your tagging is consistent, both platforms can tell you which campaign made money. If it isn’t, both platforms lie to you in different ways — and you end up making budget decisions based on whichever lie feels better.

The fix is not “try harder to tag links carefully.” The fix is a written taxonomy plus tooling that enforces it, so a human never types utm_medium into a URL bar again.

Why Shopify Stores Feel UTM Pain More Than Most

Shopify has its own attribution logic. It auto-detects some referrers (Google Ads through the native integration, for example) and classifies the rest using referrer data plus whatever UTMs it finds on the landing URL. GA4 runs a completely separate model on the same clicks.

That means one untagged or badly tagged link produces two different wrong answers — one in Shopify, one in GA4. This is where most of the “my GA4 doesn’t match Shopify” panic comes from. Some discrepancy between the two is normal and expected (different session definitions, different attribution windows, consent-related data loss). But when a specific channel shows a 40–50% gap, the root cause is almost always tagging, not tracking.

A quick real example: in one account we reviewed, “Direct” was 38% of the store’s attributed revenue. After the Klaviyo flows, SMS links, and the founder’s Instagram bio link were tagged properly, Direct dropped to 14% within a month. Nothing about the traffic changed — the store just stopped throwing away the labels.

Still managing UTM links in spreadsheets? Create cleaner tracking URLs with less manual work.
Try Free

Build the Taxonomy Before You Build a Single Link

This is the step everyone skips, and it’s the one that matters most. Before tagging anything, write a one-page naming convention doc. Here’s the template we recommend:

ParameterRuleAllowed values (examples)
utm_sourceThe platform, lowercase, one canonical spellingfacebook, instagram, google, klaviyo, tiktok, sms
utm_mediumThe channel type — this drives GA4 channel groupingpaid_social, cpc, email, sms, influencer, qr
utm_campaign{objective}-{promo}-{yyyymm}prospecting-bfcm-202511
utm_contentThe creative or placement variantugc-video-v2, carousel-blue, story-swipeup
utm_termPaid keyword or audience namelookalike-purchasers-3pct

Three rules worth enforcing without exception:

  1. Everything lowercase. UTMs are case-sensitive, so Email and email fragment into separate rows in every report you’ll ever run.
  2. No spaces, ever. Use hyphens or underscores — pick one and stay with it. Spaces become %20 or + in URLs and look terrible in reports.
  3. The medium list is closed. Nobody invents a new medium without updating the doc. Medium is what GA4 uses to sort traffic into channel groups, so a creative-but-nonstandard value like social-ads-new can land your paid traffic in “Unassigned.”

If you take nothing else from this article: a boring, strictly-enforced taxonomy beats a clever one every time. You’re optimizing for the version of you who has to analyze this data eight months from now.

Channel-by-Channel: How to Tag Shopify Traffic

Meta (Facebook & Instagram)

Don’t paste UTMs into the ad’s destination URL. Put them in the URL parameters field at the ad level, and use Meta’s dynamic macros so the tagging maintains itself:

utm_source={{site_source_name}}&utm_medium=paid_social&utm_campaign={{campaign.name}}&utm_content={{ad.name}}

Two lessons from watching this play out in real accounts:

  • The macros pull your actual campaign and ad names into analytics. So your Meta naming convention becomes your UTM convention whether you like it or not. If your campaign is named “TEST test FINAL v3 (copy),” that string is what shows up in GA4. Fix your Meta naming first.
  • {{site_source_name}} resolves to fb, ig, an, or msg depending on placement. Decide up front whether you want that split or a single facebook source, and document the choice — we’ve seen teams “discover” Instagram as a new channel six months in because nobody knew the macro was splitting it.

Klaviyo and Email

Klaviyo can auto-append UTMs account-wide (Settings → Email, and separately for SMS). Turn it on, then check what it actually produces — the defaults use Klaviyo’s internal naming and may not match your taxonomy. A clean setup is utm_source=klaviyo, utm_medium=email, with campaign/flow names populating utm_campaign.

The classic email mistake: flows are tagged, one-off campaigns aren’t, because someone built the campaign template before auto-tagging was enabled. Audit both.

SMS, Influencers, and Offline

  • SMS: utm_medium=sms, and run links through a shortener that preserves parameters through the redirect. Test this — some shorteners and some in-app browsers strip query strings, and you won’t know until the clicks show up as Direct.
  • Influencers: everyone shares one utm_campaign, each creator gets a unique utm_content. That way the campaign rolls up cleanly and you can still rank individual creators by revenue in Shopify’s marketing report.
  • QR codes / packaging inserts: tag them (utm_medium=qr, utm_campaign=packaging-insert). This is free attribution on traffic that would otherwise be 100% Direct, and it’s how you find out whether that insert card is actually driving reorders.

The Five Mistakes We See in Almost Every Account

1. UTMs on internal links. A homepage banner linking to /products/bestseller?utm_source=homepage overwrites the visitor’s real source mid-session. You paid Meta for the click; your own banner takes the credit. Never tag links between pages of your own store.

2. Tagging organic Google links. Google search traffic classifies itself. Manually tagged “organic” links just pollute clean data. Same for Google Ads if you’re using auto-tagging (gclid) — adding manual UTMs on top can create conflicts and duplicate rows.

3. Case and spelling drift. Email / email / E-mail. It sounds trivial until you’re exporting a report and hand-merging six rows that should be one. A monthly ten-minute scan of your source/medium report for near-duplicates is the cheapest data-quality check that exists.

4. Redirects that eat parameters. Domain migrations, shortened links, some app-generated URLs, and certain in-app browsers can drop query strings. Whenever a “fully tagged” channel shows suspiciously high Direct traffic, click the live link on a phone and watch what actually arrives at the landing page. Half the time, the UTMs died somewhere in transit.

5. No source of truth. The team tags from memory, or from a stale spreadsheet with three conflicting tabs. This is the root cause behind mistakes 1–4. Which brings us to the actual fix.

Where to Read the Results

Once tagging is clean, two reports do most of the work:

  • Shopify: Analytics → Marketing. “Sales attributed to marketing” broken down by your campaign names — this is revenue-first attribution, closest to the money.
  • GA4: Reports → Acquisition → Traffic acquisition, with the primary dimension switched to Session manual source/medium. This is where your UTM values live, as opposed to Google’s inferred channel groups.

Give any change 2–4 weeks of data before judging it, and remember the two platforms will never match to the penny. What you’re looking for is directional agreement: both should tell the same story about which channels are winning, even if the exact numbers differ by 10–20%.

Why Spreadsheets Stop Working (And Why We Built UTM Manager)

Almost every store goes through the same lifecycle: manual tagging → chaos → “the UTM spreadsheet” → the spreadsheet becomes the chaos. Spreadsheets don’t validate anything. They can’t stop someone from typing Facebok, they don’t enforce your medium list, and by month three there are two copies and nobody knows which one is current.

That’s exactly the problem UTM Manager was built to solve: one shared workspace where your taxonomy is enforced at the point of link creation. Sources and mediums are locked to your approved list so typos are impossible, conventions are saved per channel, and a full link history means anyone on the team can see what’s already been tagged and how. You define the rules once; the tool makes them un-breakable.

If your source/medium report currently looks like a ransom note assembled from four different spellings of “facebook,” start here: standardize the taxonomy this week, migrate your active channels one at a time (email first — it’s usually the fastest win), and let the tooling handle consistency from then on.

Clean attribution isn’t a one-time project. But it’s also not hard — it’s just discipline, encoded into your workflow instead of left to memory.

Ready to clean up your Shopify attribution? Start free with UTM Manager — bring in your existing UTMs and see every duplicate and inconsistency in one view.

FREE TOOL + EXTENSION

Still Building UTM Links in Spreadsheets?

Create clean campaign URLs faster, save templates, and standardize naming across your team.

×
UTM URL Builder
📋 Templates Required Your organization requires approved templates for all UTM links.
You’re in guest mode — build, copy, and export are available. Sign in or create an account to save and load org rules & templates.