AnalyticsGoogle AnalyticsDynamic QR codes

How to Track QR Codes in Google Analytics (GA4)

Out of the box, GA4 files every QR code visit under direct traffic. A few UTM parameters and one custom channel fix that, so you can see what your print actually produced.

The Qrelux Team7 min read

Google Analytics can tell you how many people arrived from a QR code, what they did on your site and whether they bought anything. It won't do any of that by default. Without some set-up, every scan goes into the same bucket as people who typed your address in or clicked a bookmark.

Why QR code scans show up as direct traffic

Analytics tools work out where a visit came from mostly from the referrer, the page the visitor was on before. A link clicked on Facebook carries Facebook as its referrer. A phone camera opening a URL carries nothing, because there was no page before it.

With no referrer and no campaign tags, GA4 records the visit as (direct) / (none). Your flyer, poster or packaging gets mixed in with bookmarks, typed URLs and a fair amount of traffic GA4 can't place at all. You can't separate them afterwards, so the tagging has to be in place before the code is printed.

Without UTM tagsScanexample.com/menuGA4(direct) / (none)With UTM tagsScanexample.com/menu?utm_source=flyer&utm_medium=qr&utm_campaign=springGA4flyer / qr
The same scan, with and without tags. Untagged, GA4 can't tell it from a typed URL; tagged, it gets its own row in your reports.

The UTM parameters to use for QR codes

UTM parameters are tags added to the end of a URL. GA4 reads them when the page loads and attributes the session to whatever they say. Five are standard; for print you need three, and a fourth is worth adding:

ParameterWhat to put in itExample
utm_mediumAlways the same value for every QR codeqr
utm_sourceThe printed piece the code is onflyer, poster, packaging
utm_campaignThe campaign or promotionspring-sale
utm_contentThe individual placement, if you have severalwindow, counter, table-4

Keeping utm_medium=qr fixed is what makes the rest easy: one filter shows all QR traffic, and the other parameters split it up. A full link looks like this:

https://example.com/menu?utm_source=flyer&utm_medium=qr&utm_campaign=spring-sale&utm_content=window

This is free and works with any QR code generator. Its limit is that the tagged URL is encoded into the printed pattern, so it can't change after printing and it makes the code denser.

  1. Build the tagged URL. Add the parameters to your page's address by hand, or use Google's free Campaign URL Builder.
  2. Keep it short. Every extra character adds modules to the pattern, and dense codes are a common reason QR codes fail to scan. Use short values and leave out utm_content if you only have one placement.
  3. Make a static code from the tagged URL with a free QR code generator.
  4. Scan it and check the address bar. The page that opens should still show the UTM parameters. Some sites redirect (from http to https, or to add a trailing slash) and drop the query string on the way.
  5. Print it, making one code per placement you want to compare.

Method 2: a dynamic QR code that tags visits for you

A dynamic code encodes a short redirect link instead of your page. The redirect server counts the scan and forwards the visitor to your page, and it can add the UTM parameters at that point. The printed pattern stays small and the tags never have to be printed.

You also get two numbers instead of one: scans counted by the QR tool, and sessions counted by GA4. The gap between them is useful in itself (see below).

On Qrelux this is automatic for web links. Each visit arrives tagged utm_source=qrelux, utm_medium=qr, utm_campaign set to the campaign's name and utm_content set to the QR code's name. When one code splits its scans between pages, as an A/B test or a smart redirect does, utm_content also names the variant, so GA4 splits the visits the same way the code did. Links that already carry their own UTM parameters are left alone, and tagging can be switched off in your organisation's settings.

Qrelux donut chart of how scans split between variant A and variant B of one printed QR code
One printed code splitting its scans between two pages (sample data). Each variant's name also goes into utm_content, so GA4 can compare them on conversions, not just visits.

Finding QR code traffic in GA4

Check it's working (same day)

Scan the code yourself and open Reports → Realtime. Your visit should appear within a minute or so. Standard reports take up to a day or two to process, so don't worry if Traffic acquisition is empty straight after launch.

The Traffic acquisition report

  1. Go to Reports → Acquisition → Traffic acquisition.
  2. Change the table's primary dimension to Session source / medium. Your codes appear as rows like flyer / qr or qrelux / qr.
  3. Switch the dimension to Session campaign to compare campaigns.
  4. To compare placements, click + next to the dimension and add Session manual ad content, which is where utm_content lands.

The columns to watch are Engaged sessions, Engagement rate and Key events. Sessions alone tell you the code was scanned. Engagement tells you whether the page delivered what the print promised.

Give QR codes their own channel

GA4's default channel groups have no rule for QR or print, so tagged QR visits usually land in Unassigned. A custom channel group fixes the channel reports:

  1. Go to Admin → Data display → Channel groups and create a new channel group (start by copying the default one).
  2. Add a channel called QR code with the condition Medium exactly matches qr.
  3. Move it above the other channels so it's checked first, and save.
  4. In Traffic acquisition, switch the dimension to your new channel group. QR now sits alongside Organic Search, Paid Social and the rest.

Measuring what scans lead to

A visit from a QR code tells you someone was curious. The useful question is whether they then did something: booked, bought, signed up, called. In GA4 those actions are key events (the name for conversions since 2024).

  • Mark the actions that matter as key events under Admin → Data display → Events. Purchases from GA4's ecommerce tracking count; so can a form submission, a click on a phone number or a visit to a thank-you page.
  • Read key events by session medium in Traffic acquisition. The QR rows now show how many visits produced an action, not just how many arrived.
  • Build a free-form exploration (Explore → Free form) for anything finer: rows set to Session manual ad content, a filter on Session medium = qr, and Sessions, Engaged sessions and Key events as values. That gives you one row per placement with its conversion count.

Divide each placement's key events by the number of copies printed and you have a cost-per-result figure you can put next to your paid channels. That comparison is the reason to bother with any of this.

Why GA4 shows fewer visits than scans

If you use a dynamic code, the QR tool's scan count will almost always be higher than GA4's session count. That's expected:

  • Visitors leave before the page loads. On a slow page or a weak connection, some people give up before the analytics tag fires. The scan was counted; the session never started.
  • Cookie consent and blockers. Visitors who decline analytics cookies, or use a browser or extension that blocks Google Analytics, may not be recorded, depending on how your consent set-up is configured.
  • Repeat scans. Someone who scans twice within a few minutes is two scans and one GA4 session.
  • Lost parameters. A redirect on your site that drops the query string turns tagged visits back into direct traffic. They're counted, just in the wrong place.

A gap of 10 to 30% is normal. A much bigger one usually means a slow landing page, a strict cookie banner or a redirect stripping the tags, and each of those is worth fixing for its own sake.

Common mistakes

  • One code for everything. A single code on every flyer, poster and box gives you one row in GA4. If you'll want to compare placements, they need separate codes, or at least separate utm_content values, before printing. One code per placement covers how to split them.
  • Pointing the code at a page without GA4. UTM tags only work if the destination runs your analytics. A PDF, a WhatsApp chat or a social profile can't read them; for those, the QR tool's own scan count is the only measure.
  • Inconsistent naming. Spring-Sale, spring_sale and springsale are three campaigns to GA4. Agree on a format up front.
  • Tagging internal links. UTM parameters on links within your own site start a new session and overwrite the original source. Only tag the link the QR code opens.
  • Judging too early. Standard reports lag by up to two days, and most print campaigns build over a week or two. Give it time before deciding a placement failed.

Qrelux counts every scan and tags each visit for Google Analytics automatically, with the campaign and code already filled in, so your GA4 reports split the same way your print does. Free plan, no card.

See plans, starting free

Frequently asked questions

Can Google Analytics track QR code scans?

It can track the visits a QR code produces, not the scans themselves. Add UTM parameters such as utm_medium=qr to the link the code opens and GA4 will attribute those sessions to the QR code. Scans where the visitor leaves before the page loads, or blocks analytics, won't appear. A dynamic QR code tool counts every scan separately.

Why does my QR code traffic show as direct in GA4?

A phone camera opening a link sends no referrer, so without UTM parameters GA4 has nothing to attribute the visit to and records it as (direct) / (none). Add UTM parameters to the destination URL, or use a dynamic QR code that adds them at the redirect.

What UTM parameters should I use for a QR code?

Use utm_medium=qr on every code so all QR traffic can be filtered together, utm_source for the printed piece (flyer, poster, packaging), utm_campaign for the promotion, and utm_content for the individual placement if you want to compare them. Keep values lowercase, since GA4 treats them as case-sensitive.

Where do I find QR code visits in GA4?

Go to Reports, then Acquisition, then Traffic acquisition, and set the dimension to Session source / medium. Tagged QR visits appear with qr as the medium. Add Session manual ad content as a secondary dimension to see individual placements.

Does adding UTM parameters make a QR code harder to scan?

On a static code, yes: the longer URL is encoded into the pattern, which makes it denser and less forgiving at small sizes. A dynamic QR code avoids this, because the printed code holds only a short redirect link and the parameters are added when the visitor is forwarded.

Why does GA4 show fewer visits than my QR code's scan count?

Some people close the page before it loads, decline analytics cookies or use blockers, and quick repeat scans count as one session. A gap of 10 to 30% is normal. A much bigger gap usually points to a slow landing page, a strict cookie banner or a redirect that strips the UTM parameters.

Stop guessing what your printed marketing does

Dynamic QR codes let you change the destination after printing and show you every scan—when, where, and on what device.

Start for free

No credit card required

Keep reading