How to track downloads in Google Analytics automatically

From the article:

How to track downloads in Google Analytics automatically

The official Google Analytics help says that any link can be monitored if this script is added in the link:

onclick=”pageTracker._trackPageview(‘/file_name.file_extension’)

Adding this script to every download link on your website can be a laborious task. The simple solution we found is to use a JavaScript that automatically attaches event listeners to files which are downloaded from your web pages.

~ by WPA Staff on March 22, 2010.

Leave a comment