How to Track a QR Code in Google Analytics
QR codes are a fantastic way to bridge the gap between your physical and digital marketing, but just dropping them on flyers and social posts isn't enough. If you can’t measure their impact, you’re just hoping for the best. This guide will show you exactly how to use Google Analytics to find out not only how many people are scanning your QR codes, but also what they do on your website afterward.
Why You Should Track QR Code Performance
Before jumping into the “how,” it’s important to understand the “why.” Connecting a QR code to Google Analytics isn’t just a neat trick, it’s a powerful way to gather crucial data that can directly inform your marketing strategy. Tracking allows you to finally get answers to questions you might have only guessed at before:
- Quantify Offline Marketing ROI: Do those expensive posters at the local coffee shop actually send traffic to your site? How many sign-ups did you get from the flyers you handed out at that trade show? Tracking provides concrete numbers to measure the effectiveness of your offline efforts.
- Understand User Context: A visitor who scans a code on a product's packaging is likely much different from someone who scans it from a poster promoting a sale. Tracking helps you understand the context of each visit and see how different audiences behave on your site.
- A/B Test Physical Materials: Wondering which flyer design converts better? Or if placing a QR code on a receipt is more effective than on a table tent? You can create separate trackable links for each variation and let the data tell you which one performs best.
- Bridge the Offline-to-Online Customer Journey: Tracking helps you see the whole picture. Someone might scan a QR code at your physical store, browse your website, and then make a purchase a few days later. Proper tracking connects that purchase back to the initial offline interaction.
The Secret Weapon: UTM Parameters
The magic behind tracking any specific link - whether it’s from an email, a social media ad, or a QR code - is something called UTM parameters. UTM stands for "Urchin Tracking Module," a nod to the company Google acquired to create Google Analytics.
In simple terms, UTM parameters are short snippets of text you add to the end of a URL. These snippets act like tags, telling Google Analytics specific information about where the visitor came from. When someone scans your QR code and lands on your site, GA4 reads these tags and categorizes the visit accordingly.
This lets you see with perfect clarity that a session didn't just come from "direct" or "referral" traffic, but from "that new vinyl banner at the farmer's market."
The Main UTM Parameters You Need to Know
There are five UTM parameters you can use, but for most QR code tracking, you only need to focus on three of them. Being consistent with how you name them is the most important part of the process.
utm_source(Required): This identifies the source of your traffic - where the user came from. Think of it as the specific place your QR code lives. It should be something easily identifiable to you and your team. Examples:conference_flyer,restroom_door_sticker,business_card,product_packagingutm_medium(Required): This identifies the marketing medium you're using. For QR codes, you should pick one term and use it consistently so you can group all your QR code performance together. Recommended values:qr_codeorofflineutm_campaign(Required): This identifies the specific marketing campaign or promotion the QR code is associated with. This is incredibly useful for grouping activities related to a single strategic push. Examples:spring_launch_2024,email_signup_promo,store_grand_opening
The other two parameters, utm_term and utm_content, are optional and are more commonly used for fine-tuning paid search campaigns or A/B testing different links within the same email. For most QR code uses, you can leave them blank.
Step 1: Build Your Trackable URL
Now that you know what UTM parameters are, it’s time to create a unique URL for your QR code. Let’s imagine we’re a local bakery running a promotion. We want to place a QR code on a poster in our storefront window to promote a new "Summer Pastry Box."
Here’s the information we want to track:
- Landing Page URL:
https://sunshinebakery.com/summer-box - UTM Source (where is the QR code?):
storefront_poster - UTM Medium (how did they get here?):
qr_code - UTM Campaign (what’s the promotion?):
summer_promo_2024
There are two easy methods to combine this information into a trackable URL.
Method 1: Use Google's Campaign URL Builder
The easiest and most reliable way to create your URL is with Google’s official Campaign URL Builder. It’s a simple web form that prevents syntax errors.
You’ll fill out the form using the information from our bakery example:
- Go to the Campaign URL Builder homepage.
- Enter your base URL:
https://sunshinebakery.com/summer-box - Fill in the UTM parameters for
utm_source,utm_medium, andutm_campaign. - The tool will automatically generate your full, trackable URL at the bottom of the page.
Your generated URL will look like this:
https://sunshinebakery.com/summer-box?utm_source=storefront_poster&utm_medium=qr_code&utm_campaign=summer_promo_2024
Copy this full URL. This is the link you'll use in the next step.
Method 2: Construct the URL Manually
Once you get the hang of it, you can also build these URLs by hand. You just need to follow a specific structure:
- Start with your base URL.
- Add a question mark (
?) after the URL. - Add your first UTM parameter in a
key=valueformat (e.g.,utm_source=storefront_poster). - Separate each subsequent UTM parameter with an ampersand (
&).
Building our bakery example manually, it would look like this:
[Base URL]?utm_source=storefront_poster&utm_medium=qr_code&utm_campaign=summer_promo_2024
Step 2: Generate and Test Your QR Code
With your long, UTM-tagged URL copied, it’s time to generate the QR code itself. There are dozens of free QR code generators available online - a quick search will reveal plenty of great options.
The process is straightforward:
- Open your preferred QR code generator.
- Paste the entire trackable URL (the long one with all the UTMs) you just created into the URL field.
- The tool will instantly generate an image of your QR code you can download and use on your marketing materials.
Extremely Important Tip: Before you print 1,000 posters, test your new QR code! Open the camera app on your smartphone and scan it. Make sure it directs you to the correct webpage. While you're at it, check your GA4 Realtime report to see if your visit shows up with the correct source, medium, and campaign attributes. Catching a typo now will save you a massive headache later.
Step 3: Finding Your Data in Google Analytics 4
After your QR code has been out in the wild for a while and people have started scanning it, you’ll be able to see the results of your hard work inside your GA4 property.
Here’s the most direct path to find your data:
- Log in to your Google Analytics 4 account.
- Navigate to Reports > Acquisition > All Traffic > Traffic acquisition from the left-hand menu.
- The default report will likely be grouped by Session default channel grouping. This lumps your traffic into broad categories like "Direct" or "Organic Search," which isn’t specific enough for our needs.
- To see our UTM parameters in action, click the small dropdown arrow next to "Session default channel group" and change the primary dimension.
- Choose either Session source / medium to see the source and medium you defined (e.g.,
storefront_poster / qr_code). - You can also select "Traffic Source" to see your campaign names (like "spring_launch_promo").
When you apply this dimension, you'll see a row in your report that matches exactly with the UTM parameters you set up. From here, you can analyze all the key traffic and user engagement metrics for that specific QR code campaign:
- Users
- Sessions
- Engaged Sessions
- Events
- Conversions
- Total Revenue
Creating an Audience for Remarketing to QR Code Visitors
Once you’re collecting data on your QR code visitors, you can take this another step further by creating an audience for remarketing. This will allow you to show ads or customize content specifically for those users who arrived at your site from a QR code. This is especially useful as you know these visitors have physically interacted with your brand in the real world.
Final Thoughts
By combining the visibility of QR codes with the power of UTM tracking in GA4, you turn static, offline marketing materials into measurable, actionable data points. This transformation takes offline marketing from a guessing game to a data-driven strategy. Utilize these insights to refine your marketing tactics, enhance customer engagement, and ultimately boost ROI.
We've built Graphed precisely for this reason: to eliminate the manual data juggling. Instead of clicking through countless reports, you can connect all your sources in one pane of glass, helping you focus on actioning insights, not just measuring them. You can try it out at Graphed.
Related Articles
How to Connect Facebook to Google Data Studio: The Complete Guide for 2026
Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.
Appsflyer vs Mixpanel: Complete 2026 Comparison Guide
The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.
DashThis vs AgencyAnalytics: The Ultimate Comparison Guide for Marketing Agencies
When it comes to choosing the right marketing reporting platform, agencies often find themselves torn between two industry leaders: DashThis and AgencyAnalytics. Both platforms promise to streamline reporting, save time, and impress clients with stunning visualizations. But which one truly delivers on these promises?