To set up UTM tracking in Google Analytics, append five tags — utm_source, utm_medium, utm_campaign, plus optional utm_content and utm_term — to every marketing link, built with Google's Campaign URL Builder and kept all-lowercase under one documented naming convention. GA4 reads those tags and files each session into a channel. The whole payoff is knowing which link actually drove an order instead of watching paid clicks collapse into a "Direct" pile you can't budget against.

If you run an operating store with real ad spend, UTMs are the one attribution input you fully control. Google's own tracking IDs get stripped in Apple contexts (more on that below), but UTMs survive. Skip them and your paid, email, and influencer traffic quietly piles into "Direct" and "Unassigned" — and you lose the ability to tie a dollar of spend to a dollar of revenue.

This guide is part of our broader attribution and tracking guide. Here we go deep on the GA4 setup itself — and the three places most stores get it wrong.

What UTM tracking actually does in GA4

A UTM is just a text tag added to the end of a URL. When someone clicks a tagged link, Google Analytics reads the tags and records where that session came from. No tags, no source — the visit becomes anonymous traffic.

GA4 takes utm_source and utm_medium and auto-assigns each session to a default channel group using a fixed rule set Google defines and you cannot override (Nice Looking Data). That's the mechanism behind every "why is all my traffic Direct" complaint: the rules can only sort what you tagged.

So UTM tracking isn't a reporting nicety. It's the thing that decides whether your Meta campaign shows up as Paid Social or as an unlabeled blob.

The five UTM parameters (and the sixth)

Google's URL builder documents the exact fields (Google Analytics Help):

  • utm_source — the referrer. Example: facebook, klaviyo, google.
  • utm_medium — the marketing medium. Example: cpc, email, social.
  • utm_campaign — the campaign name. Example: bfcm-2026.
  • utm_content — differentiates creatives or links within one campaign.
  • utm_term — the paid keyword (search campaigns).
  • utm_id — an optional campaign ID.

Google is explicit: "When you add parameters to a URL, you should always use utm_source, utm_medium, and utm_campaign" (Google Analytics Help). Leave one out and GA4 shows "(not set)" in that column.

How to build a UTM-tagged URL the right way

Step 1 — Use the Campaign URL Builder

Open Google's Campaign URL Builder, paste your destination URL, and fill in source, medium, and campaign. It assembles the final link so you don't fat-finger a question mark or ampersand. The format is simple: a ? after the URL, key=value pairs, joined by &.

Step 2 — Lock a naming convention before you tag anything

This is where reports live or die. A few near-universal rules (utm.io):

  • All-lowercase, always. The single highest-leverage rule.
  • Hyphens or underscores, never spaces (spaces break into %20).
  • A finite, documented vocabulary — facebook, not fb one day and FB the next.
  • Structured campaign names like bfcm-2026_prospecting_video so you can split reports later.

Put it in one shared sheet that everyone who makes a link uses. Convention drift is the most common self-inflicted attribution wound there is.

Tagging your own site navigation or an on-site banner restarts the session's source mid-journey and overwrites the real acquisition source (utm.io). A shopper who arrived from a Meta ad, clicked a UTM-tagged homepage banner, then bought now looks like they came from that banner. UTMs are for external links only.

Why GA4 dumps traffic into "Unassigned"

GA4's channel matching is exact and case-sensitive (Analytigrow). utm_source=Facebook and utm_source=facebook are two different sources in your reports. A utm_medium=paid may not land in Paid Search at all, because "paid" isn't a value GA4's rule recognizes — cpc is.

Anything that matches no rule falls into catch-all buckets — "Referral" or "Unassigned" — which is where affiliate links without utm_medium=affiliate and untagged influencer links go to die (Paid Media World). Draw your utm_medium values from the set GA4 already knows (cpc, email, social, affiliate, referral, display) and channel grouping works by construction.

One more note for stores on Shopify: it runs its own attribution — last non-direct click over a 30-day window — and parses your UTMs separately from GA4 (WeltPixel). Untagged paid links are exactly what turn paid orders into "Direct" rows there too.

The privacy layer — why UTMs matter more now, not less

A lot of operators think tracking broke and UTMs are obsolete. It's the reverse.

In September 2023, iOS 17 Link Tracking Protection began stripping user-level click IDs — fbclid, gclid, and similar — from links opened in Apple Mail, Messages, and Safari Private Browsing. UTM parameters are not stripped, because they identify campaigns, not individuals (Klaviyo). Manual UTMs became the durable layer precisely when click IDs became the fragile one.

Safari's tracking prevention compounds it: cookies set by JavaScript are capped at seven days (Stape). A Safari shopper who clicks an ad and buys on day nine looks like a brand-new Direct visitor. That matters because Safari is roughly fifty-five percent of US mobile sessions (Backlinko) — not an edge case for a US-audience store.

The takeaway: disciplined UTMs are your redundancy layer. They carry source information the click ID no longer can.

A worked example: tagged vs untagged

Say you run 340 orders a month at a $31 average order value, with $2,800/month in Meta spend. Product cost from Printify is $12, and payment plus transaction fees run about $1.20 an order.

Of those 340 orders, 180 came from paid social. Tagged correctly, GA4 and Shopify both show 180 Paid Social orders, and you can do the math:

  • Ad cost per paid order: $2,800 ÷ 180 = $15.56
  • Per-order profit on paid: $31 − $12 − $1.20 − $15.56 = $2.24

Thin, but positive — and now you know it. Untagged, those 180 orders scatter into Direct and Unassigned. Your $2,800 looks like it bought almost nothing, and your "best" channel becomes a mystery Direct pile. Same orders, same revenue — the only difference is whether you tagged the link. The arithmetic only works when the source survives the click.

From clicks to profit

GA4 tells you where sessions came from. It can't tell you what each order earned — Shopify doesn't even ingest ad spend, so you can't compute ROAS inside native Shopify reports on any plan (Polar Analytics). That's the gap between a clean UTM setup and an actual profit number.

PodVector AI closes it. Victor is an AI employee who connects your Shopify store, Meta Ads, Google Ads, Printify, Printful, Gelato, and Klaviyo. He computes true per-order profit — seeing every order, every ad dollar, and every supplier cost together — then acts on it: Victor pauses the losing ad set, shifts budget to the paid campaign that's actually clearing margin, and reprices the thin SKUs. He drafts your customer-support email and delivers the reports to Google Drive.

Victor is not a dashboard you read. He's the operator who takes your clean UTM data and the margin underneath it and moves money. Put Victor to work on your store.

If email is a real channel for you, apply the same tagging discipline to your flows — here's exactly how UTM tracking works in Klaviyo.

FAQs

Which UTM parameters are required?

Three: utm_source, utm_medium, and utm_campaign. Google explicitly recommends always using all three (Google Analytics Help); omit one and GA4 reports "(not set)" for that field. utm_content and utm_term are optional and useful for splitting creatives or keywords.

Why does my paid traffic show up as Direct in GA4?

Usually one of three things: the link was never tagged, the tag used a value GA4 doesn't recognize (case mismatch, or paid instead of cpc), or a Safari/iOS privacy layer stripped the click ID and let the cookie expire (Stape). Fix the tagging first — it's free and mechanical — before assuming it's a measurement mystery.

Did iOS 17 kill UTM tracking?

No — the opposite. Link Tracking Protection strips click IDs like fbclid and gclid in Apple contexts, but leaves UTM parameters intact (Klaviyo). That makes manual UTM tagging more valuable, because it's the source signal that survives.

Never. Internal UTMs restart the session and overwrite the real source that brought the visitor in (utm.io). UTMs belong only on external links pointing into your store.

How many conversions do I need before GA4's data-driven model is reliable?

A commonly cited practitioner threshold is around three hundred or more conversions a month before data-driven attribution output stabilizes (ReferralCandy). Below that, its fractional credit splits wobble with noise — clean UTMs matter even more when the model has less to learn from.

What if GA4, Shopify, and Meta all disagree on a channel?

They will, because each asks a different question of the same order. Fix your UTMs first to eliminate self-inflicted gaps, then give each tool one honest job — Shopify for order and revenue counts, GA4 for journey shape, platform dashboards for in-channel comparison. Our attribution and tracking guide walks through reconciling the numbers.