UTM Campaign Tracking: How to Create Trackable URLs
Learn how UTM parameters work, how to create trackable campaign URLs, and how to use UTM links with QR codes and Google Analytics.
UTM campaign tracking is a method of attaching standardized query parameters (utm_source, utm_medium, utm_campaign, utm_term, and utm_content) to a destination URL so web analytics tools can accurately identify where your website traffic came from and which marketing effort drove each visit.
Without UTM parameters, analytics platforms like Google Analytics 4 (GA4) cannot distinguish between an email newsletter click, a social media ad, an influencer link, or a scanned flyer, commonly grouping them into vague 'Direct' or generic 'Referral' traffic. By appending UTM tags, you give every link an explicit attribution identity.
Generate GA4-compliant campaign tracking URLs with automatic lowercasing, custom query tags, and a 1-click bridge to QR codes.
What Is a UTM Parameter?
A UTM parameter is a specialized key-value tag appended to the end of a web address (URL) after a question mark (?) delimiter. Originally created by Urchin Software for the Urchin Tracking Module—which Google acquired in 2005 to form the foundation of Google Analytics—UTM parameters remain the universal standard for digital marketing attribution across almost all analytics engines.
When a visitor clicks a tagged link or scans a promotional QR code, the web browser loads the destination page with the query string intact. Client-side tracking scripts (such as Google tag gtag.js, Plausible, or Mixpanel) read these parameters from window.location.search and attribute the visitor's session, pageviews, and eventual conversions to the exact campaign, medium, and channel that brought them. Marketers can build and test these tagged URLs in browser RAM with our free campaign code generator & UTM builder.
Crucially, UTM parameters do not track users across websites, drop third-party surveillance cookies, or record personal data on their own. They are simply passive text labels that provide context to your destination website's analytics software about how the link was discovered.
The 5 Core UTM Parameters Explained
Google Analytics 4 defines five primary UTM parameters to classify incoming marketing traffic. While only source, medium, and campaign are standard requirements for campaign reporting, term and content provide deeper granularity for paid ads and creative testing.
| Parameter | What It Identifies | GA4 Status | Example Value | When to Use |
|---|---|---|---|---|
utm_source | The specific platform, publisher, or vendor sending traffic | Recommended | google, newsletter, linkedin, flyer | Always required to identify where the traffic originated. |
utm_medium | The high-level marketing channel or transmission format | Recommended | cpc, email, social, paid_social, qr_code | Always required for GA4 Default Channel Grouping. |
utm_campaign | The specific marketing initiative, promo, or product launch | Recommended | spring_launch_2026, black_friday, rebrand | Use for any organized promotion or release to group data. |
utm_term | The specific search keyword or target audience segment | Optional | pdf_compressor, running_shoes, b2b_saas | Paid search keyword ads without automated tracking tags. |
utm_content | The specific creative, ad variation, or CTA placement | Optional | hero_cta_v1, footer_link, blue_banner_300x250 | A/B testing ad variations or multiple links pointing to the same page. |
In addition to these five classics, modern GA4 documentation also supports utm_id (campaign ID), utm_source_platform (buying platform like DV360 or SA360), utm_creative_format, and utm_marketing_tactic.
How UTM Campaign Tracking Works
To use UTM parameters effectively, it helps to understand the exact technical sequence that occurs when someone clicks a tagged link:
URL Tagging
You compile a clean destination URL with UTM query parameters appended using the ? separator and & parameter connectors.
User Action (Click or Scan)
A prospect clicks the link inside an email, clicks a sponsored social ad, or scans a printed QR code with their mobile camera.
Destination Request
The browser requests the destination URL from your web server, transmitting the complete query string along with the request.
Client-Side Analytics Extraction
As your webpage loads, analytics libraries (like Google tag gtag.js) parse window.location.search, extract the UTM key-value pairs, and assign them to the visitor's active session.
Reporting & Conversion Attribution
When the visitor signs up, downloads a resource, or completes a purchase, your analytics dashboard attributes the event back to the original source, medium, and campaign.
A UTM parameter does not record clicks by itself. UTMs are simply text in a URL. If a visitor clicks a link but closes the tab before the page's analytics script finishes executing, no session or attribution is recorded. Conversely, server-side dynamic short links record raw clicks or scans immediately upon redirect.
How to Create a UTM Tracking URL
Building campaign URLs by hand in a text editor frequently results in syntax errors like missing ampersands, unencoded spaces, or misplaced question marks. Follow this six-step procedure:
Enter the Canonical Destination URL
Specify the exact landing page URL (e.g. https://modifyle.com/pricing). Always verify that the link opens directly without an HTTP 301/302 redirect that might strip query parameters.
Define the Campaign Source (utm_source)
Identify the referrer or platform sending the traffic. Common examples include newsletter, google, facebook, linkedin, or offline_flyer.
Select the Campaign Medium (utm_medium)
Specify the delivery channel format. Use GA4-aligned standard values such as cpc, email, social, paid_social, or qr_code.
Name Your Campaign (utm_campaign)
Name the specific initiative, seasonal promotion, or content drop (e.g. spring_launch_2026). Keep it concise, memorable, and standardized across your team.
Optionally Add Term and Content Tags
Use utm_term to track target keywords or audience personas. Use utm_content to differentiate two CTA buttons in the same newsletter or two creative variations in an A/B test.
Validate and Test the Output URL
Copy the generated link and paste it into a private/incognito browser window. Verify that the landing page loads cleanly and that all query parameters persist in the address bar. If you need to inspect or debug encoded query parameters, use our URL Parser & Query Inspector.
Generate GA4-compliant campaign URLs with automatic lowercasing and 1-click bridge to QR codes.
Real-World UTM Campaign Examples
Here are five realistic examples illustrating how UTM parameters should be structured across different marketing channels. Notice how each example uses clean lowercase strings and standardized separators:
These examples demonstrate standard industry conventions. While values like utm_source=event_flyer are arbitrary, your team should maintain consistent naming patterns across all active campaigns.
UTM Source vs. Medium vs. Campaign
The most common point of confusion for marketers is distinguishing between utm_source, utm_medium, and utm_campaign. Here is the simplest mental framework to remember:
- utm_source = Where the traffic comes from. This is the entity, platform, or referrer driving the visit (e.g.
google,reddit,substack,print_flyer). - utm_medium = How the traffic reaches your site. This is the overarching marketing vehicle or transmission method (e.g.
cpc,paid_social,social,email,qr_code). - utm_campaign = Why the traffic was sent. This is the specific promotional initiative, product milestone, or seasonal project (e.g.
q1_launch,black_friday_2026).
If you promote the same initiative across multiple platforms, the utm_campaign value remains identical (e.g. utm_campaign=summer_sale), while the utm_source and utm_medium change to reflect each distinct traffic driver (e.g. newsletter / email vs. facebook / paid_social).
How to Create a Trackable QR Code with UTM Parameters
Connecting offline marketing assets—such as business cards, restaurant menus, product packaging, event booths, and direct mailers—to digital analytics requires bridging UTM URLs into scannable QR codes.
When a smartphone scans an untagged printed QR code, the mobile operating system opens the default browser without an HTTP Referer header. Google Analytics 4 classifies these visits as 'Direct / (none)', blinding marketing teams to their physical advertising return on investment.
By tagging the destination URL with campaign tags (such as utm_source=print_catalog, utm_medium=qr_code, and utm_campaign=fall_catalog_2026), incoming visits from scanned codes can be distinguished from untracked direct traffic in GA4 Traffic Acquisition reports.
- Scan Analytics vs. Web Attribution: UTM parameters track website session attribution, not physical QR scan counts. If a user scans a printed code but closes the browser prompt before the webpage finishes loading, only a dynamic QR code redirect server can log the scan event.
- Print-Ready Export Formats: For brochures and billboards, export your QR code as scalable vector SVG. For digital screens and business cards, export as high-resolution PNG (1024×1024) with a guaranteed 4-module quiet zone.
- Detailed QR Tutorial: For complete technical instructions on error correction levels, quiet zones, and SVG print exports, see our comprehensive guide to creating trackable QR codes with UTM parameters. You can also generate high-resolution print codes directly with the Modifyle QR Code Studio.
Every additional character in a URL increases the data matrix complexity of a QR code. A 20-character URL generates a clean Version 2 matrix with large modules. A 160-character URL with multiple UTM tags creates a dense Version 8 matrix that budget smartphone cameras struggle to read in poor lighting. To avoid scan failures, shorten long UTM URLs into clean redirect links (such as /s/[code]) or keep your UTM parameter values concise before generating the QR code.
UTM Naming Conventions and Best Practices
Without disciplined naming conventions, campaign reporting quickly fragments. Follow these core best practices:
Enforce Strict Lowercase Across All Tags
Google Analytics 4 is case-sensitive. If you use utm_source=LinkedIn on one link and utm_source=linkedin on another, GA4 treats them as two completely separate traffic sources. Always use lowercase.
Standardize Word Delimiters (Hyphens or Underscores)
Spaces in URLs convert into awkward %20 hex codes and often break when copied into chat apps or email clients. Choose either hyphens (summer-sale-2026) or underscores (summer_sale_2026) and maintain that standard company-wide.
Align Medium with GA4 Default Channel Groups
Google Analytics 4 uses predefined rules to categorize traffic into Default Channel Groups. Setting utm_medium=paid_social categorizes visits under 'Paid Social', whereas arbitrary terms like utm_medium=ad_blast land in 'Unassigned'.
Maintain a Central Team Naming Registry
Keep a shared tracking spreadsheet or taxonomy document so marketing, sales, and design teams do not invent competing aliases (such as fb vs. facebook, or newsletter vs. email).
Never Include Sensitive Personal Information (PII)
Never pass email addresses, telephone numbers, customer names, or user IDs into UTM parameters. Doing so violates Google Analytics Terms of Service and data privacy regulations like GDPR and CCPA.
10 Common UTM Tracking Mistakes to Avoid
Avoid these frequent implementation mistakes that corrupt digital marketing analytics:
- Missing utm_source: Without a source, analytics platforms cannot determine where the visitor came from, frequently dumping the visit into Unassigned or Direct.
- Inconsistent Capitalization: Mixing
Email,email, andEMAILcreates three fragmented reporting rows in your GA4 dashboards. Modifyle's free UTM builder automatically enforces lowercase values to protect reporting integrity. - Tagging Internal Website Links: Never use UTM parameters on internal navigation (e.g. from your homepage banner to your pricing page). Clicking an internally tagged link resets the session, replaces the original acquisition channel with your own domain, and artificially inflates session counts.
- Fragmenting Campaign Names: Using
spring_promo,spring-promo, andspring2026for the same initiative prevents clean aggregated reporting. - Manual Syntax Errors: Forgetting the initial
?, using multiple question marks, or omitting&between parameters breaks the query string. Constructing links with an automated campaign URL generator eliminates manual formatting errors. - Misplacing Anchor Hashes (#): Placing an anchor fragment before query parameters (e.g.
example.com/#pricing?utm_source=...) causes browsers to treat the UTMs as part of the fragment, completely hiding them from analytics scripts. The correct order isexample.com/pricing?utm_source=...#features. - Forgetting to Test Final Redirects: Many web servers redirect
http://tohttps://or non-www to www, silently dropping all query strings in the 301 redirect. Always test that destination pages preserve query parameters, or inspect them using our URL parser. - Unencoded Characters & Spaces: Raw spaces and special characters can break links when shared via email clients or messaging apps.
- Confusing UTMs with Tracking Pixels: UTMs are purely text query strings. If your destination website does not have an analytics tracking snippet (like
gtag.js) installed, UTM parameters do nothing. - Overcrowding Printed QR Codes: Encoding massive 200-character UTM URLs into small printed QR codes makes them dense and unscannable on budget smartphone cameras. For physical print materials, follow our step-by-step trackable QR code guide or shorten long links with dynamic redirection.
UTM Parameters and Google Analytics 4 (GA4)
Understanding how Google Analytics 4 processes incoming UTM parameters ensures you can find and interpret your campaign data accurately. GA4 maps incoming URL query parameters directly to both session-scoped and user-scoped attribution dimensions:
utm_sourcemaps to Session source and First user sourceutm_mediummaps to Session medium and First user mediumutm_campaignmaps to Session campaign and First user campaignutm_termmaps to Session manual termutm_contentmaps to Session manual ad content
Navigate to Reports > Acquisition > Traffic acquisition. Set the primary dimension dropdown to 'Session source / medium' or 'Session campaign'. You can also click the '+' button to add secondary dimensions (such as Landing page) for deeper granular conversion analysis.
When Should You Use UTM Parameters (and When Not To)?
UTM parameters provide immense attribution value, but they are not suitable for every link on the web. Use this quick reference guide:
| Marketing Scenario | Use UTM Parameters? | Explanation |
|---|---|---|
| Paid Ads (Meta, LinkedIn, TikTok) | Yes (Essential) | Ensures paid traffic is accurately separated from organic visits and credited to specific ad creatives. |
| Email Newsletters & Drips | Yes (Essential) | Email clients do not transmit HTTP referrers; without UTMs, email traffic appears as generic Direct traffic. |
| Offline QR Codes & Flyers | Yes (Essential) | Physical scans have no digital referrer; UTMs with utm_medium=qr_code are the only way to track print ROI. |
| Social Media Bio Links | Yes (Recommended) | Separates profile clicks from normal feed interactions. |
| Influencer & Affiliate Links | Yes (Recommended) | Enables precise reporting on specific partner conversions and referral performance. |
| Internal Website Navigation | No (Never) | Tags on your own menus or banners reset user sessions and destroy original acquisition attribution. |
| Organic Backlinks on Other Sites | No (Avoid) | Forcing external editorial links to carry UTMs can create duplicate content issues if canonical tags are not configured. |
| Sensitive & Transactional Links | No (Avoid) | Password resets, billing receipts, and account authentication links should never contain marketing query tags. |
Frequently Asked Questions
What is a UTM parameter?
What is the difference between UTM source, medium, and campaign?
How do I create a UTM tracking URL?
Do UTM parameters affect Google SEO rankings?
Can I use UTM parameters in a QR code?
Do UTM parameters track QR code scans directly?
How do I see UTM campaign data in Google Analytics 4?
Should UTM parameters be used on internal links?
Related Technical Guides
View all guidesRelated Modifyle Workshop Utilities
Compile GA4-compliant campaign URLs with automatic lowercasing and 1-click bridge to QR Studio.
Generate high-resolution PNG and vector SVG QR codes with logo support and error correction.
Create pre-filled WhatsApp click-to-chat QR codes for marketing campaigns.