Tracking Downloads with Google Analytics

Posted by Floyd Price Mon, 27 Jul 2009 16:05:00 GMT

Once upon a time ago you would have installed your Web Traffic Analytics software on your server which would process your logs, however Google have completely changed the game and made it so easy to record your stats by pasting a simply bit of JavaScript in to each page.

The down side of this is that Downloads and Other Server Side actions can not be captured, and if Conversion Tracking is your game (and why wouldn't it be) you really need this metric.

Well it turns out Google know a think or two about this and have in fact got a solution that Really Kicks The Llama's Ass.

If you have a download link like:

  <a href="/downloads/my_killer_app.zip">Download Now</a>

You can add a little Google Analytics magic by replacing it with:

  <a href="/downloads/my_killer_app.zip" onclick="javascript:pageTracker._trackPageview('/downloads/my_killer_app');">Download Now</a>

This little gem will now record each click on your download link and register it in Google Analytics.

Top Job Google!


About

We are a small British company that produces business-oriented software and solutions. These articles are a product of our daily work - information that we think might be useful to share. We hope you find them useful.

Our Software

These are some of our products. Several are open source, some are web-based and others are proprietary:

Categories

Archives

Syndicate

ml> ._trackPageview(); } catch(err) {} ml> l> pageTracker._trackPageview(); } catch(err) {} ml> ._trackPageview(); } catch(err) {} ml> l>