Google Analytics 4

Send a qr_scan event to GA4 for every human scan.

On Starter and up, we send a qr_scan event to your Google Analytics 4 property for every scan, using the Measurement Protocol. This works even when the code doesn't open your website, for example when it opens a PDF or a phone number.

Set it up

  1. In Google Analytics, open Admin → Data streams, pick your web stream, and copy the Measurement ID (it looks like G-XXXXXXX).
  2. On the same stream, open Measurement Protocol API secrets and create a secret.
  3. In DynaQR, open Integrations and find Google Analytics 4.
  4. Enter the Measurement ID and API secret, then click Save.

The API secret is stored encrypted. Owners and admins can change these settings.

The event

Event name: qr_scan. Parameters:

ParameterValue
code_idThe code's ID
sourceqr for a scan, link for a link click
countryTwo-letter country code
cityCity
deviceios, android, desktop or other
rule_idThe redirect rule that matched, if any

Bots and link previews aren't sent. Events are retried if Google doesn't accept them. If events seem to be missing, open Recent deliveries in the Webhooks section of the Integrations page. GA4 deliveries are listed there too.

To see code names in GA4, match code_id to the ID in the code's URL in your dashboard, or to the codeId column of a scan export.

Combine with UTM tags

If the destination is your own site, also turn on UTM tags so page views from scans are attributed too.