Monday, September 24, 2007

Google Analytics

The issue of page counting is one that is raised regularly, not just on Wikibooks but on many other WMF projects as well. There are plenty of good reasons why the software doesnt do this automatically, not the least of which is the caching mechanism. However, in a recent wikibooks discussion, the possibility of using the free Google Analytics service has been raised. Some users, myself included, have installed the google analytics script into their own personal javascript files.

I personally access Wikibooks through multiple browsers (IE6 and IE7, Firefox, Safari), so i'll be able to test the script in a variety of ways. I'll be looking at the accuracy and relevancy of the results, as well as the performance of using this tool. If everything is on the up and up, we may start seeing a few recommendations that this script be loaded into the common.js file, at which point we will get the site-wide statistics that we've always wanted. Of course if this doesnt work out, we will go back to counting page hits the old-fashioned way: on our fingers.


  1. Hello,

    You do not want to add google analytics in the commons.js without refering to brion and Google.

    Wikimedia could easily generate a denial of service by implementing the script on its projects.


  2. You're right that we do need to talk to a few people first. When we get through the small-scale test, and if we decide to go global, we can figure out how it can be made to work.

    I don't see how a global installation would enable a DoS attack. A vandal right now could install this script in their own monobook.js page and launch an attack without a global installation.

    We will certainly talk to brion first before we do anything like this, however.

  3. The DOS will come from the number of hits received by wikimedia sites. I am not sure Google can handle that without prior warning. ;)