×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Rick Clark
Added: Sep 27, 2012 6:58 PM
Views: 42
Tags: no tags
  1. <a href=”pdfs/my-file.pdf” target=”_blank” onclick=”_gaq.push(['_trackEvent','Download','PDF',this.href]);>Download my file</a>
  2.  
  3. <a href=”pdfs/my-file.pdf” onclick=var that=this;_gaq.push(['_trackEvent','Download','PDF',this.href]);setTimeout(function(){location.href=that.href;},200);return false;>Download my file</a>