I've looked through the forum but can't find a definitive answer. Our SEO guy has asked me to add some code to PDF links so he can track the clicks on them.
My problem is the code requires a null link and onClick event which I can't make work, my current code opens the page in a new window and not the PDF.
Code: Select all
<a href="/{$page_alias}#" target="_blank" {literal}onclick="_gaq.push(['_trackEvent', 'Downloads', 'PDF', 'uploads/PDFs/document.pdf']);"{/literal}>