Track the Number of Downloads of Individual Files

Have you ever needed to track the number of downloads of files? You can easily add any individual file into your Google Analytics report by using the snippet of code below.

<a onclick=”javascript: pageTracker._trackPageview(‘somefile.pdf’);” href=”somefile.pdf”>Download somefile.pdf</a>

Thank Sean Walther for the tip:

READ ALSO  How to Save Session Tabs in Firefox 5.0