Tracking links to PDFs with Google Analytics

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?

You might give this link setup a try.

<a onclick=“_gaq.push([‘_trackEvent’, ‘PDF’, ‘Download’, ‘/some/pdf/file.pdf’]);”" href=“/some/pdf/file.pdf”>Download this PDF</a>