By Conner Aiken
Apr 15 2026
...
You printed 10,000 flyers with a QR code. People are scanning it. But when you open Google Analytics, that traffic shows up as direct — lumped in with people who typed your URL manually. You have no idea which flyer, which location, or which campaign drove those scans.
This is the single biggest mistake marketers make with QR codes, and it takes about five minutes to fix. Here's exactly how to set up QR code tracking in Google Analytics 4 using UTM parameters so every scan is attributed, measurable, and actionable.
When someone scans a QR code, their phone opens a URL directly in the browser. There's no referring website, no search query, no click from an ad. As far as GA4 is concerned, that visitor appeared out of thin air.
GA4 categorizes any session without a referrer as direct traffic. That means your carefully planned QR code campaign gets buried alongside bookmark clicks and people who memorized your URL. Without intervention, you're flying blind.
The fix is UTM parameters — small tags appended to your destination URL that tell GA4 exactly where each visitor came from. When you encode a UTM‑tagged URL into your QR code, every scan becomes a fully attributed session with source, medium, and campaign data intact.
UTM parameters are key–value pairs added to the end of a URL. Google Analytics reads them automatically — no extra configuration required.
There are five standard UTM parameters, but for QR code tracking, three are essential and two are optional.
utm_source — Where the QR code physically lives. This is the placement identifier.
Examples:
store_windowproduct_packagingtrade_show_booth_14direct_mail_q2utm_medium — The channel type. For QR codes, use qr_code consistently across all campaigns. This lets you create a single GA4 segment that captures all QR‑driven traffic regardless of source.
utm_campaign — The campaign name.
Examples:
spring_launch_2026loyalty_programmenu_refresh_aprilutm_content — Differentiates variations when A/B testing. If you're testing two different QR code placements on the same poster (top vs. bottom), this is how you tell them apart.
utm_term — Less common for QR codes, but useful if you're running parallel paid search campaigns and want to distinguish QR traffic from keyword‑driven traffic.
Say you're running a spring promotion with QR codes on table tents in your restaurant. Your destination URL is:
https://yoursite.com/spring-menu
The tagged version looks like this:
https://yoursite.com/spring-menu?utm_source=table_tent&utm_medium=qr_code&utm_campaign=spring_promo_2026&utm_content=dessert_section
That single URL tells GA4:
table_tent — this visitor came from a table tent.qr_code — they arrived via a QR code.spring_promo_2026 — it's part of the spring promo.dessert_section — specifically from the dessert section placement.No ambiguity.
Here’s the exact workflow from URL to actionable data.
Use Google's Campaign URL Builder or build it manually.
Key rules:
QR_Code and qr_code create separate entries and fragment your data.%20 and make your reports unreadable.poster is useless when you have posters in 12 locations. Use poster_downtown_store or poster_mall_entrance.utm_medium. Pick qr_code and use it everywhere. Don't alternate between qr, QR, qrcode, and qr_code across campaigns.Get notified when we publish new articles about IT solutions, tech support, web development, and industry best practices.