Hi all - I’m looking for some guidance on tracking links to PDFs via Google Analytics so I can see how many times a PDF has been downloaded.
I’m currently using Universal Analytics and having looked online I’ve added the following code to each link which goes to a PDF:
<a href="pdf/online-safety-for-kids-tips-for-parents.pdf" target="_blank" onclick="_gaq.push(['_trackEvent','Download','PDF','online-safety-for-kids-tips-for-parents.pdf']);">Online Safety for Kids – tips for parents</a>
But none of the clicks are showing in the stats.
Any ideas where I might be going wrong?