How to Track QR Codes with Google Analytics 4 UTM
QR codes have become an essential tool for connecting physical marketing materials to your digital world, but just using them isn't enough. If you’re not tracking who scans them and what they do next, you're missing out on crucial data. This article will show you exactly how to use Google Analytics 4 and UTM parameters to measure the real-world impact of every QR code you create.
Why Should You Track QR Codes?
Think of a QR code on a flyer, business card, or restaurant menu as a bridge. It connects someone in the physical world directly to your website or landing page. Without tracking, you see people appear on your site, but you have no idea they came from that specific flyer. It’s a marketing black box. When you track them, you turn that bridge into a smart bridge that gathers valuable data.
Tracking QR codes allows you to answer critical business questions, such as:
- Is This Working? Did anyone actually scan the code on the posters we put up for the fall festival?
- Which Location is Best? Are the QR codes on our in-store displays performing better than the ones on our takeout menus?
- What is the ROI? We spent money printing and distributing 5,000 postcards. Did that investment lead to any website visits, leads, or sales?
- How Do Users Behave? What do people who scan our codes do once they land on our site? Do they browse products, sign up for our newsletter, or leave immediately?
By tracking this activity, you move from guesswork to data-backed decisions. You can double down on the physical marketing efforts that work and stop wasting money on those that don’t.
UTM Parameters: Your QR Code Tracking Secret Weapon
The magic behind tracking QR codes - and any other digital marketing campaign - is a set of simple tags called Urchin Tracking Module (UTM) parameters. These are small snippets of text you add to the end of a URL. They don’t change where the link goes, but they carry valuable information over to Google Analytics, telling it precisely where that user came from.
There are five standard UTM parameters, but for QR code tracking, you'll mainly focus on three:
- utm_source: Identifies the specific source of the traffic. For a QR code, this is where you specify which QR code was scanned. For example,
fall_festival_posterorbusiness_card_front. - utm_medium: Identifies the marketing channel or medium. For physical materials, a good medium could be
print,physical, oroffline. A consistent medium helps you group all your physical marketing efforts together in GA4. - utm_campaign: Names the specific marketing campaign. This helps you compare performance across different promotions. For example,
august_promo_2024ornew_product_launch.
While less common for QR codes, the other two parameters can add even more detail:
- utm_content: Differentiates similar content within the same source. For example, if you have two QR codes on one poster, you could use
top_qr_codeandbottom_qr_codeto see which one gets more scans. - utm_term: Originally used for tracking paid keywords, it has more flexibility now. You could use it for any other differentiating detail if needed.
Using these tags consistently is what gives you clean, clear data in GA4.
How to Create a Trackable QR Code: A Step-by-Step Guide
Let's walk through creating a perfectly trackable QR code for a fictional coffee shop promoting a "Summer Brew" special on a flyer placed on its counter.
Step 1: Define Your URL and UTM Parameters
Before you build anything, decide on your destination and your tags. Being organized here is the most important step.
- Destination URL: The page you want people to land on after they scan the code. Don't just send them to your homepage. Create a specific landing page if possible. For our coffee shop, let’s use:
https://www.joescoffee.com/summer-brew - UTM Source (utm_source): This needs to be specific enough that you’ll know exactly which QR code was scanned. Let’s use:
in_store_flyer - UTM Medium (utm_medium): This is the general channel. Let’s use:
print - UTM Campaign (utm_campaign): Name the promotion. Let’s use:
summer_brew_special_2024
Step 2: Build Your Trackable URL
Now, you'll assemble these pieces into one complete URL. You can do this manually by adding a ? after your URL and then separating each parameter with an &.
The final trackable URL will look like this:
Manually creating URLs introduces the risk of typos. A misplaced character can break the whole link. To avoid errors, it's highly recommended to use Google's free Campaign URL Builder.
Simply enter your destination URL and fill in the fields for your campaign source, medium, and name. The tool will generate the final URL for you, ready to copy and paste.
Step 3: Generate Your QR Code
With your complete, UTM-tagged URL in hand, it's time to create the QR code. There are dozens of free QR code generators online (like QR Code Generator or Adobe's FreeQRCode Generator). The process is simple:
- Choose a QR code generator.
- Select "URL" or "Website" as the content type.
- Paste your full, trackable URL (the one with all the UTM parameters) into the field.
- Customize the design if you wish (e.g., add a logo, change colors), but keep it scannable.
- Download the QR code image file (usually as a PNG or SVG).
It's critical that you use the URL created in Step 2. If you only use https://www.joescoffee.com/summer-brew, no tracking data will pass to GA4.
Step 4: Test, Test, and Test Again!
This might be the most overlooked but essential step. Before you print 1,000 flyers or a giant banner, test the QR code thoroughly.
- Scan the QR code you just downloaded with your own phone.
- Check that it directs you to the correct landing page.
- Look at the URL in your phone's browser bar. Does it contain all the UTM parameters you added (
?utm_source=..., etc.)? - Log in to your Google Analytics 4 account and go to the Realtime report (under the Reports section). Within a minute or two, you should see your visit appear. Check the "Session source / medium" and "Session campaign" cards to confirm your visit was attributed correctly (e.g.,
in_store_flyer / print).
If everything looks correct in the real-time report, you can confidently send your code to print.
Where to Find Your QR Code Data in GA4
After your QR codes are out in the wild and getting scanned, where do you see the results? Your tagged traffic will flow seamlessly into your standard acquisition reports.
Here’s how to find it:
- In GA4, navigate to Reports > Acquisition > Traffic acquisition.
- The default primary dimension is "Session default channel grouping." Click the dropdown and change it to Session source / medium.
- You will now see a table of all the sources and mediums driving traffic to your site. You can use the search bar above the table to filter for the UTM source you used, like
in_store_flyer.
In this view, you'll see a row for each trackable QR code you created. You can analyze key metrics tied directly to those scans:
- Users and Sessions: The raw number of people who scanned the code and the visits they generated.
- Engaged sessions: How many of those visits resulted in meaningful interaction (e.g., lasted over 10 seconds, had a conversion event, or had 2 pageviews).
- Conversions: Most importantly, you can see if the traffic from a specific QR code led to any of your key business goals, like a purchase, a form submission, or a lead.
By using the "Session campaign" primary dimension, you can also analyze the performance of your entire campaign across multiple QR codes.
Best Practices for QR Code Tracking
To keep your data clean and get the most accurate insights, follow a few simple rules.
- Be Consistent: GA4 is case-sensitive.
Print,print, andPrint-Adwill all show up as separate mediums in your reports. Establish a clear naming convention (e.g., all lowercase, use underscores instead of spaces) and stick to it for every link you create. - Be Specific But Clear: Name your sources specifically enough that you - or anyone on your team - can understand them six months from now. Instead of just
qr_code, useevent_booth_banner. This small effort provides much richer context. - Keep a Log: Create a simple spreadsheet (in Google Sheets or Excel) to document every trackable URL you build. Record the date, the destination URL, and each UTM parameter. This prevents confusion, avoids duplicate work, and makes your naming convention easy to follow.
Final Thoughts
Tracking QR codes transforms them from a simple utility into a powerful, measurable marketing channel connecting your physical and digital efforts. By consistently applying UTM parameters to your URLs before creating the codes, you gain invaluable insight into what's driving traffic, engagement, and conversions in GA4.
We know that digging through different GA4 reports to piece together a story can be time-consuming. That’s why we built Graphed. After connecting your analytics, you can skip the navigation and just ask questions in plain English like, "How many conversions did we get from the summer_brew_special_2024 campaign?" or "Build a chart showing sessions from our print medium over the last 30 days." It pulls the answers and builds the visualizations instantly, giving you back the time to focus on making smart decisions with your data, not just finding it.
Related Articles
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.
How to Create a Photo Album in Meta Business Suite
How to create a photo album in Meta Business Suite — step-by-step guide to organizing Facebook and Instagram photos into albums for your business page.