1

I have a QR code on my site that links people to the mobile app store. Since it isn't a click but rather a QR code scan done on the user's mobile device, what is the recommended way of tracking this action in Google Analytics?

I was thinking it would be an immediate meta refresh from a blank page on my domain to the app store, as in: <meta http-equiv="refresh" content="0; url=https://example.com/">, with example.com being the app store URL.

If the content is set to 0;, would GA still be able to pick up the UTM parameters? Or would it need to be set to 0.5;? Or something else?

Or perhaps there is a more reliable tracking method entirely.

2 Answers 2

1

Changing content="0" to 0.5 only changes the delay before refreshing.

Have you tried adding a querystring to the URL <meta http-equiv="refresh" content="0; url=https://example.com?source=QRclick">

1
  • Right, I was wondering if changing the delay from 0 to a half second would be necessary for GA to catch the UTM parameters, do you know if that matters? The URL that would be in the meta tag would be the app store URL, so I wouldn't be able to get GA data if I added parameters to it.
    – Jake 1986
    Commented Jul 27, 2021 at 1:47
0

Google Analytics doesn't work on redirects. You need the UTM parameters on the landing page. Just pass them along from the redirect. So rather than:

https://example.com/qrcode?utm=foo -> https://example.com/

use:

https://example.com/qrcode?utm=foo -> https://example.com/utm=foo

Or just get rid of the redirect altogether. Have the QR code send visitors directly to the home page with the correct utm parameters:

https://example.com/utm=foo

3
  • Thanks Stephen, the domain that QR code links to is not one of mine. For the android QR code it goes to play.google.com, for example.
    – Jake 1986
    Commented Jul 27, 2021 at 12:59
  • 1
    Then Google Analytics is probably not the right tool for the job. You should track it via access logs instead. Steve's solution with the half second delay may work 90% but it is adds frustrating delay for users and will miss some slower clients. Commented Jul 27, 2021 at 13:11
  • I see, thank you Stephen. I was skeptical whether GA would be reliably usable for this.
    – Jake 1986
    Commented Jul 27, 2021 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.