Google Analytics vs AWStats

Google analytics

If you have any type of web presence or you do any type of Internet marketing you need to track your website traffic as well as measure the success or failure of your various marketing efforts. Big content websites use rating agencies like Nielsens to track their website traffic. For smaller sites, standard web statistics tools, such as Google Analytics, AWStats, or Webalizer will usually suffice. Let’s say you’ve decided to use Google Analytics as well as AWStats (since most web hosting companies offer AWStats as part of their hosting packages). After doing all the necessary setup and collecting data for a few days, you were probably pretty confident that you were going to get, at the very least, similar figures between the two packages. What you’ll find instead is a significant difference between the numbers reported by the two programs. What gives?

Log file analyzers vs tracking code

Though both Google Analytis and AWStats show website statistics, they are actually completely different in terms of how they operate. AWStats is hosted on your web server. To access the data, you normally log into the server’s web-based control panel (for shared servers) or you log into AWStats directly (if you installed it on your dedicated server). Your web server generates and stores a log for every visit to each site that is hosted on the server. AWStats then processes these log files to generate its reports. That is why it is called a log file analyzer.

Google Analytics, on the other hand, requires specific code to be loaded onto every page of your website. This code, which uses a combination of Javascript and cookies, notifies Google each time one of your pages is visited. To access your site’s statistic you then log into Google Analytics console online at

The biggest difference between the two is how they report page views. If you are using both AWStats and Google Analytics, you will soon notice that Awastats will reflect more page views than Google Analytics. For many websites we’ve worked on, Google Analytics will sometimes reflect only about a third of the number you see in AWStats.

How the numbers differ

One source of the difference is the number of non-human visitors to your site (web crawlers or spiders). AWStats is a log file analyzer and relies on the web server logs for its info. These logs also record the visits coming from these non-human visitors. AWStats will try to identify and exclude these visits but can’t do so with 100% accuracy. Google Analytics on the other hand doesn’t register these visits since most crawlers and spiders don’t run Javascript code.

Secondly, browsers will sometimes cache pages for display to the user. These cached pages do not make requests to the web server, so they are not tracked in the server logs, and therefore won’t appear in AWStats.

Google Analytics makes use of Javascript instead of processing log files. Since it is possible for an Internet user to disable cookies and/or Javascript in their browsers, Google’s code sometimes does not get run and therefore those visits are not counted. Luckily, very few users browse with cookies and Javascript disabled.

A more recent source of difference is that modern websites utilize AJAX to pull information from different scripts into one page. AWStats is not able to accurately record these requests. It will view all the scripts as several page views instead of one. Gooogle Analytics is more accurate in this respect and will count this as one page view.

What to do

We’ve shown several reasons why Google Analytics will differ from a log file analyzer like AWStats. Instead of focusing on the specific numbers, rather look at trends over time. If your AWStats numbers are moving upwards, your Google Analytics numbers will probably also be doing the same. If one particular page is more popular than others, this will probably reflect in both systems. Try to identify the trends and use this information to make decisions about your site. If you _have_ to choose between the two, you should pay more attention to the information you obtain from Google Analytics because its metrics are probably more dependable.