On this page
  1. Tag the destination URL, then make the code
  2. Choose values GA4 can file
  3. Long link or short link inside the code
  4. Check the link before you print
  5. What GA4 sees from a scan
  6. Sources

To track a QR code in Google Analytics 4 (GA4), put the tracking in the link: add utm_source, utm_medium and utm_campaign to the destination URL, then make the QR code from that tagged URL. Google's campaign URL help (opens in a new tab) has you add these parameters to destination URLs and always use all three. When someone scans the code and views the page with no session already active, GA4 starts a session (opens in a new tab) and attributes it from the UTM parameters on its session_start event.

Tag the destination URL, then make the code

Start with the page you want people to land on. In Google's URL builder help (opens in a new tab), utm_source is the referrer, with billboard among its examples; utm_medium is the marketing medium, such as cpc, banner or email; and utm_campaign is the product, slogan or promo code, such as spring_sale.

A flyer for a spring sale could carry this link:

example.com/spring?utm_source=spring-flyer&utm_medium=qr&utm_campaign=spring-sale

The free UTM builder builds a campaign URL with UTM parameters for GA4, with no signup. Copy the finished URL into your QR code tool as the destination.

Some QR tools add the parameters for you. In Bitly (opens in a new tab), you click Create new and select QR Code. The steps include entering the destination URL and toggling the UTM parameters switch to enter your UTMs in the relevant fields. The feature is available on some paid Bitly plans, and the parameters do not show up on the short link.

Build a campaign link

Create a UTM link with the free builder. No account needed.

Choose values GA4 can file

Parameter values are case sensitive: Google's campaign URL guidance (opens in a new tab) treats utm_source=google and utm_source=Google as different values, and recommends lowercase as a standard practice. It also recommends one unique utm_medium for each distinct channel, so pick one medium for your QR codes and reuse it on every code. A missing parameter shows up as (not set) in reporting.

In GA4, channels are rule-based definitions (opens in a new tab) of your traffic sources. A few rules matter for print:

  • Referral matches a medium of referral, app or link.
  • Email matches a source or medium of email, e-mail, e_mail or e mail.
  • Unassigned is the value GA4 uses when no other channel rule matches.

Channel definitions are not case sensitive and cannot be edited. So decide up front: a medium the rules match puts QR visits inside that channel, and a medium of your own, such as qr, keeps them apart but lands in Unassigned unless a rule matches it. Related guides: GA4 default channel group and GA4 unassigned traffic.

More on naming: utm_source vs utm_medium, the UTM naming convention guide and UTM examples by channel.

You can put the full tagged URL in the code, or a short link that redirects to it.

A Bitly QR code (opens in a new tab) is basically a scannable form of a short link. On all paid Bitly plans you can redirect a Bitly Code (opens in a new tab): anyone who scans the original code lands on the new page you entered, and the associated short link is redirected too.

UTMTool's free UTM builder does not shorten links. Paid plans shorten links with 2link.in and track their clicks next to the full URL, so you can put the short link in your QR code tool and keep the tagged original beside it.

A short link adds a redirect, and when a landing page redirects, the campaign information appended to it can be lost on the way. The redirect checker puts the rule plainly: tag the final URL, not the redirect.

Check the exact link the code holds before it goes to print.

  1. Paste the tagged URL into the UTM link checker. It shows what is wrong with its UTM parameters, which GA4 default channel it should land in, and a fixed link to copy. Nothing you paste leaves your browser.
  2. If the code holds a short link, paste that exact link into the redirect checker. It follows the link through every redirect and shows, hop by hop, whether its UTM parameters reach the final page.

Both checks have limits. The link checker reads the text of the link only: it does not open the page, follow redirects or check that your analytics tag is installed. The redirect checker does not run the page's JavaScript, so it does not follow a redirect made by a script. Then run the campaign link preflight checklist.

What GA4 sees from a scan

GA4 starts a session (opens in a new tab) when a user views a page and no session is active. The session_start event carries the information that decides the session's attribution, including the UTM parameters. You find the result under Acquisition > Traffic acquisition, which shows session source/medium and session campaign, per Google's campaign URL help (opens in a new tab).

Your QR tool counts something else. On some paid Bitly plans (opens in a new tab), you can view total scans, and scans by day, location, browser and operating system. On UTMTool's paid plans, the UTM builder shortens links with 2link.in and tracks their clicks next to the full URL.

Sources

Tools for this

Frequently asked questions

What utm_medium should a QR code use?

Pick one lowercase medium for your QR codes and use it on every code. GA4 files a medium of referral, app or link under Referral, and uses Unassigned when no channel rule matches.

Can I change where a printed Bitly QR code points?

With Bitly, yes, on all paid plans: you can redirect a Bitly Code, and anyone who scans the original code lands on the new page you entered.

Why do my QR scan counts and GA4 sessions differ?

A QR tool such as Bitly counts scans. GA4 starts a session when someone views a page with no session already active, and attributes it from the UTM parameters on the session_start event.

Build a campaign link

Create a UTM link with the free builder. No account needed.