Web hosting statistics vs Google Analytics

By December 11, 2008Company News, Technical

We get the request from time to time, “can you track XYZ in the website statistics for our web hosting?” We get a bit of “Your statistics reports aren’t very pretty”. We include two very commonly used statistics generators with all shared web hosting, AWStats and Webalizer.

Both of these tools generate statistics using the logs that the web server keeps for every page request. These logs look something like this:

88.179.0.194 – – [11/Dec/2008:04:48:03 +1100] “GET / HTTP/1.1” 302 20 “http://www.google.fr/search?hl=fr&q=anchor+blog&start=10&sa=N” “Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4”

Without explaining the log file in detail, in summary, the above line tells us:

  • What IP address each request comes from
  • The date and time of the request
  • If the user clicked on a link to get to that page, the URL of the page they came from
  • Some details about the type of web browser they used

That’s it! There’s not a whole lot of information. From this, the statistics programs make a whole lot of correlations, or guesses and produce some graphs. Given how little information there is to begin with we have to accept that there’s a limit to how much information we can provide in the reports.

If you need more information there is an alternative. Years ago the alternatives were expensive commercial software, that was until Google purchased one of the companies and started to provide the service free of charge, calling it Google Analytics.

You’ll find plenty of information about this free service on the Google website but suffice to say it will generate just about any statistical type of report you can imagine. The graphs are also much prettier than ours.

Analytics works by using a small piece of code that is inserted into every page on your website (Javascript). With each page request, the code inserted reports information back to Google which is collated to generate the statistics. 

Because the data is collected at the browser level rather than via the web server logs, the information available for statistics generation is much much greater, hence the prettier graphs!

Note: You may need to get your web developer to help you insert the code sample.