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
- In Google Analytics, open Admin → Data streams, pick your web stream, and copy the Measurement ID (it looks like
G-XXXXXXX). - On the same stream, open Measurement Protocol API secrets and create a secret.
- In DynaQR, open Integrations and find Google Analytics 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:
| Parameter | Value |
|---|---|
code_id | The code's ID |
source | qr for a scan, link for a link click |
country | Two-letter country code |
city | City |
device | ios, android, desktop or other |
rule_id | The 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.