analytics-tracking

How to Use UTM Parameters with QR Codes

Learn to add UTM parameters to QR code URLs for accurate campaign tracking in Google Analytics and other platforms.

SmartyTags TeamDecember 1, 202511 min read

The Attribution Problem QR Codes Create

You print 5,000 flyers with a QR code linking to your website. Over the next month, you see a bump in traffic to the landing page. Great. But when you open Google Analytics, those visitors show up as "direct" traffic, indistinguishable from someone who typed your URL into their browser or clicked a bookmark.

You have no idea how many of those visits came from the flyers versus other sources. You cannot calculate the ROI of the print campaign. You cannot compare it to your email campaign or your social media ads. The QR code worked, but you cannot prove it, and you cannot learn from it.

UTM parameters solve this problem. They are tags you add to the end of a URL that tell your analytics platform exactly where a visitor came from, which campaign brought them, and what medium delivered them. When combined with QR codes, they turn every scan into a tracked, attributable event.

This guide explains how UTM parameters work, how to construct them correctly for QR code campaigns, and how to use the resulting data to make better decisions.

What UTM Parameters Are

UTM stands for Urchin Tracking Module (named after Urchin Software, which Google acquired and turned into Google Analytics). UTM parameters are key-value pairs appended to a URL as query strings. They do not affect where the URL goes. They only add metadata that analytics platforms read and categorize.

There are five standard UTM parameters:

utm_source (Required)

Identifies where the traffic comes from. For QR codes, this is typically the physical location or material where the code appears.

Examples: utm_source=flyer, utm_source=business_card, utm_source=product_packaging, utm_source=tradeshow_booth

utm_medium (Required)

Identifies the marketing medium or channel. For QR codes, this is almost always "qr" or "qr_code" to distinguish it from other channels like email, social, or paid search.

Examples: utm_medium=qr, utm_medium=qr_code, utm_medium=print

utm_campaign (Required)

Identifies the specific campaign, promotion, or initiative. This is how you group related marketing efforts.

Examples: utm_campaign=spring_sale_2026, utm_campaign=product_launch_v2, utm_campaign=annual_fundraiser

utm_term (Optional)

Originally designed for paid search keywords. For QR codes, it can be used to track specific targeting or audience segments.

Examples: utm_term=existing_customers, utm_term=new_prospects, utm_term=vip_donors

utm_content (Optional)

Differentiates between variations of the same campaign. This is invaluable for A/B testing different QR code placements, designs, or calls to action.

Examples: utm_content=front_page, utm_content=back_page, utm_content=blue_design, utm_content=red_design

Constructing a UTM-Tagged URL for a QR Code

Start with your destination URL, add a question mark, then add each UTM parameter as key=value pairs separated by ampersands.

Base URL:

https://smartytags.com/features

With UTM parameters:

https://smartytags.com/features?utm_source=conference_flyer&utm_medium=qr&utm_campaign=saastr_2026&utm_content=booth_display

When someone scans the QR code and arrives at this URL, Google Analytics (or any UTM-aware analytics platform) automatically categorizes the visit with:

  • Source: conference_flyer
  • Medium: qr
  • Campaign: saastr_2026
  • Content: booth_display

URL Construction Rules

Use lowercase for all parameter values. Google Analytics treats "QR" and "qr" as different values. Standardize on lowercase to avoid splitting your data.

Use underscores or hyphens instead of spaces. Spaces in URLs get encoded as %20, which makes your data messy. Use spring_sale instead of spring sale.

Keep values descriptive but concise. You will read these in reports months later. utm_source=q4_mailer is more useful than utm_source=m1.

Do not use special characters. Stick to letters, numbers, underscores, and hyphens. Special characters can break URL encoding.

Using Google's Campaign URL Builder

Google provides a free tool at https://ga-dev-tools.google/campaign-url-builder/ that constructs UTM-tagged URLs for you. Enter your base URL and fill in the parameter fields, and it generates the complete URL. This is the easiest way to avoid formatting errors.

QR Codes and Long URLs: The Length Problem

Here is the practical issue: UTM parameters make URLs long. A URL with all five UTM parameters can easily exceed 150 characters. Long URLs produce QR codes with more modules (more small squares), which makes the codes physically larger and harder to scan.

The solution: use dynamic QR codes.

A dynamic QR code from SmartyTags encodes a short redirect URL (under 30 characters). The redirect destination can be a URL of any length, including one loaded with UTM parameters. You get a compact, easy-to-scan code while preserving full UTM tracking.

This is not just a convenience. It is almost a requirement. Encoding a 200-character UTM-tagged URL directly into a static QR code produces a code that is difficult to scan at small sizes. A dynamic code eliminates this problem entirely.

Create a free QR code with a dynamic redirect to see how it works.

Setting Up a UTM Naming Convention

Before creating your first UTM-tagged QR code, establish a naming convention. Inconsistent UTM values are the number one cause of messy analytics data. If one team member uses utm_medium=qr and another uses utm_medium=QR_code and a third uses utm_medium=print, your data fragments across three medium categories.

ParameterConventionExamples
utm_sourcePhysical material or location, lowercase, underscoresflyer, business_card, product_label, store_window
utm_mediumAlways qr for QR code campaignsqr
utm_campaignCampaign name with date or identifierspring_sale_2026, product_launch_q1
utm_termAudience segment (optional)existing_customers, cold_leads
utm_contentVariation identifier for A/B testingversion_a, large_code, red_cta

Create a Tracking Spreadsheet

Maintain a shared spreadsheet or document that logs every UTM-tagged URL you create. Include:

  • The full UTM-tagged URL
  • The QR code it is associated with
  • Where the QR code is deployed
  • The campaign start and end dates
  • Who created it

This prevents duplicate or conflicting parameter values and gives you a reference when reviewing analytics data.

Reading UTM Data in Google Analytics

Google Analytics 4 (GA4)

In GA4, UTM data appears under several reports:

Traffic Acquisition report: Go to Reports > Acquisition > Traffic Acquisition. You will see sessions broken down by Session default channel group. QR code traffic tagged with utm_medium=qr will appear in the "Unassigned" channel unless you create a custom channel definition for QR.

To create a custom QR channel in GA4:

  1. Go to Admin > Data display > Channel groups
  2. Create a new channel group or edit the default
  3. Add a new channel called "QR Code"
  4. Set the condition: Source/Medium contains "qr"
  5. Save

Now all QR code traffic appears as its own channel in reports, which is exactly what you want.

Exploration reports: For deeper analysis, create an Exploration (Reports > Explore) and add dimensions for Session source, Session medium, Session campaign, and Session manual ad content. This gives you a fully detailed view of every QR code campaign.

Campaign-Level Analysis

To compare QR code campaigns against each other, filter by utm_medium=qr and then examine the campaign dimension. This shows you which QR code campaigns drive the most sessions, the best engagement, and the highest conversions.

For example, you might discover that QR codes on product packaging (utm_source=product_label) drive more conversions than codes on trade show flyers (utm_source=tradeshow_flyer), even though the flyer codes get more scans. That insight directly informs your marketing budget allocation.

Combining UTM Tracking with QR Code Platform Analytics

UTM parameters and QR code platform analytics (like the scan tracking in SmartyTags) complement each other. They are not redundant.

QR code platform analytics tell you:

  • Total scan count (including scans that did not result in a page load)
  • Scan timestamps and patterns
  • Device types and operating systems
  • Geographic location of scans

UTM data in Google Analytics tells you:

  • What users did after landing on your site (pages viewed, time on site, conversions)
  • How QR code traffic compares to other channels in engagement and conversion
  • Revenue or goal value attributed to QR code campaigns

Together, they give you the full funnel: how many people scanned, how many landed on the page, and what they did next.

Advanced: UTM Parameters for A/B Testing QR Codes

UTM parameters are the easiest way to run controlled A/B tests on QR codes. Here is how:

Test: Does QR code size affect scan-through rates?

Create two QR codes pointing to the same page but with different utm_content values:

  • Code A (2-inch): utm_content=2inch_code
  • Code B (4-inch): utm_content=4inch_code

Deploy both in comparable locations. After two weeks, compare sessions by content dimension in GA4. You now know whether code size affects not just scanning (which your QR platform tells you) but actual engagement and conversion.

Test: Does the call to action affect conversion?

  • Code A: CTA "Scan for 20% off" with utm_content=discount_cta
  • Code B: CTA "Scan to shop new arrivals" with utm_content=arrivals_cta

Same product, same placement, different messaging. UTM data reveals which CTA drives not just scans but purchases.

For more on structuring these tests, read our full guide on QR code A/B testing.

Common UTM Mistakes with QR Codes

UTM parameters should only be used on links that bring traffic to your site from external sources. If you use UTM-tagged URLs for internal links (like navigating between pages on your own site), you overwrite the original source attribution. The visitor who came from a QR code scan will now appear to have come from your internal link's UTM source.

Inconsistent Naming

As mentioned earlier, qr, QR, qr_code, and qrcode are four different values in analytics. Pick one and enforce it. Document the convention and share it with everyone who creates QR codes.

Forgetting to Tag

Every QR code that links to your website should have UTM parameters. If even one code lacks them, that traffic shows up as "direct" and pollutes your direct traffic channel. Make UTM tagging part of your QR code creation checklist, right alongside testing before printing.

Not Tracking Conversions

UTM data only reveals its full value when you have conversion goals set up in your analytics platform. If you are tracking scans but not tracking what happens next (purchases, sign-ups, donations, form submissions), you are missing the most important part of the story.

Using UTM Parameters with Non-Web Destinations

UTM parameters only work when the destination is a web page with analytics tracking. If your QR code links to a PDF file, an app store, a phone number, or a WiFi network, UTM parameters will not be captured. For non-web destinations, rely on your QR code platform's scan analytics instead.

A Real-World Example

A regional nonprofit runs a spring fundraising campaign across three channels: email, social media, and printed direct mail with QR codes. They want to know which channel produces the most donations.

Email link: https://example.org/donate?utm_source=newsletter&utm_medium=email&utm_campaign=spring_2026

Social media link: https://example.org/donate?utm_source=instagram&utm_medium=social&utm_campaign=spring_2026

QR code on direct mail: https://example.org/donate?utm_source=spring_mailer&utm_medium=qr&utm_campaign=spring_2026

The QR code is dynamic, so the full UTM-tagged URL does not affect its scannability.

After the campaign, the nonprofit opens GA4 and filters by campaign = spring_2026. They see:

  • Email: 450 sessions, 12% conversion rate, $8,400 in donations
  • Social: 1,200 sessions, 3% conversion rate, $5,400 in donations
  • QR: 180 sessions, 22% conversion rate, $7,920 in donations

The QR code had the fewest sessions but the highest conversion rate and nearly matched email in total donations. This tells the nonprofit that their direct mail audience is highly motivated and that investing more in QR code enabled print materials is likely worthwhile.

Without UTM parameters, all three channels would have been mixed into "direct" traffic, and this insight would have been invisible. For more nonprofit-specific strategies, see our guide on QR codes for nonprofits and fundraising.

Quick Setup Checklist

  1. Decide on a UTM naming convention (source, medium, campaign formats).
  2. Document the convention in a shared tracking spreadsheet.
  3. Build your UTM-tagged destination URL using Google's Campaign URL Builder.
  4. Create a dynamic QR code with SmartyTags pointing to the tagged URL.
  5. Verify UTM parameters are captured by checking the Real-Time report in GA4 after a test scan.
  6. Set up conversion goals in GA4 so you can measure downstream impact.
  7. Review campaign data weekly during the campaign and summarize findings when it ends.

The Bottom Line

UTM parameters are free, take two minutes to set up, and transform your QR code campaigns from "I think it worked" to "Here is exactly what it produced." If you are investing in any physical marketing that uses QR codes, skipping UTM tags is like running ads without conversion tracking. You are spending money but refusing to measure the results.

Check out the features on SmartyTags for dynamic QR codes with built-in scan analytics, and pair that with UTM tracking for full-funnel visibility. Review the pricing page to find a plan that fits your campaign volume, or just create a free QR code and start tagging today.

SmartyTags Team

Content Team

The SmartyTags team shares insights on QR code technology, marketing strategies, and best practices to help businesses bridge the physical and digital worlds.

Related Articles

Stay up to date

Get the latest QR code tips, guides, and product updates delivered to your inbox.

No spam. Unsubscribe at any time.