How to Add UTM Parameters to a QR Code
A technical, step-by-step walkthrough for tagging a destination URL with UTM parameters before you generate the QR.
To add UTM parameters to a QR code, append ?utm_source=poster&utm_medium=qr&utm_campaign=spring_launch to your destination URL, then paste that full tagged URL into a dynamic QR generator. When someone scans the code and lands on your page, Google Analytics 4 reads the UTM values and groups the visit under the right source and campaign.
What UTM parameters are
UTM parameters are small key-value pairs you bolt onto the end of a URL. They don't affect what page loads. They sit in the query string so analytics tools can read them and tag the visit with a source, a medium, and a campaign name.
The format dates back to Urchin, the analytics company Google bought in 2005. The acronym stands for Urchin Tracking Module. The convention has stuck around because every major analytics platform reads the same five keys. The Wikipedia entry on UTM parameters covers the history.
For QR codes, UTMs are how you answer the question "where did this scan come from?" without having to guess. A poster, a flyer, a product label, and a magazine ad can all point to the same landing page, but each one carries a unique tag. In your analytics dashboard, the four sources show up as four separate rows.
The five UTM keys explained
There are five standard UTM keys. The first three are required for clean reporting. The other two are optional.
- utm_source — where the traffic came from. Example: poster, flyer, product_label.
- utm_medium — the marketing channel. For QR codes, common choices are qr or offline.
- utm_campaign — the campaign name. Example: spring_launch or holiday_2025.
- utm_term — optional. Originally for paid search keywords. Rarely used for QR.
- utm_content — optional. Used to tell two versions of the same campaign apart, like red_poster vs blue_poster.
Pick a naming convention up front and stick to it. Lowercase, underscores instead of spaces, no special characters. UTM values are case sensitive, so Spring and spring show up as two different campaigns in your reports. That's almost never what you want.
Building a tagged URL
The structure is the same as any URL with a query string. Start with the destination, add a ?, then chain key-value pairs with & separators.
https://example.com/landing?utm_source=poster&utm_medium=qr&utm_campaign=spring_launch
Read it left to right: the page is /landing, the source is poster, the medium is qr, the campaign is spring_launch. That's a complete tagged URL ready to drop into a QR generator.
If you want to tell two versions of a poster apart, add utm_content:
https://example.com/landing?utm_source=poster&utm_medium=qr&utm_campaign=spring_launch&utm_content=red_variant
Avoid spaces. If a value really needs a space, encode it as %20 or use an underscore. Avoid uppercase unless your whole convention is uppercase. Don't include sensitive data in UTM values; they get logged in plain text in browser history and server logs.
Some teams build a small spreadsheet of approved UTM values and copy from it every time. That's a reasonable habit. It prevents typos that fragment your reports.
Generating the QR from the tagged URL
Once you have the tagged URL, the rest is simple. Paste it into a QR code generator and download the image. The QR pattern encodes the entire URL, query string and all.
There's a catch with static QR codes: a long URL means a denser pattern. The pattern still scans, but the modules get smaller. If you print at a small size, scan reliability drops. The fix is to use a dynamic QR code, which encodes a short redirect URL like app.qrcodefordonation.com/q/spring. The redirect server then forwards to the long tagged URL.
The benefit is twofold. First, the printed pattern stays clean even if the destination URL is huge. Second, you can edit the destination later without reprinting the QR. Both are real advantages for any campaign with UTMs. Use a dynamic QR code generator for this.
If you want a memorable redirect path on your printed asset, see custom short URLs for QR codes. A clean handle like /q/spring looks better in fallback text than a random slug.
How GA4 captures the values
Google Analytics 4 reads UTM parameters automatically. As soon as a tagged URL loads in a browser with the GA4 tag installed, the values get parsed and stored on the session. You don't have to write any custom code.
Inside GA4, the values map to these dimensions:
- utm_source → Session source
- utm_medium → Session medium
- utm_campaign → Session campaign
- utm_content → Session manual ad content
- utm_term → Session manual term
You can find these dimensions under Acquisition → Traffic acquisition, or build a custom report. Google's official documentation on collecting campaign data with custom URLs walks through the GA4 specifics.
Two things to watch for. First, GA4 has its own redirect handling, so a session that bounces through your QR redirect server still records the final UTMs from the destination URL. That's the behavior you want. Second, if your destination is a single page app, make sure the GA4 tag fires on the initial page load so the UTMs aren't lost on a client-side route.
Once UTMs flow into GA4, you have everything you need to compare scan sources. Combine that with your QR scan logs from a dynamic QR code with tracking dashboard, and you have full coverage from scan to conversion.
Frequently asked questions
Can a QR code carry UTM parameters?
Yes. The UTM tags are part of the destination URL the QR code encodes. The QR doesn't know about UTMs, but the analytics tool that reads the loaded URL does.
What UTM parameters should I use for a QR code?
At minimum, set utm_source, utm_medium, and utm_campaign. Use utm_medium=qr or utm_medium=offline so QR traffic groups together in reports.
Will UTM parameters break the QR code?
No. They make the URL longer, which slightly increases the QR pattern density. Using a dynamic QR avoids the density issue because the pattern only encodes a short redirect URL.
Where do UTM values appear in Google Analytics 4?
GA4 captures UTMs into source, medium, and campaign dimensions. You can find them under Acquisition reports and Traffic acquisition.
Should UTM values be lowercase?
Yes. UTM values are case sensitive. Picking a single case (lowercase is standard) prevents Spring and spring from showing up as two different campaigns.
Keep reading
Tag your URL. Print your QR. Watch the scans roll in.
Generate a dynamic QR code that points at any UTM-tagged URL and report on it cleanly in GA4.
Create a tagged QR →