An In-depth Manual: Tracking QR Codes with Google Analytics 4

Note: Empower yourself and others by sharing this insightful article on LinkedIn or social media. Let’s build a well-informed community together. Need help? Reach out anytime. 

Introduction to QR Codes

QR codes, or Quick Response codes, are two-dimensional barcodes that store information both horizontally and vertically, enabling them to hold a significant amount of data compared to traditional barcodes. These codes have gained widespread use due to their fast readability and large storage capacity. They can encode various types of data, from website URLs to contact information, and are easily scanned using smartphones, making them a convenient bridge between physical and digital mediums.

Importance of Tracking QR Code Performance


Tracking the performance of QR codes is a strategic process that helps businesses understand the frequency and context in which their QR codes are being used by customers. 

For instance, when a QR code is placed on product packaging, tracking can reveal whether customers are engaging with it. This is essential for measuring the effectiveness of QR codes as a marketing tool. By analysing scan metrics, businesses can discern not just the number of scans, but also derive insights into when and where the codes are scanned, and what actions users take afterward. 

This information is pivotal in determining the QR code’s role in the customer journey, adjusting marketing tactics, and providing targeted content that enhances customer interaction and boosts conversion rates.

Why Track QR Campaigns in GA4?

Tracking your QR code campaigns in Google Analytics 4 (GA4) offers numerous advantages:

Comprehensive Insights:

While QR code generator platforms provide basic data, integrating this with GA4 offers a more complete understanding. In GA4, QR code data is contextualized with your website’s analytics, enabling deeper insight and better decision-making.

Bridging Offline and Online Marketing:

Many businesses still heavily utilize traditional marketing methods like billboards and flyers. GA4 allows you to merge the data from these offline campaigns with online analytics, offering a holistic view of your marketing efforts and their effectiveness.

Data-Driven Marketing Decisions:

GA4’s comprehensive data view aids in making timely and informed marketing decisions. Adjust budgets, revisit campaign strategies, and refine targeting based on real-time data, reducing reliance on guesswork.

Integration with Other Data Sources:

GA4 allows the integration of data from various sources, such as CRMs. This combination can reveal trends and patterns, guiding more effective marketing campaigns that drive engagement and conversions.

Access to Key Metrics:

GA4 doesn’t just show user acquisition through QR scans; it also provides metrics on user engagement like session duration and scrolls. This, combined with event tracking and conversion data, gives a clear picture of the impact of your QR code campaigns.

Implementing QR code tracking in GA4 can greatly enhance your understanding of campaign performance and user behavior, making it a valuable tool for businesses of all types.

Let’s begin with setting up QR Codes

  1. Integrating UTM parameters for accurate tracking and building your URL.
  • To track QR code traffic accurately in analytics tools like GA4, customising the QR code’s link is essential. By default, such tools don’t automatically distinguish QR code traffic from direct traffic.


  • Consider you have a QR code on a business card, leading to a special offer on your website (e.g., To track the performance of this QR code, it’s crucial to append UTM parameters to the URL. These parameters – utm_source, utm_medium, and utm_campaign – provide detailed insights into the traffic origin when analysed in GA4.


For our example of a business card QR code, the UTM setup might include the following:

Medium (utm_medium):

Use a descriptor like ‘business_card’ to indicate the traffic source category.

Source (utm_source):

This could be more specific, such as ‘company_event’ or the name of your business.

Campaign (utm_campaign):

Name the specific marketing initiative, like ‘analytics_offers’.

To ease the URL creation process, you can utilize any URL builder tool present on the internet. Simply input the base URL and the UTM values, and the tool generates the UTM-enhanced URL for you. Once ready, this URL is converted into the QR code on your business card. Scanning this QR code allows GA4 to effectively track and attribute user visits to this specific marketing effort.

          2. Shortening or customizing the URL.


Shortening the URL used in a QR code is important for several reasons, all of which revolve around the QR code’s usability, reliability, and effectiveness:


  • Improved Scan-ability: Shorter URLs create simpler QR codes that are easier to scan, especially with lower-quality cameras or in poor lighting.
  • Better Error Correction: QR codes with shorter URLs handle damage or distortion more effectively, maintaining scan-ability.
  • Flexible Printing: Shorter URLs allow for smaller QR code printing, useful for space-constrained materials like business cards.
  • Faster Page Loading: Short URLs can lead to quicker loading times of the landing page, enhancing user experience.

You can use URL shorteners present on the internet to get a short URL.

          3. Creating the QR Code using the Shortened URL.

To create the QR code, utilise one of the numerous free online QR code generators available. Simply enter your shortened URL into the generator, and it will produce the QR code image. Once generated, download and save this image for use in various materials such as print ads, business cards, or other promotional items.

Testing the QR code tracking in Debug View

Open the Tag Assistant Companion, enter the shortened version against which you generated the QR code, and open the page.

Once you have visited the page using this URL, now go to GA4, select the required property, open the admin settings, and open Debug View.

In ‘DebugView’, observe the real-time events coming from the device that scanned the QR code.

Look for events related to the QR code scan, such as ‘page_view’ events with the UTM parameters you added to the QR code URL.


Click on the specific events in ‘DebugView’ to see their details and verify the UTM parameters (source, medium, campaign) to ensure they match what you set for the QR code.

This confirms that the QR code tracking is working, and that the data is being sent to GA4.

Analysing QR Code Performance in GA4

Once your QR code campaign is active and driving traffic, it’s crucial to analyse the results. Give GA4 about 24-48 hours post-launch for data processing, as it may not be instantaneous.

To review the traffic source data, navigate to the Acquisition reports within GA4.


In the ‘Reports’ section from the menu, select ‘Acquisition’, and open ‘Traffic Acquisition’. Here you’ll need to switch the primary dimension to Session Medium or Session Source.

Now you can select other dimensions and metrics according to your needs and analyze the performance of your QR codes.


In summary, leveraging Google Analytics 4 for QR code tracking enables marketers to capture comprehensive engagement data with precision. By embedding UTM parameters into shortened URLs, QR codes become powerful analytic tools that reveal the efficacy of campaigns across various materials, including business cards and print ads. The subsequent analysis in GA4 provides critical insights into user behaviour and campaign performance, allowing businesses to optimise their marketing strategies and enhance user experience. The thoughtful integration of QR codes with GA4 analytics is a game-changer in the measurement and optimization of cross-media marketing efforts.


  • How do I ensure my QR code traffic is being tracked in Google Analytics 4?
    To ensure QR code traffic is tracked in Google Analytics 4, append UTM parameters to the QR code’s URL for clear campaign tracking. After scanning, monitor the traffic in GA4’s Traffic Acquisition report under the Acquisition section.

  • Why is it important to shorten the URL for a QR code?
    Shortening a URL for QR codes is essential to simplify the code for easier scanning and to increase the scan success rate. A shorter URL translates to a less complex QR code, which is especially beneficial for reliable scanning on devices with lower-quality cameras.

  • How long should I wait after launching a QR code campaign before checking the data in GA4?
    It’s recommended to wait approximately 24-48 hours after launching your QR code campaign before checking GA4. This allows enough time for data to be processed and ensures that you’re viewing complete information on user interactions and campaign performance.

About Author

Aditya is a Web analytics professional with experience in the Overall journey of a digital business from frontend development to creating digital marketing campaigns and implementing complex tracking on the website through GTM including server side mechanisms. He has a vast expertise with the analytics tools such as GTM and GA4 and thus is able to give insights about what all is happening in the user journey. He has conducted many CRO and Analytics Audits, extracting actionable insights from large data sets and thus providing providing strategic recommendations for improving conversions and user experience.

Share This Article:
Table of content

Related Stories

Revamping the Landing Pages Report in Google Analytics 4 (GA4) is a strategic endeavor that can...
Google Analytics 4 (GA4) real-time reports offer a dynamic and instantaneous window into the current activity...
In the dynamic realm of digital marketing, Google Ads Conversion Tracking stands out as a pivotal...
Dive into the realm of advanced analytics with Cross-Domain Tracking in Google Analytics 4 (GA4). This...