Key Takeaways

  • UTM parameters are five optional query strings appended to a URL (utm_source, utm_medium, utm_campaign, utm_term, utm_content). Google Analytics 4 reads them automatically and attributes sessions and conversions to the named campaign. The URL stays the same destination — only the tracking metadata changes.
  • Google's recommended naming convention: utm_source = referrer (google, newsletter, twitter); utm_medium = marketing channel (cpc, email, social, organic); utm_campaign = product/promo name (spring_sale); utm_term = paid keyword (running+shoes); utm_content = A/B variant (logo_link vs text_link).
  • UTM parameters are CASE-SENSITIVE for naming consistency but the values you enter get URL-encoded. Spaces become %20 (the builder converts them to underscores per industry convention). Lower-case + underscores reduce dashboard-fragmentation when teams share URLs.
  • GA4's Traffic Acquisition report groups by utm_source / utm_medium. The Campaigns report groups by utm_campaign. To see full attribution, set up custom dimensions in BigQuery export or use looker Studio dashboards over the GA4 BigQuery streaming export.
  • NEVER tag internal links with UTM parameters — this fragments session attribution in GA4 and inflates direct traffic-looking sessions. Only tag links going OUT to other domains (email, social, paid ads) or coming IN (QR codes, business cards).

UTM Builder: Tag URLs for Google Analytics 4 Campaign Attribution

UTM parameters are five optional query string parameters that you append to any URL to attribute traffic to a specific marketing campaign. Google Analytics 4 (GA4) reads them automatically and groups sessions, conversions, and revenue into the Acquisition → Traffic and Engagement → Campaigns reports. Without consistent UTM tagging across marketing channels (email, paid search, social, affiliate), GA4 cannot distinguish between brand search and paid search traffic, between your Spring Sale campaign and your Black Friday campaign, or between the logo-link and text-link variants in the same email blast. This free UTM builder outputs properly-encoded, naming-convention-compliant URLs ready to paste into email service providers, social posts, ad platforms, or QR codes.

Table of Contents

  1. What UTM Parameters Actually Are
  2. The Five Standard Parameters
  3. Naming Conventions That Scale
  4. How Google Analytics 4 Reads UTMs
  5. Common UTM Errors and How to Avoid Them
  6. Frequently Asked Questions

What UTM Parameters Actually Are

UTM stands for Urchin Tracking Module, named after Urchin Software — the analytics company Google acquired in 2005 that became the foundation for Google Analytics. UTM parameters are five standardized query string parameters defined in the urchin.js documentation that survive across all modern analytics platforms (GA4, Matomo, Adobe Analytics, Plausible, Fathom, Mixpanel).

When a user clicks a UTM-tagged URL, the destination site's analytics script reads the five parameters from window.location.search and attaches them to the session record. If the same user later converts (signs up, purchases), GA4 attributes the conversion to the original UTM source/medium/campaign. Without consistent UTM tagging, attribution defaults to (referrer) which loses granularity — a paid Facebook ad and an organic Facebook share look identical in the referrer-based report.

https://example.com/landing?utm_source=facebook&utm_medium=cpc&utm_campaign=spring_sale&utm_content=logo_v1

The destination URL is the same (https://example.com/landing). The UTM suffixes only add metadata that GA4 records.

The Five Standard Parameters

Parameter Required? Purpose Example values
utm_source Recommended Where the traffic comes from (referrer identifier) google, facebook, newsletter, producthunt
utm_medium Recommended Marketing channel / category cpc, email, social, organic, affiliate, qr
utm_campaign Recommended Specific promotion or product spring_sale, black_friday_2025, ebook_launch
utm_term Optional Paid keyword (mainly for Google Ads) running+shoes, project_management_software
utm_content Optional A/B test variant or content differentiation logo_link, text_link, hero_button, sidebar_cta

The first three (source, medium, campaign) are the foundation. The last two (term, content) provide additional granularity when needed:

  • utm_term is most useful for paid search campaigns to track which keyword triggered the ad. Google Ads auto-appends gclid (Google Click Identifier) so utm_term has largely become redundant for Google Ads traffic.
  • utm_content is most useful for A/B testing within the same campaign — different button colors, headlines, or placement performances against each other.

Tip: Spaces in UTM values are converted to underscores by the builder (per industry convention). The URL itself uses + for spaces but that conflicts with how many CMS platforms parse URLs. Underscores are the safest cross-platform convention.

Naming Conventions That Scale

The hardest UTM problem is consistency over time. A team that writes utm_source=Facebook in January and utm_source=facebook in March creates two entries in GA4's Traffic Acquisition report, fragmenting Facebook's true volume. Google's recommended conventions:

  • LOWER-CASE only. utm_source=facebook (lower), never Facebook or FACEBOOK.
  • Hyphens OR underscores, pick one and stick to it. _spring_sale_2025 OR -spring-sale-2025, not both.
  • No spaces in values (use _ or - instead). Spaces become %20 in URLs but %20 can be treated differently by analytics platforms.
  • Use <campaign>_<YYYY> for campaign names so they're sortable: spring_sale_2025, black_friday_2026.
  • No PII (personally identifiable information). UTM values are URL parameters; they go into referrer headers, log files, and may be exposed in third-party scripts.
GOOD:  utm_source=facebook&utm_medium=cpc&utm_campaign=spring_sale_2025&utm_content=hero_button_v1
BAD:   utm_source=Facebook&utm_medium=CPC&utm_campaign=Spring Sale&utm_content=hero button

The builder lower-cases the values you enter and replaces spaces with underscores (_) automatically so your URLs follow the convention even when humans enter inconsistent values in a hurry.

How Google Analytics 4 Reads UTMs

GA4 auto-detects UTM parameters from window.location.search and attaches them to the session record. The relevant reports are:

Acquisition → Traffic Acquisition: rows = (session source, session medium). The dimension is sessionSource (the utm_source if present, otherwise the document.referrer hostname). Useful for daily channel-breakdown dashboards.

Acquisition → User Acquisition: rows = (first user source, first user medium). The dimension is firstUserSource — the source from the user's first-ever session. Useful for measuring new-user volume per channel.

Engagement → Campaigns: rows = utm_campaign (visible only if you've sent at least one URL with utm_campaign populated). Drill into a campaign to see source/medium breakdown via the secondary dimension toggle.

For deeper attribution (e.g. multi-touch credit across email → paid search → direct → conversion), export GA4 events to BigQuery and query the event_params column for campaign, source, medium keys. BigQuery's UNNEST(event_params) clause reveals the UTM values as key-value pairs per event.

Formula callout: The session-level UTM attribution persists across the same session even if the user navigates internally. A user who lands via utm_source=facebook&utm_campaign=spring_sale and then clicks an internal navigation link does NOT trigger a new attribution — they remain attributed to the original campaign. This is GA4's "last non-direct click" model.

Common UTM Errors and How to Avoid Them

Error 1: Tagging internal links. A navigation link from your homepage to your pricing page should NEVER have utm_* parameters. Doing so creates self-referral sessions and inflates (source = your own domain) entries in GA4, distorting channel counts.

Error 2: Inconsistent case across teams. Marketing writes utm_source=Facebook while the agency writes utm_source=facebook. The builder enforces lower-case to prevent this.

Error 3: Encoding spaces with + instead of _. Many CMS platforms and ad networks treat + and %20 differently in URL params. Use underscores (_) consistently — the builder converts your spaces.

Error 4: Forgetting utm_medium. Without utm_medium, GA4 cannot distinguish paid search (utm_medium=cpc) from organic search (utm_medium=organic) even with utm_source=google set. Always include medium.

Error 5: Reusing the same utm_campaign for different products. A "spring_sale" campaign that promotes 3 product categories but uses the same utm_campaign=SPRING_SALE everywhere hides per-product performance. Use spring_sale_shoes, spring_sale_hats, spring_sale_bags if needed.

Error 6: Putting PII in UTM values. utm_source=user_48392 looks fine but exposes personal data via referrer logs, third-party scripts (Mixpanel, Hotjar), and potentially search-engine bot crawls. Never put names, emails, or user IDs in UTM values.

People Also Ask

GA4 auto-detects the five utm query parameters from the URL and stores them on the session record. They then surface in the Acquisition → Traffic Acquisition report (source/medium), Engagement → Campaigns report (campaign name), and via BigQuery export (eventparams). GA4 does NOT require any manual setup for UTM tagging to work.
Last updated: July 17, 2026