Is it possible to use Google Analytics to track file downloads?

The only true way to analyze web traffic on your site is to look at the actual log files on your web server with something like WebTrends, SmarterStats, AWStats, etc.


Google Analytics can't analyse your log files, for that you'd need the paid version called Urchin. What you can do though is track clicks/interactions on links to files. You can track clicks in two ways, as virtual page views or as events. Generally speaking, event tracking would be the recommended way to track downloads.


It's always bothered me too that Google Analytics doesn't track file downloads out-of-the-box. One would think this is a common scenario...

I had the same issue and Googled around. Learned two things. First, make sure you're using the newer Asynchronous Google Analytics. The asynchronous GA will make your website load faster. Finally, track file downloads automatically. The manual recommendation made by Google gets tiring quickly - especially if you have a lot of file downloads like me.

To track file downloads automatically, I use an extension to Google Analytics called Entourage.js:

http://techoctave.com/c7/posts/58-entourage-js-automatic-download-tracking-for-asynchronous-google-analytics

The developer has a really good installation guide and an explanation of his thought process while developing the extension. Check it out!

For me it was as easy as installing Entourage.js into my scripts directory like so:

<script type="text/javascript" src="/scripts/entourage.js"></script>

Followed by my GA code afterwards.