Google analytics for QR code PDF download

mattjeffery

Free Member
Sep 5, 2013
34
1
Hi

I hope someone can help. I am in the process of creating a QR code that when scanned will instantly open up a PDF document. I would like to track each time a person scans the code in google analytics. I have the url (which can also be accessed by clicking a button on my site). Then i have added parameters to the URL through google URL builder and then shortened it through goo.gl. Then i created the QR code from the shortened URL. However how do i get the analytics on the page since it is a direct download of a PDF rather than a html page.

any help will be appreciated
 

andygambles

Free Member
Jun 17, 2009
2,616
687
Scarborough
Hi

I hope someone can help. I am in the process of creating a QR code that when scanned will instantly open up a PDF document. I would like to track each time a person scans the code in google analytics. I have the url (which can also be accessed by clicking a button on my site). Then i have added parameters to the URL through google URL builder and then shortened it through goo.gl. Then i created the QR code from the shortened URL. However how do i get the analytics on the page since it is a direct download of a PDF rather than a html page.

any help will be appreciated

You are not going to be able to. You can use the onclick event tracking to register clicks to download a PDF but this still has to be performed on a HTML page.

You will need to build a redirect page. So create a HTML page that loads the GA code and tracking information. Then once loaded redirects the user to the PDF download.
 
Upvote 0

mattjeffery

Free Member
Sep 5, 2013
34
1
Ok i have figured out how to do the redirect page. now i just need to add analytics to that redirect page. Does anyone know how i go about adding the analytics to the page? Also i have set the redirect time to 10 seconds as i heard if it is less then it may be considered spam. In this instance as it is for a QR code is it OK to use less than 10 second to redirect.

Thank you in advance.
 
Upvote 0

fisicx

Moderator
Sep 12, 2006
46,665
8
15,360
Aldershot
www.aerin.co.uk
Just go to the page code and add the analyics according to the instruction given by the service provider

Does it have to be a pdf? Can't you just put the content on a webpage? That way is can be responsive and bookmarked. If you make it an orphan page then Google won't find and index it.
 
Last edited:
Upvote 0

fisicx

Moderator
Sep 12, 2006
46,665
8
15,360
Aldershot
www.aerin.co.uk
If you have access to the page code it's just a copy and paste job. Some goes in the header, some goes in the footer - each provider is different.

I'd also have rethink about the redirect. It's not spam, they have done the QR code thing and landed on the page. You then have a nice big button on the page to download or view the pdf. Add a bit of branding and your contact number and you could have a great little lead generator.
 
Upvote 0

fisicx

Moderator
Sep 12, 2006
46,665
8
15,360
Aldershot
www.aerin.co.uk
Upvote 0

andygambles

Free Member
Jun 17, 2009
2,616
687
Scarborough
Bitly will work well if you want an overview of numbers (and give you a QR Code)

See: https://blog.servertastic.com/become-a-bitly-power-user/

For the redirect page make sure you give it enough time to load the GA tracking code before you do the redirect. The best way to do this is to use a Javascript redirect which loads AFTER the GA code. Maybe shown a message to the user at the same time like "Preparing your download".
 
  • Like
Reactions: fisicx
Upvote 0

Latest Articles