How-to
How to Use UTM Parameters with QR Codes and Track Them in GA4
Add UTM tags to the URL your QR code opens, like ?utm_source=qr&utm_medium=flyer, and GA4 shows those visits by source and campaign instead of as direct.
By the myqr team · Updated · 7 min read
The short answer
- Add UTM parameters to the destination URL, such as utm_source=qr, utm_medium=flyer and utm_campaign=winter-sale.
- With a dynamic QR code the tags live in the editable destination, so they stay off the printed code and can be fixed later.
- In GA4, open Reports, Acquisition, Traffic acquisition and switch the view to Session source / medium.
- Scan counts and GA4 sessions measure different moments, so expect more scans than sessions.
To use UTM parameters with a QR code, add them to the end of the URL the code sends people to, for example yourcafe.com/menu?utm_source=qr&utm_medium=table-tent&utm_campaign=fall-menu. When someone scans, the tags reach your website, and Google Analytics 4 reports that visit under the source, medium and campaign you chose instead of lumping it in with direct traffic.
With a dynamic QR code, put the UTMs in the destination URL rather than the printed code. They stay invisible on paper and you can fix or change them later.
What are UTM parameters?
UTM parameters are short tags added to the end of a link that tell your analytics tool where a visit came from. They start after a question mark and are joined with ampersands.
Google Analytics recognizes these standard ones (Google's URL builder documentation lists them all):
| Parameter | What it describes | QR code example |
|---|---|---|
utm_source | Where the visit came from | qr |
utm_medium | The type of placement | print, flyer, table-tent |
utm_campaign | The promotion or campaign | fall-menu, spring-open-house |
utm_content | Which version or spot | patio, window, back-cover |
utm_term | A paid search keyword | Usually not used for QR codes |
Only the first three are needed in most cases. utm_content is handy when one campaign has codes in several places.
Why do QR code visits need UTM parameters?
Without UTMs, most QR code visits look like direct traffic in your analytics. When someone opens a link from their phone's camera, there's no website referring them, so analytics has nothing to go on. Your flyer, poster and menu visits blend in with people who typed your address or used a bookmark.
UTMs fix that by labeling each visit. You can then see how many sessions came from QR codes, which campaign drove them, and what those visitors did on your site.
How should you name UTM parameters for QR codes?
Pick one naming pattern and use it every time. A simple pattern that works well for print:
utm_source=qrfor every QR codeutm_medium=the placement or format, such asprint,flyer,poster,packagingortable-tentutm_campaign=the campaign, such asfall-menu-2026orgrand-openingutm_content=(optional) the specific spot, such aspatioorfront-window
A full example for a poster in a shop window:
https://yourshop.com/sale?utm_source=qr&utm_medium=poster&utm_campaign=winter-sale&utm_content=front-window
A few naming rules save headaches later:
- Use lowercase only. GA4 treats
QRandqras two different sources. Google's own documentation notes that parameter values are case sensitive. - Use hyphens, not spaces. Spaces get encoded into ugly characters and are easy to mistype.
- Write it down. Keep a short list of the values you use, so next season's codes match this season's.
Where do the UTM parameters go?
Put UTM parameters in the destination URL or on the dynamic code, never in the printed pattern. With a dynamic QR code, that's the address you paste into the code's settings, or the code's own UTM fields if your QR tool has them. In myqr, each code has UTM fields (with presets for your account) that are added when someone scans; see QR code campaign tracking.
This has three practical benefits:
- The printed code stays short. The code only contains the short link, such as
myqr.sh/menu. A short link makes a simpler code with fewer squares, which is easier to scan at small sizes. - You can edit the tags later. Spotted a typo, or reusing the code for a new campaign? Change the destination and every printed copy reports under the new campaign from then on.
- Nobody sees them. Guests just see a clean code. The tags only appear in the address bar after the redirect.
What if you use a static QR code?
A static QR code stores the full URL in its pattern, so the UTMs are printed into the code itself. That works, but the longer URL makes a denser code that needs to be printed larger, and you can't fix a mistake after printing.
If you go static, for example with our free QR code generator, keep the values short (utm_source=qr&utm_medium=flyer&utm_campaign=sale) and test-scan the printed proof. Static vs dynamic QR codes covers the trade-off in full.
Parameters on the short link itself
myqr also passes query parameters from the short link through to the destination. If you share myqr.sh/menu?utm_source=newsletter somewhere, the visitor arrives with that tag added. If the destination already has a parameter with the same name, the destination's value is kept. For printed codes, keep tags in the destination or the code's UTM fields; it's simpler and keeps the code short.
How do you see QR code results in Google Analytics 4?
In GA4, go to Reports, then Acquisition, then Traffic acquisition. Change the table's first column from "Session primary channel group" to Session source / medium, then look for rows like qr / poster or qr / table-tent.
To break it down further:
- Add Session campaign as a secondary dimension (the plus icon next to the first column) to see results per campaign.
- Use the search box above the table and type
qrto show only QR traffic. - Look at engagement and key event columns to see whether QR visitors browse, sign up or buy.
To check that tagging works before a print run, scan your test code, then open Reports, then Realtime and look for the visit. Standard reports can take a day or two to fill in.
Why do QR visits show as "Unassigned"?
GA4's default channel groups (Organic Search, Email, Referral and so on) don't include print or offline. A medium like poster or table-tent doesn't match any of Google's channel rules, so these sessions appear as "Unassigned" in the channel view. That's expected. Use the source / medium view described above, where your tags appear exactly as you wrote them.
How do UTM data and QR scan analytics work together?
They measure different moments, so use both. Your QR code tool counts the scan at the redirect. GA4 records what happens once the visitor's browser loads your site and runs the analytics script.
| myqr scan analytics | Google Analytics 4 with UTMs | |
|---|---|---|
| When it counts | At the scan, before the page loads | After the page loads and analytics runs |
| Counts people who leave before the page loads | Yes | No |
| Counts people who block analytics or decline cookies | Yes | Usually not |
| Shows device, browser, country and city | Yes | Yes |
| Shows pages viewed | No | Yes |
| Shows sign-ups and sales | With Pro conversion tracking | Yes, with conversions set up |
Expect myqr's scan count to be higher than GA4's session count for the same code. The gap comes from people who bounced before the page loaded, use content blockers, or declined a cookie banner. myqr also counts repeat visits by the same person within an hour once and filters out known bots, while GA4 has its own session rules, so the numbers will never match exactly.
myqr doesn't connect to Google Analytics directly; there's no integration to set up. UTMs work because they travel with the visitor to your site, where your own analytics reads them. For more on what scan data shows, see how to track QR code scans. To credit sales and sign-ups to each printed code inside myqr as well, see QR code conversion tracking.
What are common UTM mistakes with QR codes?
These are the ones that cause the most confusing reports:
- Inconsistent casing.
Flyer,flyerandFLYERbecome three separate rows. Stick to lowercase. - UTMs on internal links. Never add UTMs to links between pages of your own site. They replace the visitor's real source in your reports, so a QR visit can end up credited to your own homepage.
- Long URLs in static codes. Every extra character adds squares to a static code. Long UTM strings can make a small code hard to scan.
- The same tags everywhere. If your flyer and poster both say
utm_medium=print, you can't tell them apart. Use the medium or content value to separate them. - Redirects that drop the tags. Some websites redirect visitors (for example, from one page address to another) and lose everything after the question mark. Scan a test code and check the final address bar still shows your UTMs.
- Typos you can't fix. With a static code, a misspelled campaign name is permanent. With a dynamic code, you can change the destination after printing.
A quick setup checklist
- Decide your naming pattern and write it down.
- Build the destination URL with
utm_source,utm_mediumandutm_campaignin lowercase. - Paste it as the destination of a dynamic QR code, so the printed code stays short.
- Scan a test print and confirm the tags appear in the address bar and in GA4's Realtime report.
- After launch, compare scans in your QR tool with sessions and conversions in GA4.
Running a campaign across flyers, posters and mailers? Our page on QR codes for print marketing has more ideas.