All Tools View Categories Blog About Contact Privacy

The Complete Guide to UTM Parameters and Campaign Tracking

The Complete Guide to UTM Parameters and Campaign Tracking

Every marketing link — in an email, Instagram bio, QR code, YouTube description, or paid ad — is a chance to learn what drives traffic, leads, and revenue. Without tagging, that learning disappears: a click from an email appears as Direct / (none) in Google Analytics 4, a QR scan on a flyer is invisible, and the same summer_sale promotion run on email and Instagram can't be compared. UTM parameters — five small tags like utm_source=newsletter&utm_medium=email&utm_campaign=summer_sale appended to any URL — make every click attributable by telling GA4 and other platforms exactly where the click came from, on which channel, for which campaign, and which creative. One consistent convention, applied via a campaign URL builder, turns an untrackable Direct bucket into a precise source/medium/campaign/content funnel that proves ROI and guides budget.

This complete guide covers UTM parameters and campaign tracking A-to-Z — what the five UTM tags are per Google's Campaign URL Builder guide and the original Urchin Tracking Module (UTM), how tracking works from click to GA4, step-by-step creation with a UTM builder, naming conventions that keep GA4 clean, where the data appears in GA4 and other platforms, the common mistakes that fragment or lose tracking (tagging internal links, inconsistent case, shorteners that strip query), advanced cross-channel and offline tracking, governance at scale, and the FAQs that arise when UTM meets real campaigns — with references to GA4 Acquisition reports, GA4 Terms (no PII), Google Analytics, and the UTM Wikipedia history.

TL;DR — Quick Answer: UTM parameters are five query tags appended to any URL after ?utm_source (where: newsletter, google, instagram), utm_medium (channel: email, cpc, social), utm_campaign (promotion: summer_sale), utm_content (creative: hero_banner), and utm_term (keyword for ads). They tell GA4 to report Source/Medium, Campaign, and Content instead of Direct. Build a trackable URL by pasting the destination into a UTM campaign URL builder, filling source, medium, campaign (and content/term as needed), and copying the tagged URL — the builder handles encoding, ? vs &, and fragments automatically, and GA4 shows the data in Acquisition → Traffic acquisition within hours (Realtime in seconds).
The complete guide to UTM parameters and campaign tracking - 5 tags for every channel

What Are UTM Parameters? — The 5 Tags

UTM (Urchin Tracking Module) parameters are five standardized query tags appended to a URL after ? and separated by &, created for Urchin (the predecessor to Google Analytics) and now the universal standard per Google's campaign URL guide and Wikipedia: UTM. GA4, Adobe Analytics, Mixpanel, and most platforms parse them automatically into acquisition dimensions without code.

What are UTM parameters - 5 tags source, medium, campaign, term and content

Example trackable URL for a summer sale email hero banner:

https://example.com/summer-sale?utm_source=newsletter&utm_medium=email&utm_campaign=summer_sale&utm_content=hero_banner&utm_term=running+shoes
ParameterPurpose (What It Answers)Example ValuesRequired?GA4 Dimension
utm_sourceWhere did the click come from? (origin)newsletter, google, instagram, qr, youtube, newsletterYesSession source
utm_mediumOn which marketing channel?email, cpc, social, organic, offlineYesSession medium
utm_campaignWhich promotion or campaign?summer_sale, fall_launch, welcome_seriesYesSession campaign
utm_contentWhich creative, link, or variant?hero_banner, cta_blue, footer, video_thumbnailRecommendedSession manual ad content
utm_termWhich keyword (paid search)?running+shoes, best+running+shoesAds onlySession manual term

How the URL is built: Base URL + ? + first tag + & + next tag — e.g., https://example.com/sale + ? + utm_source=newsletter + & + utm_medium=email + & + utm_campaign=summer_sale. If the base already has a query (?ref=newsletter), the builder appends with &, not a second ??ref=newsletter&utm_source=newsletter.... If the URL has a fragment (#section), UTM goes before it: /page?utm_source=email#section, not after. The builder handles encoding (space → %20, & in values → %26), lowercasing, and PII checks automatically.

How Campaign Tracking Works — From UTM Click to GA4 Report

When a user clicks a UTM-tagged link, the browser requests the URL with the query string. GA4's JavaScript (gtag.js) or Measurement Protocol reads the utm_ parameters from window.location.search on the landing page and stores them as session acquisition dimensions. Per GA4: Traffic acquisition, the mapping is utm_source → Session source, utm_medium → Session medium, utm_campaign → Session campaign, utm_content → Session manual ad content, and utm_term → Session manual term, which combine into Session source/medium and Session campaign for reporting.

How campaign tracking works from UTM click to GA4 report

Without vs With UTM — The Attribution Gap

ScenarioLinkGA4 ShowsResult
Without UTM (plain URL)https://example.com/saleSource: (direct) / (none) or referrer1,200 email clicks → counted as Direct — ROI invisible
With UTM (tagged)https://example.com/sale?utm_source=newsletter&utm_medium=email&utm_campaign=summer_saleSource: newsletter / email, Campaign: summer_sale1,200 clicks → 2,400 sessions → 72 conversions → $8,900 revenue — attributable

The same summer_sale campaign run on email (newsletter/email), Instagram (instagram/social), Google Ads (google/cpc), and a QR code on a flyer (qr/offline) appears as one campaign in GA4 with a channel breakdown, enabling comparison: which channel drove the most revenue per session? Without UTM, all four would be split between Direct, Referral, and unassigned, and the answer would be impossible.

Where the Data Appears in GA4

  • Realtime (seconds): Reports → Realtime → Event count by Session source/medium — a tagged click appears within seconds, useful for QA before the campaign goes live.
  • Acquisition → Traffic acquisition (hours): Session source/medium and Session campaign with Sessions, Engaged sessions, Conversions, and Total revenue — the primary ROI view.
  • Acquisition → User acquisition: First user source/medium/campaign for new users — useful for acquisition vs retention.
  • Explorations → Free form: Custom table with Source, Medium, Campaign, Content, and Term as dimensions plus any metric — for the full 5-tag view.

The same tags flow to BigQuery export (traffic_source.source/medium/name) and to Looker Studio, so the campaign report can be built once and reused.

How to Create a Trackable Campaign URL — Step-by-Step with a Builder

UTM builder workflow - paste destination, fill UTM and copy trackable URL
  1. Paste the destination URL: The page the click should land on — e.g., https://example.com/summer-sale or a product page with an existing query like https://example.com/sale?ref=newsletter. The builder detects existing queries and fragments and shows the live preview of the final URL as you type, so the ? vs & and # placement are visible.
  2. Fill the UTM fields:
    • utm_source — where: newsletter, google, instagram, qr, youtube — the origin. For email, "newsletter" or "email" is common; pick one and use it consistently.
    • utm_medium — channel type: email, cpc, social, organic, offline, referral — one per channel, not per campaign. All email sends are email, not "newsletter" for one and "email" for another.
    • utm_campaign — promotion: summer_sale, fall_launch, welcome_series, abandoned_cart — one per promotion, shared across channels for that promo (summer_sale on email and Instagram → one campaign, channel split).
    • utm_content — creative or link variant: hero_banner, cta_blue, footer, video_thumbnail — which link inside the email or which ad creative. This is how A/B tests are measured: cta_blue vs cta_green with the same campaign.
    • utm_term — keyword for paid search: running+shoes — only for Google Ads / Bing Ads keyword-level tracking; usually not for email or social.
  3. Copy and test the trackable URL: The full URL — e.g., https://example.com/summer-sale?utm_source=newsletter&utm_medium=email&utm_campaign=summer_sale&utm_content=hero_banner — is ready for the email button, ad, bio link, or QR code. Click it in an incognito window and check GA4 Realtime for the source/medium/campaign within seconds (the builder's preview also validates lowercase, no spaces, no PII, and URL length under 2,000 characters). For QR codes, generate the QR from the trackable URL; for short links, tag the destination first, then shorten, and verify the short link preserves the query (test by expanding it).

Builder handles the tedious parts: encoding (space → %20, & in values → %26), lowercasing, trimming, and validation — no manual encodeURIComponent or ? vs & logic. Paste, fill, copy, test in Realtime — 15 seconds.

UTM Naming Conventions — Keeping GA4 Clean at Scale

UTM naming conventions - keep GA4 clean with lowercase and taxonomy

Why Naming Matters — GA4 Is Case- and Space-Sensitive

GA4 treats summer_sale, Summer_Sale, and summer sale as three different campaigns — they never reconcile without manual merging in BigQuery or a filtered view. The same applies to Email vs email for source/medium. One inconsistent send can fragment a campaign that should be one row into many, making year-over-year comparison impossible and inflating the campaign count with duplicates. The builder enforces lowercase, no spaces, and no PII to prevent this at creation time.

Recommended Taxonomy (Document Once, Use Everywhere)

DimensionConventionExample GoodExample Bad (Fragments)
utm_campaignLowercase, _ or - consistently, one per promotionsummer_saleSummer Sale, summer-sale (mixed), Summer_Sale
utm_sourceWhere the click came from (origin)newsletter, instagram, googleNewsletter, Instagram (capitalized)
utm_mediumChannel type, one per channelemail, cpc, socialEmail, email_newsletter (mixing)
utm_contentCreative or link positionhero_banner, cta_blueHero Banner (spaces)
utm_termKeyword (paid)running+shoesRunning Shoes (spaces, caps)

Rules: lowercase only (choose summer_sale or summer-sale and use one team-wide), no spaces (space becomes %20 and fragments), no PII (don't put anna@example.com in UTM — it violates GA4 Terms: PII and is unnecessary), and URL under 2,000 characters (some browsers and email clients truncate long URLs).

Documentation: Keep a single taxonomy sheet — Campaign | Source | Medium | Content | Owner — and have the team pick from the list, not invent. The builder can enforce the list via presets: pre-fill utm_source=newsletter, utm_medium=email for email sends so only utm_campaign and utm_content vary. This prevents the "summer sale" vs "summer_sale" drift that otherwise happens by month three.

Common Mistakes That Break Campaign Tracking

Common UTM mistakes - internal links, inconsistent naming and shorteners

1. Tagging Internal Links (The Silent Overwriter)

Adding UTM to internal navigation — e.g., a homepage banner linking to /sale?utm_source=homepage — overwrites the original source. A user who arrived via an email click (newsletter/email) and then clicks the internal banner is re-attributed to homepage, and the email's session is lost. UTM is only for entry points from outside the site (email, ads, social, QR, offline). Internal links should be plain or use a non-UTM parameter that GA4 is configured to ignore. This is the most common UTM mistake and the hardest to detect because the data looks plausible but is wrong.

2. Inconsistent Naming (The Fragmenter)

summer_sale in the email and Summer_Sale in the Instagram ad → two campaigns in GA4 for one promotion, never reconciled without manual BigQuery merging. The same applies to email vs Email for medium and hero_banner vs Hero Banner for content. The fix is the taxonomy sheet plus builder presets that enforce lowercase and _.

3. Shortener or Redirect Strips the Query

Tagging https://example.com/sale then shortening to https://short.ly/abc with a shortener that does not preserve query parameters → the ?utm_ is lost and the scan is Direct. Always tag the destination URL first, then shorten, then test by expanding the short link and verifying the ?utm_ is still there. Most reputable shorteners (Bitly, Short.io) preserve query, but custom redirects must be configured to forward the query string ($1?$query_string in Nginx).

4. Auto-Tagging vs UTM Confusion (gclid, fbclid vs UTM)

Google Ads auto-tagging (gclid) and Facebook (fbclid) are platform-specific click IDs that feed their own platforms. UTM is universal — it works in GA4, Mixpanel, Amplitude, and any analytics that reads query params, and it is required for non-Google/Facebook channels (email, QR, offline). Use both: let Google auto-tag for Google Ads (and link the Google Ads account to GA4 for gclid → campaign mapping), and add UTM for everything — including Google Ads if cross-platform reporting is needed. Don't rely on gclid for email or QR; it won't be there.

5. PII in UTM (Terms Violation)

utm_content=anna@example.com or utm_term=john.doe puts personally identifiable information into GA4, which violates GA4 Terms and risks account suspension. Use anonymous content values like cta_blue, not email addresses. The builder flags values containing @ and email patterns.

Quick QA — Before Publishing Any UTM URL

CheckPassFail
Lowercase?summer_saleSummer_Sale
No spaces?summer_salesummer sale → %20
No PII?cta_blueanna@example.com
Not internal?Entry from email/ad/QRHomepage banner link
Test click → Realtime?Source/medium/campaign in seconds(direct) / (none)

Click the tagged link in an incognito window and check GA4 Realtime for the source/medium/campaign within seconds, and verify the short link retains the query. Three checks prevent 90% of UTM errors before the campaign goes live.

Advanced Campaign Tracking — Beyond Basic UTM

Advanced campaign tracking - cross-channel, offline and A/B testing

Cross-Channel: One Campaign, Many Channels

The same summer_sale campaign can be tracked across email (newsletter/email), Instagram (instagram/social), Google Ads (google/cpc), YouTube (youtube/social), and a QR code on a flyer (qr/offline) — each with a distinct source/medium but the same campaign. GA4's Traffic acquisition then shows one campaign row with a channel breakdown, enabling comparison: which channel drove the most revenue per session? Without a shared campaign name, the same promotion is split across five campaigns and the answer is impossible. The builder's campaign field should be the same string for all channels in that promo, while content distinguishes the creative (hero_banner vs video_thumbnail).

Offline → Online: QR and Print Attribution

QR codes on flyers, business cards, and event signage make offline attributable: the QR encodes the trackable URL with utm_source=qr&utm_medium=offline&utm_campaign=summer_sale. A scan is a click with source/medium/campaign just like an email click — previously invisible print becomes the top offline channel in GA4. Use qr or print as source and offline as medium consistently, and generate the QR from the already-tagged URL so the scan is tracked. This is why UTM builders and QR generators are paired: the UTM builder creates the trackable URL, the QR generator encodes it.

A/B Testing with utm_content

Same campaign and source/medium, different utm_content: utm_content=cta_blue vs utm_content=cta_green for two email variants, or hero_banner vs footer_link for two links in the same email. GA4's "Session manual ad content" dimension then shows cta_blue: 120 sessions, 12 conversions vs cta_green: 45 sessions, 3 conversions — the creative that won is clear without a separate A/B tool. For paid ads, utm_content can encode the ad variant ID for creative-level ROI.

Governance at Scale — Taxonomy, Validation, and Automation

At scale (dozens of campaigns, multiple teams), manual UTM entry fragments. Governance includes:

  • Taxonomy sheet: One canonical sheet — Campaign | Source | Medium | Content | Owner | Dates — where the team picks from dropdowns, not free text. The sheet is the source of truth for GA4 filters and Looker Studio dashboards.
  • Builder presets and validation: The builder enforces lowercase, no spaces, no PII, and URL length under 2,000 characters, and offers presets for common channels (email → newsletter/email, social → instagram/social). This prevents the Summer_Sale vs summer_sale drift that otherwise happens by month three.
  • Shorten after tagging: Tag the destination first, then shorten with Bitly or Short.io, and verify the short link preserves the query string — test by expanding it. If the shortener or redirect strips the query (RewriteRule ^/sale$ /sale [R=301] without QSA), attribution is lost.
  • Don't tag internal links: Internal navigation should be plain or use a non-UTM parameter that GA4 is configured to ignore via the referral exclusion or by not treating it as a campaign. Tagging internal links is the silent overwriter — an email click that then clicks an internal UTM link is re-attributed to the internal source.

UTM and Privacy — What Not to Put in UTM

Per GA4: Avoid sending PII, don't put email addresses, names, or other PII in UTM — e.g., utm_content=anna@example.com is a terms violation even if it would be convenient for per-recipient tracking. Use anonymous content values like cta_blue and rely on GA4's User-ID or Google Signals for cross-device, not UTM. The same applies to utm_term — don't put a user's search query containing PII; use a keyword ID instead. The builder flags email patterns and reminds that UTM is for campaign metadata, not user data.

FAQs About UTM Parameters and Campaign Tracking

What are UTM parameters?

Five query tags appended to any URL after ?utm_source (where), utm_medium (channel), utm_campaign (promotion), utm_content (creative), and utm_term (keyword) — that tell GA4 to report Source/Medium, Campaign, and Content instead of Direct. They are the standard per Google's campaign URL guide and Urchin history.

How do I create a trackable campaign URL without coding?

Paste the destination URL into a UTM campaign URL builder, fill source, medium, campaign, and optionally content/term, then copy the tagged URL. The builder handles encoding, ? vs &, fragments, and lowercase validation automatically — no manual query-string building.

What is the difference between utm_source and utm_medium?

utm_source is the specific origin (newsletter, google, instagram, qr), while utm_medium is the channel type (email, cpc, social, offline, referral). Together they form Session source/medium in GA4 (e.g., newsletter / email). Source is where; medium is what kind of where.

Should I use UTM for internal links on my own site?

No — internal UTM overwrites the original acquisition source and pollutes reports. An email click that then clicks an internal ?utm_source=homepage is re-attributed to homepage, losing the email credit. Use UTM only for links that bring users from outside the site (email, ads, social, QR, offline); for internal, use plain links or a non-UTM parameter that GA4 ignores.

Do UTM parameters affect SEO?

No — search engines treat UTM as analytics metadata and generally canonicalize to the clean URL (especially with proper canonical tags from the CMS). They do not create duplicate content issues when used correctly, and robots.txt does not need to block them. Don't use UTM on internal links, which is also the SEO reason.

How do I test a trackable URL before sharing?

Click it in an incognito window and check GA4 → Realtime for source/medium/campaign within seconds, then Traffic acquisition for the full row within hours. Verify the URL is lowercase, has no spaces, no PII, and — if shortened — that the short link retains the ?utm_ query when expanded.

Can I use UTM for QR codes and offline print?

Yes — encode the trackable URL in the QR. Use utm_source=qr and utm_medium=offline (or print) with the campaign name — e.g., utm_campaign=summer_sale. A scan is then a trackable click with offline attribution that was previously invisible, appearing in GA4 as qr / offline.

Conclusion

UTM parameters are the smallest change with the largest attribution return — five lowercase, no-spaces, no-PII tags that turn an untrackable Direct bucket into a precise source/medium/campaign/content/term funnel. One consistent, documented taxonomy per campaign, applied via a builder that handles encoding, query logic, and validation, makes every click — from an email, an Instagram bio, a paid ad, or a QR code on a flyer — attributable in the next GA4 report, comparable across channels, and safe from fragmentation.

Build the next campaign URL with a UTM builder — paste the destination, set the tags from the taxonomy sheet, and copy a trackable link that makes every click attributable, every channel comparable, and every budget decision data-driven.