• Courses
    • Courses
    • Course bundles
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login
  • Courses
    • Courses
    • Course bundles
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login

April 1, 2025

How to Track QR Codes with Google Analytics 4

Updated: April 1st, 2025

If your business runs printed or billboard ads, you can still measure their impact on your website traffic. That can be done with the help of QR codes. Someone sees your ad, scans its QR code, and is redirected to your website/landing page. Here, Google Analytics 4 joins the game and can attribute that session to your QR codes.

However, this does not happen by default; you must customize the setup. In this tutorial, I will explain how to track QR codes with Google Analytics 4.

 

Table of Contents

– Hide table of contents –

  • What is QR code tracking?
  • QR code must be prepared
  • Decorate the URL
  • URL shortener
  • Generate the QR code
  • Test the traffic
  • Where to find QR code data in reports?
  • Frequently asked questions
  • Final words

 

Video tutorial

If you prefer video content, here’s a tutorial from my Youtube channel.

 

What is QR code tracking?

QR code tracking is the process of businesses understanding which codes are used most often by visitors/customers. For example, you add a QR code to a product package. How do you know if people actually use it? That’s where Google Analytics and UTM parameters will become helpful. In this article, we’ll combine QR codes, UTMs, and GA4.

 

How can you track QR codes?

The process of tracking QR codes with Google Analytics looks like this:

  1. First, you will need to decorate the link (that you’ll use in the QR code) with UTM parameters
  2. Then shorten the URL with URL shorteners
  3. Use the shortened URL in the QR code generator
  4. Test the QR code (and then use it in your marketing)
  5. Finally, build reports in Google Analytics

Now, let’s look closely at each of these steps.

 

QR code must be prepared

Out of the box, no analytics tool can track traffic from QR codes. If you don’t customize the QR link, all traffic coming from it will be displayed as direct.

However, you can use UTM parameters to add more information to the QR code. When a visitor lands on your site and the page URL container things like utm_medium, utm_source, utm_campaign, GA4 will track that and attribute the session to the QR code.

Subscribe and Get the Ebook - Mastering GA4 event tracking

Decorate the URL

Let’s say that you want visitors to land on example.com/special-offer/. This is the destination URL. Now, let’s add UTM parameters (if you want to learn more about them, watch this tutorial). You can either do that manually or use URL builders like this one.

You should add at least 3 UTM parameters to the URL:

  • utm_source
  • utm_medium
  • utm_campaign

Medium (utm_medium) is the broadest descriptor (like email, organic, etc.). If you plan to place the QR on a magazine, the medium’s value could be print, magazine, or something like that. If this QR code is going to be added to a billboard outdoors, then the medium’s value could be billboard.

Source (utm_source) is a bit more specific compared to the medium. Examples of it can be facebook.com, google, mailchimp, etc. In the context of a QR code, the source could be the name of a magazine, the name of a billboard company, or something similar.

Campaign (utm_campaign) is even more specific than the previous two UTM parameters. As the parameter name implies, it should contain the name of your campaign, for example, summer sale, Black Friday 2023, etc.

Here’s an example of a URL decorated with UTM parameters: https://example.com?utm_medium=print& utm_source=cool+magazine&utm_campaign=summer20.

Each parameter is concatenated with an ampersand (&).

To make the process a bit easier, you can use URL builders (like this one), where you just need to enter the destination URL and values of parameters.

Then the builder will generate the final URL with all UTMs.

 

URL shortener

The next step could have been to generate the actual QR code, but there’s one challenge. The longer the URL, the smaller the black squares in the QR code. This can negatively affect the user’s experience when scanning the code (with shaky hands, it might become a challenge for some people).

You aim to ensure that the QR code has as few black squares as possible—also, the larger the squares, the better.

I recommend using a URL shortener (like bit.ly, shorturl.at). Open any URL shortener of your choice and paste the final link you generated in the previous chapter (the one with all the needed UTM parameters). Then generate the short URL. It might look like this https://bit.ly/239nd38 or like this https://rb.gy/xuduc5, or something else (depending on which URL shortener you chose).

It’s also a good idea to use a shortener to edit the final destination URL later. In rare situations, you might have an emergency and need to redirect users elsewhere.

Subscribe and Get the Ebook - working with reports in ga4

Generate the QR code

Let’s generate the QR code. There are many free online QR code generators like this one. Paste your short URL there and generate the image. Save it and use it in your print ads or somewhere else.

qr code generator

Remember that if you plan to use it in print, the image’s resolution must be high.

 

Test the traffic

Don’t forget to test the QR code before you send it to the designer who’s responsible for incorporating the QR. The easiest way would be to take your smartphone, scan the QR code and then land on your website.

Then go to Google Analytics 4 > Reports > Realtime and find the card that says Event count by Event name. Find the page_view event there, and click it.

Then keep looking for the following parameters:

  • campaign (one of the values there should be the value of your QR code’s utm_campaign)
  • medium (represents utm_medium)
  • source (represents utm_source)

See the correct values? If yes, then you’re good to go. If you cannot see the data in real-time reports, read this troubleshooting guide.

 

Where to find QR code data in Google Analytics 4?

After you launch the campaign and start getting traffic from the QR code, it’s time to check the data. Before you continue, ensure you have waited 24-48 hours after the campaign was launched. GA4 is slow when it comes to data processing.

To see the reports of your traffic sources, you will need to use Acquisition reports.

Go to Reports > Acquisition > Traffic Acquisition. It’s important that you choose Traffic Acquisition, not User acquisition because they serve different purposes. Since you want to check traffic sources of each individual session, Traffic acquisition is what you need.

The default dimension in that report is Session Default Channel Grouping. You won’t see anything related to the QR code there. However, if you switch the primary dimension to Session Medium, you should start seeing the needed value there.

You can add a secondary dimension, Session Source, by clicking the plus icon.

Now you can see how many sessions and users you got from visitors who scanned the QR code.

qr code data in ga4

Also, you can scroll to the right and see how many conversions (key events) you got and (if it applies to you) how much revenue you got.

Note: Google renamed “conversions” to “key events”.

qr code data in google analytics 4

 

Frequently asked questions about QR codes and GA4

If you still have doubts/questions, here are the ones that are asked most frequently.

Can I use Google Analytics to track QR codes that are already published (and not decorated with UTMs)? If a QR code is using some generic link (and you cannot distinguish that the visitor came from the QR code), then no, you cannot use GA for that. QR code tracking with GA4 (or any other analytics tool) requires that you prepare the links and QR code beforehand.

What kind of metrics can I see in Google Analytics related to QR code usage? This depends on your setup. But the basic combination of metrics includes a number of sessions, device category, device operating system, country, number of users, number of key events, etc.

How do I make a QR code trackable? You need to decorate the link with UTM parameters and then use that decorated link in your QR code generator.

How long does it take for my QR code data to be visible in Google Analytics? It can take 24-48 hours.

 

Track QR codes with Google Analytics 4: Final words

Remember, QR codes need to be prepared if you want to track them with Google Analytics 4. Some URL shorteners might add their UTM parameters, so you can also investigate that option.

Even though you don’t have to use URL shorteners, I recommend doing that because it will reduce the number of squares in the QR code (which will make it easier to scan from a distance or with a low-quality smartphone camera).

If you want to learn much more about how to use Google Analytics 4 and benefit from it, take a look at my GA4 course.

 

Julius Fedorovicius
In Google Analytics Tips
16 COMMENTS
Kathy
  • Mar 6 2023
  • Reply

Thanks, Julius, I'll definitely be learning to use this

Alena Mage
  • Mar 27 2023
  • Reply

Nice post! Thanks for sharing about google analytics 4 information with QR code integration.

humaira
  • Apr 28 2023
  • Reply

how to track a QR code download - if the url is not in our own website.
how to test that in GA4

forexample our all files - pdfs, Cad sites in hubspot so the url starts with /hs-

so we generated the QR code with /hs-
but our website urls is /accuride

    Julius Fedorovicius
    • May 12 2023
    • Reply

    If you use a link in the QR code, but you don't have access to that page's GA4, you cannot properly test it. If QR code directly loads PDF, you cannot properly track it with GA4

Laura Wynn
  • May 19 2023
  • Reply

Julius,

Thank you for this insightful post! Quick question for you. Because GA4 is more strict about UTMs, will QR code data get bucketed in the "Unassigned" Channel Group?

    Julius Fedorovicius
    • May 19 2023
    • Reply

    Depends on what medium and source you use. But probably yes. Create a custom channel group then.

      Laura Wynn
      • May 19 2023
      • Reply

      As always, you are wonderfully prompt with your replies.

      Have a lovely weekend ahead.

      Cheers!
      ~L

Isabelle
  • Nov 30 2023
  • Reply

This was extremely helpful, thank you so much!

I do have one question if you can help; I have followed all of the steps and am caught on the last one. I created the QR code, tested it, and can see it appearing in the Real Time report. I cannot however see it in the Traffic Aquisition section. Do you know why this might be happening or how to fix it?

Thanks again!

    Julius Fedorovicius
    • Feb 8 2024
    • Reply

    Might be one of these reasons https://www.analyticsmania.com/post/google-analytics-4-events-not-showing-up-in-reports/

      Isabelle
      • Feb 8 2024
      • Reply

      Thank you for the reply! Yes, the issue was with thresholding. I changed my reporting identity to "Device Based", which allowed me to see my campaign in the traffic acquisition report.

      If anyone experiences the same issue:
      Admin> Reporting Identity> Show all> select "Device-based".

Rolando
  • Feb 20 2024
  • Reply

Thank you so much!
This is a very comprehensive article with great resources left and right.
Posts like yours do so much good to empirical persons like me.

Thank you, again.

Penny
  • Mar 20 2024
  • Reply

There is no reference to "print" source in GA4's default channel definitions. Shouldn't "campaign_source" be set to say "referral" or "link" so this data is included in default channel group rather than be regarded as (none) or (not set)?

Or is there a better method for campaign source for QR links?

Gabbie
  • Nov 19 2024
  • Reply

I've noticed that a QR code based on a URL with a 301 redirect doesn't work if you added UTMs to it (with shortened URL and also regular URLs).
I'm mentioning this so you are aware and to ask if anyone has a solution for this issue.
Thank you!

MT
  • Jan 19 2025
  • Reply

I have a question regarding QR codes. In my haste, I printed what I believe to be a dynamic QR code without fully considering its significance. Unfortunately, I can’t remember which service I used to create it, making it difficult to track analytics or update the destination it links to. Could you provide advice on how to reverse search the QR code image or decode the link it generates? Additionally, how can I determine where the code was created, who might be tracking it, and whether it’s possible to update the link’s destination?

Here is the original link:
https://vqr.vc/ozzseFZZl

Thoughts?

    Julius Fedorovicius
    • Jan 19 2025
    • Reply

    Google and find out which tool owns/uses the vqr.vc domain.

    That's all you can find out.

    You won't know who creates the link/qr code. So if you can't remember, you are out of luck

Emilia Lax
  • Jun 27 2025
  • Reply

this is nice article that tell about trackable qr code generation and usage

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *


 

Hi, I'm Julius Fedorovicius and I'm here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey. Read more
Analytics Mania
  • Google Tag Manager Courses
  • Google Tag Manager Recipes
  • Google Tag Manager Resources
  • Google Tag Manager Community
  • Login to courses
Follow Analytics Mania
  • Subscribe to newsletter
Recent Posts
  • Google Tag Manager Server-Side Tagging with Stape
  • How to Preserve Ad Click IDs with Server-side Tagging
  • LinkedIn Conversions API with Google Tag Manager. The Guide.
Analytics Mania - Google Tag Manager and Google Analytics Blog | Privacy Policy
Manage Cookie Settings