Google Analytics vs AWStats

Understanding web traffic statistics software

Aug. 20, 2018 -

This month I have been working on website statistics, tracking traffic using different technologies. Some of my customers use Google Analytics, others use AWStats, and some use both. Which is better is often debated, but few people really understand the differences. Time to shed some light on the magic of web statistics.

Comparing AWStats with Google Analytics

You might expect that both web analytics programs would report the same amount of website traffic, but this is not the case. I'll try to explain why reports from Analytics and AWStats differ (and why I think it doesn't really matter).

Google Analytics and AWStats - web traffic statistics software
Google Analytics and AWStats - web traffic statistics software

Google Analytics

As part of the Google Marketing Platform, Google Analytics is one of the most widely used web traffic analytics programs available. Google launched the service in 2005 after acquiring multiple software companies specialised in analytics, most notably Urchin and Adaptive Path.

How Google Analytics works

Google Analytics works by placing a small piece of programming code on your website (or inside your app). This initiates the tracking and profiling used by Google to generate web statistics. The code makes your internet device connect to the servers from Google - which then count all these connections to generate usage statistics.

Google Analytics availability

Google offers Analytics without charge: when you use Google Analytics you agree to share your traffic data with Google. This allows Google to combine Analytics data from different websites to create accurate profiles of people surfing the web. While these profiles are great to deliver personalised ads, they are also reason for privacy concern. Google Analytics is used on websites, inside apps and games.


Originally created by Frenchman, Laurent Destailleur in 2000, AWStats is a widely used server program that analyses web server log files. The name AWStats is an abbreviation for "Advanced Web Statistics".

How AWStats works

The web server log contains the complete record of website traffic. Inside the log file, individual connections between the web server and the internet device (phone, computer, tablet) are registered. After analysing this activity record, AWStats provides detailed insights in web traffic.

AWStats availability

Everybody can use AWStats as it is available as free software, including its source code. Earlier, I wrote about helping people with free software, explaining the benefits of free software (it's not just money). AWStats must have access to the server log files, which is often done by installing AWStats on the server itself. Because of this, AWStats has a limited scope. It is not able to track individual users across different websites. AWStats is used for web, mail, streaming and file servers.

Difference: unit of measurement

Probably the most important difference between the systems is the unit of measurement. Google Analytics mainly works with "Sessions" while AWStats uses (unique)visits:

Difference: where data is collected

In addition to the unit of measurement, the place where data is collected is different, too. AWStats uses the web server as place to measure. Quite literally the software tallies how often the server receives a request to deliver a specific page. The server responds to human visitors, but also to automated requests.


These automated requests are done by bots, computer programs that automatically surf the web. Often these bots have a specific task, like indexing a website for search engine listing. Most bots are identified by their originating IP-address or so-called UserAgent (a sort of identification text which states the origin of the bot; like "GoogleBot"). Most bots are not included in AWStats visits, but are specified in a separate listing.

Robots surfing the web: bot traffic listed by AWStats
Robots surfing the web: bot traffic listed by AWStats

Bad bots

Unfortunately not all bots behave nicely. Some of them are working for hackers to find potential security weaknesses. Others, like some search engine indexation robots, behave like humans to test if the website shows the same page to both humans and bots. Serving different content based on user agent is a bad practice used by stupid websites to manipulate search engine ranking.

Recognising bots

AWStats tries to recognise bot behaviour by taking into account the sequence and speed of page requests (like a normal, healthy human, should not be able to read more than two pages per second). But, this cannot prevent some bots to successfully disguise themselves as human, causing AWStats to count them along.

Part of a web server log file, each line corresponds with a page request - do you see the bot?
Part of a web server log file, each line corresponds with a page request - do you see the bot?


Instead of running software on the server like AWStats, Google Analytics works by executing code (JavaScript) on the device of the visitor. Depending on how the Analtyics JavaScript is integrated, the measurement is often delayed because it takes some time to load JavaScript. Sometimes it only starts after the entire page (including images and fonts) has completely finished loading. People that leave the page before it is entirely loaded, or people that have JavaScript disabled, are therefore not measured. Because Google Analytics requires JavaScript, most bots are not measured because it is hard for bots to simulate a JavaScript enabled browser.

Typical piece of Google Analtyics JavaScript code - you can clearly see it referring to Google's servers
Typical piece of Google Analtyics JavaScript code - you can clearly see it referring to Google's servers

Blocking Google Analytics

Because of the privacy concerns with regard to Google Analytics, some people actively block the JavaScript used by Google Analytics. There are browser plugins and ad blockers that do this automatically, without requiring any technical knowledge of the user. Another clever web developer used a purpose built server setup to find out how many people block Google Analytics. In his experiment, Jason Packer found that about 8-11% of the users are blocking Google Analytics.

Percentage of people blocking Google Analytics (2016), quantable.com - Jason Packer
Percentage of people blocking Google Analytics (2016), quantable.com - Jason Packer


Both the unit of measurement and the place where the measurement is performed cause the differences in statistics by Google Analytics and AWStats. Bots included, AWStats counts too much, while Google Analytics counts to little because of problems with JavaScript loading and blocking.

But in the end it doesn't really matter as you should use these statistic programs mainly to analyse relative performance. Consistent inaccuracies in absolute numbers do not really influence answers to questions like these:

If you really want to know who is visiting your website, you should really consider asking the visitor to identify him or herself. That is way more accurate (and polite!) than relying on Google Analytics or AWStats to identify unique persons. That way you don't have to worry about people having multiple devices and accessing your website from different locations like work, home or on the go (train, bus).

Use statistics software to track relative performance, but consider getting to know your visitor by connecting to them instead of collecting data from them. Build relationships instead of data profiles. That's where the value is.

What kind of traffic statistics software do you primarily use?

Did you enjoy this post?

If you found this content useful,
consider showing your appreciation
by buying me a coffee ❤️😋:

Reach out to me on :


Latest Stories

all CloudDataFree SoftwareNetworkingReviewServerWebdesignWork

Articles (148)