QR Code UTM Parameters: How to Tag a QR Code (With an Event Example)
Add UTM parameters to the URL before you generate the QR code, use a short link so you can change it later, and give QR traffic its own channel in GA4.
Part of our guide to tracking marketing campaigns.
The short answer
Build the UTM-tagged URL first, then turn it into a short link and generate the QR code from the short link. Use a placement-specific value for utm_source (where the code is printed), a consistent utm_medium such as qr, and utm_content to tell individual codes apart. In GA4, add a custom channel group so QR scans do not land in Unassigned.
Why tag a QR code at all
Without UTMs, a scan usually arrives with no referrer and is reported as direct traffic. You see the visit but not that it came from the poster at the entrance rather than the flyer at the desk. Tags turn each printed code into its own row in your reports.
Which values to use
utm_source: the physical placement or publication, such as venue-poster, flyer or packaging.
utm_medium: one value for all QR traffic, such as qr. Keep it identical everywhere.
utm_campaign: the campaign the code belongs to, such as summer-fest-2026.
utm_content: which specific code, such as entrance-a or table-tent-3, when one campaign has several placements.
Use a short link, not the raw URL
A long URL with five parameters makes a dense code that is harder to scan from a distance. Encoding a short link keeps the code simple, and a dynamic short link lets you change the destination after printing without reprinting. See static vs dynamic QR codes and QR code size and placement.
Make QR traffic visible in GA4
GA4's default channel group has no QR or offline channel, so a medium like qr lands in Unassigned. Create a custom channel group with a channel named QR whose rule is "Session medium exactly matches qr", and place it above the default channels. Custom channel groups apply to past data too.
Worked example: tracking event ticket sales
A festival prints QR codes in three places: city posters, a flyer in partner cafés, and the ticket desk at a sister event. Each code points to a short link for https://example.com/tickets tagged utm_source=city-poster, cafe-flyer or ticket-desk; utm_medium=qr; utm_campaign=summer-fest-2026; and utm_content for the poster version.
Mark the ticket purchase as a key event in GA4. A report of key events by session source then shows which placement sold tickets, not just which got scans. If posters drive scans but café flyers drive purchases, the next print run shifts budget to cafés.
Frequently Asked Questions
Can you add UTM parameters to a QR code?
Yes. Add them to the destination URL before generating the code. Using a short link keeps the code easy to scan and lets you change the destination later.
What utm_medium should I use for QR codes?
Any consistent value works; qr is the most common. GA4 does not recognise it by default, so add a custom channel group to report QR traffic as its own channel.
Why does my QR traffic show as direct?
Scans usually arrive without a referrer. Without UTM parameters, GA4 has nothing to attribute the visit to, so it reports it as direct.
Sources
Join 14,000+ marketing growth leaders
Receive our bi-weekly breakdown of campaign analytics setups, attribution rules, naming tactics, and link-stitching blueprints. Direct to your inbox.
More on measuring campaigns
Back to the guideWhy Your Analytics Numbers Don't Match Your Ad Platform's Numbers
Ad platforms and GA4 use different attribution windows, conversion definitions, and tracking visibility, so mismatched numbers are usually expected, not broken.
Static vs Dynamic QR Codes: The Difference That Saves You Money
Static QR codes lock in a destination forever; dynamic codes stay editable and add scan analytics, which is why most marketing should use dynamic.
Connecting Offline Campaigns to Online Sales: A Framework
A single UTM-based framework can unify tracking across flyers, direct mail, trade shows, and every other offline channel into one comparable report.