Blog/Analytics

How to measure a QR code with UTMs, step by step

01 Sep 20267 min readEquipo Gaucho

A QR code doesn't count scans on its own. We show you how to add UTMs so you can measure in Google Analytics where each visit comes from, step by step.

You stick a QR code on a flyer, hand it out at an event, and then have no way of knowing how many people scanned it or whether it did anything. It's the most common problem: a QR code on its own doesn't measure anything.

The solution is to pair it with UTMs. Here we explain what each one is, why together they let you measure where every visit comes from, and the step-by-step to do it right — without expensive tools.

What a UTM is

They're little bits of text added to the end of a URL, after a question mark (?), to signal where a visit came from.

For example, a URL with UTMs looks like this:

https://tusitio.com/lanzamiento?utm_source=evento&utm_medium=qr&utm_campaign=lanzamiento_2026

The page opens exactly the same: the site ignores those parameters when showing the content. The one that reads them is Google Analytics, which picks them up from the address bar and stores them as the source of that visit.

There are five possible parameters, but the first three are enough:

ParameterAnswersExample
utm_sourceWhere does it come from?evento
utm_mediumThrough what medium?qr
utm_campaignFrom what campaign?lanzamiento_2026
utm_contentWhich specific piece? (optional)banner_ingreso
utm_termPaid-search keywordnot used offline

Fun fact

UTM stands for Urchin Tracking Module, after Urchin, the company Google bought in 2005 that later became Analytics.

What a QR code is (and what it doesn't do)

It's a two-dimensional barcode. Instead of lines, it uses a grid of little black-and-white squares —the modules— and each one represents a bit. What it encodes is text: in our case, a URL.

  • The corners: the three large squares are position patterns. They tell the camera where the code is and at what rotation.
  • The center: the rest of the modules are the data, the URL encoded in binary.
  • The margin: the white border around it is the quiet zone. Without it, the reader can't find the code.
The three parts of a QR code: corners (position), center (the data) and margin (quiet zone).

The camera recognizes the pattern, decodes it into text and, if it's a URL, offers to open it in the browser.

The key thing

The QR code does nothing more than that. It doesn't connect to the internet, doesn't count scans, doesn't store data. It's an address written in a format the camera knows how to read. All the measurement happens afterward, when the browser opens the page.

From there come two practical consequences:

  • The longer the URL, the more modules the code has and the smaller each one gets. That's why it pays to shorten the link before generating it.
  • It has error correction: up to ~30% of the code can be covered or damaged and it still reads. That's why you can put a logo in the center.

Why it pays to combine them

When someone scans a QR code, the camera opens the browser straight at the URL. There's no previous page, so the browser sends no referrer: no data at all travels to say where that person came from.

To Analytics, that visit is identical to someone who typed the address by hand: it comes in as (direct) / (none) and blends into all the rest of the traffic.

The UTM solves that by writing the source inside the URL itself. It's the only way to know that visit came from the event's QR code and not from somewhere else.

The full path: from scanning the QR code to the source appearing in your GA4 reports.

The process, step by step

In the Campaign URL Builder you fill in source, medium and campaign, and it builds the URL with the UTMs for you.
  1. 1
    Have the final URL ready: the definitive destination-page address, with HTTPS and already published.
  2. 2
    Add the UTMs: in Google's Campaign URL Builder you paste the URL, fill in source, medium and campaign, and it hands you back the finished URL. Copy it.
  3. 3
    Shorten it (optional but recommended): a URL with UTMs runs about 140 characters, and that makes for a dense QR code. Check that the short link opens with the parameters intact.
  4. 4
    Generate the QR code: in Canva's QR code generator you paste that URL and download the code. For print, in vector format (SVG or PDF).
  5. 5
    Test it before printing: print it at actual size and scan it with two or three different phones. Make sure the URL that opens has the utm_ parameters in the address bar.
  6. 6
    Look at the data: in GA4 go to Reports → Acquisition → Traffic acquisition and switch the dimension to Session source/medium. There you'll see evento / qr.
In GA4, with the Session source/medium dimension, your QR code shows up as its own row: evento / qr.

Three rules that save you headaches

  • Everything lowercase and without accents. Analytics is case-sensitive: QR and qr are two different rows in the report.
  • A different utm_content for each physical piece. That's what lets you know whether people scan the banner or the flyer more, and not just that "the event went well".
  • A printed QR code can't be changed: the URL is baked into the image. A typo in a UTM means an entire print run with no measurement.

Measuring well is what separates "I think it worked" from actually knowing what worked. If you want your brand to have measurement sorted end to end —UTMs, GA4, events and clear reports—, take a look at what we do or get in touch and let's talk it over.

Want to apply this to your business?

Let's talk. We analyze your situation and tell you what we'd do.

Schedule a call