How do you track QR codes in Google Analytics 4?

GA4 has no QR code setting. It tracks a QR code when the code opens a URL that already carries utm_source, utm_medium and utm_campaign. The scan starts a session with those values, and they show up in the Traffic acquisition report. Without them, a scan has no referrer and GA4 files it as Direct.

  1. Tag one URL per placement with source, medium and campaign.
  2. Encode that exact URL in the code. Don't let a redirect strip the query string.
  3. Scan it yourself and check the landing page still shows every parameter.
  4. Read the scans in Reports → Acquisition → Traffic acquisition, filtered to your QR medium.
  5. Give QR its own channel with a custom channel group, so it doesn't sit in Unassigned.

Tagged URL → QR code → scan → GA4 session with your source and medium → key event → lead → revenue.

If the same code is meant to feed a Google Ads campaign, there's a second problem: a scan never carries a gclid. Google Analytics QR code tracking for Google Ads covers that side. This page is about GA4 alone.

Step 1: build a tagged URL for each QR code

Every printed placement gets its own URL. Google says to always set utm_source, utm_medium and utm_campaign together, and values are case-sensitive, so Flyer and flyer are two sources (Analytics Help: URL builders).

A naming pattern that holds up:

Placementutm_sourceutm_mediumutm_campaignutm_content
Flyer at the front deskflyerqr-codespring-open-housefront-desk
Same flyer, mailedflyerqr-codespring-open-housemailer
Trade show booth bannerboothqr-codeexpo-2026back-wall
Product packaging insertpackagingqr-codeonboardinginsert-v2

The result for the first row:

https://www.example.com/open-house?utm_source=flyer&utm_medium=qr-code&utm_campaign=spring-open-house&utm_content=front-desk

Keep utm_medium the same on every QR code, for example qr-code. That single value is what lets you pull all scans into one row later. Use utm_content to tell two copies of the same design apart. Lowercase and hyphens, every time. The UTM builder keeps the spelling fixed, and Google's own Campaign URL Builder works for a one-off.

Step 2: encode the exact URL and test the scan

Generate the code from the full tagged URL, or from a short link that keeps the query string when it redirects. Then test it the way a customer would.

  • Scan with a phone, not a desktop preview. Open the page and read the address bar. Every utm_ parameter should still be there.
  • Check Realtime. In GA4, Reports → Realtime shows the page view within a few minutes. Don't panic if your test phone is missing from the "first user source" card: Google says that card only shows users who've already been through normal processing, so brand-new visitors don't appear there yet (Analytics Help: Realtime report).
  • Look in the right dimension. GA4 strips UTM parameters out of "Landing page + query string" and "Page path + query string". They appear in "Page location" instead (Analytics Help).

If the scan opens the page without the parameters, the code or the redirect is the problem, and nothing in GA4 can fix it later. UTM not showing up in Google Analytics lists the other usual causes.

Step 3: find QR code scans in GA4 reports

Give the standard reports a day before you judge anything. Then:

  1. Go to Reports → Acquisition → Traffic acquisition.
  2. Change the primary dimension to Session source / medium.
  3. Search the table for / qr-code. Each row is one source, so flyer / qr-code and booth / qr-code sit side by side.
  4. Add Session campaign as a secondary dimension to split by campaign. For utm_content, use Session manual ad content.

Google lists Session source/medium, Session medium, Session source and Session campaign as the dimensions for campaign data in this report (Analytics Help).

Traffic acquisition is session-based, so a person who scans twice counts twice. To see which codes brought in new users, open User acquisition and use First user source / medium instead.

Step 4: stop QR traffic landing in Unassigned

GA4's default channel group has rules for email, SMS, display, paid search and the rest, but none for QR codes. A medium like qr-code doesn't match any of them, so those sessions fall into Unassigned, which Google defines as traffic no channel rule matches (Analytics Help: Default channel group). The default group can't be edited.

The fix is a custom channel group:

  1. In Admin → Data display → Channel groups, click Create new channel group. It starts as a copy of the default group.
  2. Add a channel called "QR codes" with the condition Medium exactly matches qr-code.
  3. Click Reorder and move it above the other channels. Traffic goes into the first channel it matches.
  4. Save, then pick the new group as the primary dimension in Traffic acquisition.

Custom channel groups apply to past data too, and a standard property can have two of them (Analytics Help: Custom channel groups). You need Editor access or above.

Tempted to use utm_medium=print or offline instead? They land in Unassigned just the same. Pick one value, keep it, and let the channel group do the sorting.

Step 5: count key events from QR code traffic

Visits are only half of it. Mark your form submission or demo request as a key event, and the Traffic acquisition report shows key events next to each source / medium. Now flyer / qr-code isn't just "42 sessions" (illustrative), it's "42 sessions, 3 demo requests."

That's still where GA4 stops.

What GA4 can't tell you about QR codes

QuestionCan GA4 answer it?
How many sessions each code startedYes, if the URL was tagged
How many times a code was scannedNo. GA4 counts visits that loaded the page and ran the tag, so a scan that never loads, or a visitor whose consent choices block analytics, won't show up as a normal session
Which placement drove the leadOnly if every placement has its own utm_content
Which code produced a closed dealNo. Deals live in your CRM, not in GA4

That last row is the one your budget depends on. A scan on Tuesday can turn into a demo request three weeks later, from a different page. To credit that deal to the flyer, the UTMs have to survive the visit and land on the lead. Persisting UTM parameters across pages shows how to keep them, and capturing UTM parameters in hidden fields shows how to put them on the form.

Why GA4 QR tracking breaks in practice (and how Trakt helps)

The setup above is simple. Keeping it clean across a dozen printed pieces isn't:

  • Someone makes a code from the untagged homepage URL "just this once".
  • Two people name the same flyer flyer and Flyer.
  • The scan becomes a lead days later, on a different page, and the form records Direct.

How Trakt closes the gap

Trakt's QR code generator builds the tagged URL and the code together. You pick the placement from a list, and the medium is always qr-code, so the spelling can't drift. On your site, Trakt remembers the UTMs in a first-party cookie for 90 days, so a form submitted days later in the same browser still carries the QR campaign. It records each submission with its source attached, even when the form has no hidden fields, and credits won deal value to that source in Trakt's leads pipeline.

Trakt doesn't send anything into GA4. A GA4 integration is planned, not live, so keep reading scans in GA4 and revenue in Trakt.

GA4 alone vs. Trakt, by requirement

RequirementGA4 aloneTrakt today
Consistent names on every codeManual, case-sensitivePlacement from a list, medium fixed to qr-code
Scans counted as sessionsTraffic acquisition, by source / mediumNot a GA4 replacement. Keep GA4 for this
QR source on the leadHidden fields plus a script to persist UTMsRecorded with each submission, 90-day cookie
Revenue by QR campaignNot available in GA4Won value credited to the source in Trakt's pipeline
A tagged URL encoded in the codeRequiredSame either way

Trakt in action · Revenue by channel

See which channel closed the deal

When a deal closes, its revenue lands on the channel the lead came from, so the report shows revenue and return for each source.

app.trakt.pro/reports/revenue
Revenue by channel
Last 90 days
ChannelSpendLeadsRevenueROAS
LinkedIn$3,20027
Google Ads$4,80042
Tradeshow$6,00012
Meta$2,60031
SSarah MitchellGoogle Ads · spring_launch
Won · $14,000
Sample data, not customer data.Try it in TraktSee how it works

What to do before your next print run

Pick one QR code that's already out in the world. Scan it, and read the address bar. If you see utm_medium=qr-code and a campaign name, open Traffic acquisition and find its row. If you see a bare URL, that code has been reporting as Direct since the day it was printed, and the next batch needs a tagged URL before it goes to the printer. Build it in the QR code generator, then add the "QR codes" channel so every future scan lands in its own row. QR code vs URL helps decide where to print a short link next to the code.

Start free with Trakt to keep the QR campaign on every lead it brings in.

FAQ

How do I track QR code scans in Google Analytics?

Put UTM parameters on the URL before you make the code: utm_source for the placement, utm_medium=qr-code, and utm_campaign for the campaign. GA4 then records each scan that loads the page as a session with those values. Find them in Reports → Acquisition → Traffic acquisition with Session source / medium as the dimension.

Why do my QR code visits show as Direct in GA4?

The code opens a URL without UTM parameters, or a redirect removes them. A scan has no referrer, so with nothing in the URL GA4 can only call it Direct. Scan the code with a phone and read the address bar. If the parameters are missing, regenerate the code from the full tagged URL.

What utm_medium should I use for QR codes?

Use one value on every code, such as qr-code, so all scans group together. GA4's default channel group has no QR rule, so that medium lands in Unassigned. Create a custom channel group with a "QR codes" channel where Medium exactly matches qr-code, and put it at the top of the list.

Can Google Analytics count QR code scans?

Not directly. GA4 counts sessions that load your page and run the tag. A scan that never opens, or a visitor whose consent choices block analytics, won't appear as a normal session. If you need a raw scan count, use your QR code provider's numbers and treat GA4 sessions as the visits that followed.

Do I need a different QR code for each placement?

Yes, if you want to compare placements. Give each one its own utm_content value, such as front-desk or mailer, and generate a separate code from each URL. One code reused on a flyer, a poster and a mailer can only tell you the total.

How do I see revenue from QR codes?

GA4 can't show it, because closed deals live in your CRM. Keep the QR code's UTMs on the visitor across pages, save them with the form submission, and copy them onto the deal. Then filter won deals by utm_medium=qr-code and group them by campaign.