Google Analytics Event tracking

Google Analytics

One of the most interesting parts for web site owners are the access statistics, and Google Analytics offers one of the most complete statistics solutions, which I use on a weekely basis for my most succesful blog El Canasto.

Besides being a typical blog with pages, I offer calendars for downloading, and of course I also want to track those downloads. When two years ago I started with the downloads I search Google`s help files for a solution to track them, and found a small javascript sniplet that when a visitor clicks on a download link registers the download as a pageview. This trick allowed me to analyse the downloads.

The disadvantage of this trick is that it inflates the pageviews, and I never have been completely satisfied about this solution. You can imagine my happiness when last week I discovered the Event Tracking feature, designed specifically to track downloads, videoplays, etc.

I quickly changed my code to use a javascript sniplet like the following:

onclick="javascript:pageTracker._trackEvent('Downloads', 'XLSX', '/calendario-compacto/calendario-compacto-2009'); "

This sniplet registers the download under the category Downloads, the action XLS and the label /calendario-compacto/calendario-compacto-2009. Google Analytics has Event reports by category, action and lavel, so now I know for example which of the four file file formats are more popular:

Events report by file type


Leave a comment

mensuales Archives

Recent Entries

  • Manifiesto «En defensa de los derechos fundamentales en internet»

    Ante la inclusión en el Anteproyecto de Ley de Economía sostenible de modificaciones legislativas que afectan al libre ejercicio de las libertades de expresión, información...

  • Commenting not possible

    I just discovered that it currently is not possible to comment on this blog. At first sight it looks like the problem is caused...

  • Back from the CeBIT

    I am back from the CeBIT show. Actually, I came back on Monday, but have been too busy to post. This year has been...

  • Downloading viruses?

    I just saw the screen above, which is the ClamWin antivirus software uploading its virus database. On the left hand side they have an animation...

  • New: Google Notebook

    I know that Spain usually lags behind the rest of the world, but Google Spain really doesn't know what is going on. While all...

Close