QR Code Tracking in Google Analytics 4: UTM Setup
QR code tracking in Google Analytics works by adding UTM parameters to the web address your QR code opens. Without them, GA4 has no referrer to read, so every scan is filed as direct traffic, mixed in with people who typed your URL. With them, each scan arrives as a session labeled with the source, medium, and campaign you chose.
You need two things: a landing page that already runs your GA4 tag, and a QR code whose destination you can edit. You can create a dynamic QR code on QRelix with no credit card, paste in the tagged URL, and fix a tag later without reprinting. Each free code works for its first 50 scans and shows a brief QRelix screen before forwarding; Pro ($5.99/month) removes both limits. The setup below takes about ten minutes.
Why Google Analytics files QR code scans as direct traffic
When someone scans a QR code, the phone opens a URL in the browser. There is no referring website, no search query, and no ad click, and GA4 labels any session without that information as direct. A flyer campaign that drove 400 visits looks the same in your reports as 400 people opening a bookmark.
UTM parameters fix this. They are short tags added to the end of the destination URL, and GA4 reads them automatically when the visitor arrives. Nothing has to be configured inside Google Analytics first.
QR code tracking in Google Analytics: the UTM tags to use
Three tags do most of the work, and one optional tag helps when you test variations.
utm_sourceis where the code physically lives:table_tent,store_window,direct_mail_q2.utm_mediumis the channel type. Useqr_codefor every QR campaign so all QR traffic can be pulled up with one filter.utm_campaignis the campaign name:spring_promo_2026,loyalty_program.utm_contentis optional. It separates two versions of the same placement, such as a code at the top of a poster and one at the bottom.
Say a restaurant puts codes on table tents for a spring menu. The plain destination is https://yoursite.com/spring-menu. The tagged version is:
https://yoursite.com/spring-menu?utm_source=table_tent&utm_medium=qr_code&utm_campaign=spring_promo_2026
Four naming rules keep the reports clean:
- Use lowercase. GA4 is case-sensitive, so
QR_Codeandqr_codebecome two separate rows. - Use underscores, not spaces. Spaces turn into
%20and make reports hard to read. - Be specific about the source.
postertells you nothing when posters hang in 12 places. Useposter_downtown_store. - Keep one medium value. Pick
qr_codeand never alternate withqrorqrcode.
Set up QR code tracking in GA4 in five steps
Step 1: Check that GA4 runs on the landing page
Google Analytics can only record a visit on a page that carries your GA4 tag. A code that opens a PDF, an app store listing, or a social media profile sends nothing to your property. If the real destination is one of those, point the code at a page on your own site that links onward.
Step 2: Build the tagged URL
Use Google's Campaign URL Builder or type the tags by hand. Put a question mark after the page address and join the tags with ampersands, as in the example above. If the address already contains a question mark, add your tags with an ampersand instead.
Step 3: Create the QR code with the tagged URL as its destination
In QRelix, choose the URL type and paste the full tagged address as the destination. Every QRelix code is dynamic: the printed pattern holds a short redirect link, and your tagged URL sits behind it. That has two practical effects. The pattern stays simple no matter how long the tags are, and a typo in a tag is fixed by editing the destination in the dashboard, with no reprint.
Make one code per placement, each with its own utm_source. A single shared code can only ever report one source.
Step 4: Test with a real scan
Scan the code with your phone, then open Reports and Realtime in GA4. Your visit should appear within a minute or so. Check that the page_view event carries the source, medium, and campaign you set. If the visit shows as direct, the tags were lost on the way: look for a redirect on your own site that drops everything after the question mark.
Step 5: Read the Traffic acquisition report
Standard reports take 24 to 48 hours to fill in. After that, open Reports, then Acquisition, then Traffic acquisition. Change the primary dimension from the default channel group to Session source / medium and type qr_code in the search box. Add Session campaign as a secondary dimension to split the rows by campaign.
Why QR traffic shows up as Unassigned
GA4 sorts sessions into default channel groups such as Organic Search, Email, and Paid Social, using a fixed list of medium values. qr_code is not on that list, so in channel reports your scans land in a row called Unassigned. Nothing is broken, and the source, medium, and campaign are all still recorded.
There are two ways to handle it. The simple one is to read QR traffic by Session medium, as in step 5, and ignore the channel view. The tidier one is a custom channel group: in Admin, under Data display, open Channel groups, create a new group, and add a channel named QR code with the rule "medium exactly matches qr_code". Your scans then get their own row next to the other channels.
Measure what people do after the scan
A scan count tells you that a placement gets attention. A key event tells you whether it produces anything. In GA4, mark the action you care about (a form submission, a booking, a purchase) as a key event under Admin, Data display, Events. The Traffic acquisition report then shows key events and the session key event rate for every source.
Here is the kind of comparison that makes the setup worth it. After one month, the restaurant's report reads:
table_tent: 212 sessions, 9 reservations, a 4.2% ratestore_window: 388 sessions, 4 reservations, a 1.0% rate
The window code gets more scans, but the table tents produce more than twice the reservations. Scan counts alone would have pointed the next print budget at the wrong placement.
Why scans and sessions will not match
QRelix counts a scan at the redirect, before the visitor reaches your page, and records its time, city, and device type. GA4 counts a session only after the page loads and the tag fires. Visitors who decline analytics consent, use a blocker, or close the tab early are scans without sessions. If the dashboard shows 500 scans and GA4 shows 430 sessions, that gap is normal.
Use the two together. The QRelix analytics dashboard answers how many people scanned, when, and where. GA4 answers what they did next. The dashboard is included on the free plan, within the 50 scans per code noted above, so a code for a campaign you expect to pass 50 scans belongs on Pro. The dynamic QR code cost guide works through that math.
Common mistakes
- Tagging some codes and not others. Untagged scans fall back into direct traffic and the totals stop adding up.
- Reusing one code everywhere. The flyer, the window, and the receipt all report as a single source.
- Renaming tags mid-campaign. Switching from
spring_promotospring_promo_2026splits one campaign into two rows. - Putting personal details in the URL. Names, emails, or phone numbers in a tagged URL end up in Google Analytics, which Google's policies do not allow.
- Checking standard reports on launch day. They lag by up to two days, so use Realtime for the first check.
Questions about QR codes and Google Analytics
Can Google Analytics count QR code scans by itself?
No. GA4 sees a visit to your page, not the scan. Without UTM tags the visit is labeled direct. With them, it is labeled with the source you chose. To count the scans themselves, including ones that never load the page, use the scan data from a dynamic QR code.
Do I need a dynamic QR code for this?
A static code with a tagged URL will also report to GA4, but the tags are fixed once it is printed, and a long tagged URL makes a static pattern dense and harder to scan at small sizes. A dynamic code keeps the pattern short and lets you edit the tags later.
Can I change UTM tags after the code is printed?
With a dynamic code, yes. Edit the destination URL in your QRelix dashboard and the next scan carries the new tags. Scans that already happened keep the old values in GA4.
How long before scans appear in GA4?
Realtime shows a test scan within about a minute. The Traffic acquisition report usually fills in within 24 to 48 hours.
Create your QR code, tag the destination, and run one test scan before anything goes to print. To compare several placements side by side, see QR campaign tracking. For what the scan dashboard records, read how a QR code tracker works and dynamic QR code tracking.
Put this guide to work
Make one with the free trackable QR code generator: scan analytics, an editable destination, your logo. No credit card, no account up front.
Create a free QR code