Tracking Downloads in Google Analytics

Posted by on Mar 23, 2009 in Technology, Web Development | No Comments

The next time someone tells you that you can’t track downloads in Google Analytics (like links to PDFs, movies, or other assets that don’t reside on an actual page) tell them they’re full of crap. =) Provided you’re using the newer ga.js method you are golden. Check it out here.

The one gotcha is that the ga.js code can’t be at the bottom of the page, which is non-typical, and could increase page rendering times. The reason Google’s ga.js code goes at the very bottom is to prevent the latency of connecting to Google from adding to the page’s render time. Since the code is now at the top of the page, there’s no way to avoid the (admittedly only potential) latency problem.

But hey, you can track your document downloads! =)

Update: Also works for offsite links.

Leave a Reply

You must be logged in to post a comment.