Why QR Codes Show as Direct Traffic in GA4

QR code shorteners can strip UTM parameters on redirect, hiding print campaigns in GA4 Direct traffic. Why it happens and how to fix it.

Your trade catalogue is printed, the fleet of vans has new signage, and every QR code is meticulously tagged with a UTM tracking link. Yet, when you look at Google Analytics 4, the campaign shows zero visits. Instead, you have a massive, unexplainable spike in Direct traffic.

Analytics platforms record what arrives in the browser. If your QR code uses a shortener or a vanity URL, it relies on a server redirect to send the user to the real landing page. If that server is not explicitly told to carry your tracking parameters along for the ride, they get stripped instantly.

The user sees the right page. GA4 sees a visitor arriving with no referrer and no campaign tags. The dashboard gets a Direct visit. You get absolutely nothing to prove your print spend worked.

The mechanics of a stripped campaign tag

To track a print campaign in GA4, you append query parameters to the URL. The standard format is ?utm_source=qr&utm_medium=print&utm_campaign=catalogue_2026.

Printing a massive, dense QR code that contains a 150-character tracking URL is a bad idea. It is ugly, it requires the user to hold their phone perfectly still, and it cannot be updated if the landing page changes. So, marketing teams use QR shorteners or vanity domains. The printed code points to a clean, short URL like trade.link/cat26.

When a user scans that code, their phone sends a request to the trade.link server. The server looks up the destination and issues a 301 or 302 redirect command, telling the phone to load yourwebsite.com/trade-offers.

Here is where the tracking dies. Unless the redirect server is configured to pass query strings forward (a setting known as Query String Append or QSA) it simply drops everything after the question mark.

GA4 is a client-side tracking script. It cannot see the journey; it only sees the destination. It looks at the final address bar on the user's phone, sees yourwebsite.com/trade-offers with no UTMs, and checks the HTTP referrer. Because the user scanned a code rather than clicking a link on another website, the referrer is empty. GA4 defaults to the only category left: Direct.

What it does to your commercial decisions

We see businesses struggle to justify print and offline marketing budgets because the digital measurement is fundamentally broken by a bad redirect.

The journey of a stripped QR code

What the user doesWhat the server doesWhat GA4 records
Scans trade.link/cat26?utm_source=qrRedirects to website.com/offers (Drops the ?utm...)Notes the arrival URL.
Waits for the page to loadServes the HTML and the GA4 JavaScript fileChecks the HTTP referrer. Finds it empty.
Browses the offers(Server role finished)Categorises the session as Direct / (none).
Completes an enquiry form(Server role finished)Credits the conversion to Direct traffic.
The commercial resultA seamless user experience.Zero attributed return on investment for the print campaign.

When print campaigns show zero return, finance directors pull the budget. You might be cancelling a highly profitable catalogue simply because a server configuration file is missing five characters of code.

Consider a distributor who spends heavily on trade show signage and printed branch materials.

Illustrative figures: The lost offline budget

Campaign SourceScans Recorded by ShortenerEnquiries in GA4 (Attributed)Enquiries in GA4 (Actual)
Trade Show Banners8500(Hidden in Direct)
Branch Counter Flyers1,2000(Hidden in Direct)
Van Decals4000(Hidden in Direct)
Total ROI reported2,450 scans0 conversionsSignificant unmeasured pipeline

The shortener platform shows 2,450 people engaged with the physical assets. GA4 shows zero return. If you judge performance purely on the GA4 campaign report, you will make a catastrophically bad budget allocation for the next quarter.

How we fix the tracking gap

We check what happens all the way through the redirect chain. We take the exact QR codes printed on your materials and trace the server hops using network inspection tools.

If the UTMs are being stripped, we fix the mechanism.

There are two ways to solve this. The first is server-side. If you control the vanity domain, we update the redirect rules. For an Apache server, this means adding the [QSA] flag to the rewrite rule. For Nginx, it means appending $is_args$args to the redirect string. This forces the server to pick up your UTMs and carry them to the final destination.

The second, and more robust, method is to use dynamic QR codes correctly. Instead of pointing a static QR code to a shortener, which then points to a tagged URL, we embed the fully tagged destination URL directly into the dynamic QR platform's dashboard.

The printed code points to qr.provider.com/xyz. When scanned, the provider's server looks up the destination and issues a redirect directly to yourwebsite.com/offers?utm_source=qr&utm_medium=print. Because the UTMs are baked into the final destination rule rather than appended to the short link, they survive the journey.

We test the implementation on actual mobile networks to ensure the tags arrive intact. Then we verify that GA4 correctly categorises the traffic rather than dumping it into the Unassigned channel.

The aim is straightforward. When your catalogue generates a lead, your analytics platform should prove it.

Frequently asked questions

Does a 301 or 302 redirect make a difference to UTMs?

The redirect type (301 permanent vs 302 temporary) does not cause the stripping. The stripping is caused by the server's rule for handling query strings. However, we recommend 302 redirects for marketing links because browsers cache 301s. If you make a mistake on a 301, a user who scanned it once will keep hitting the broken cached version even after you fix the server.

Why do the clicks show up in Bitly but not in GA4?

Bitly and other URL shorteners log a click when their server receives the request. GA4 logs a session when the final landing page loads and executes JavaScript. If the redirect strips the tags, Bitly correctly counts the click, but GA4 incorrectly categorises the arrival as Direct traffic.

Can we recover the historical QR code data in GA4?

No. GA4 processes data at the time of collection. If a session was recorded without UTM parameters, it is permanently logged as Direct traffic. You cannot retrospectively apply campaign tags to historical sessions.

How do I test a QR code before it goes to print?

Never trust a browser click for QR testing. Print a rough copy on paper, disconnect your phone from the office Wi-Fi (to avoid internal IP filters), and scan it using a mobile data connection. Check the GA4 Realtime report to ensure the session registers with the correct campaign source and medium.

Does Apple's tracking protection strip UTMs from QR codes?

Apple's Link Tracking Protection (LTP) removes specific individual user identifiers (like Google's gclid or Facebook's fbclid) from links in Mail and Messages. It does not currently strip standard, campaign-level UTM parameters (utm_source, utm_campaign) from QR code scans.

Related reading