Press enter to see results or esc to cancel.

Technologies  |  

AWStats vs. Google Analytics - What’s The Difference?

As website owners you probably wonder which is the best tool to measure your website’s performance - how many visitors it has, if the bandwidth and the website’s popularity increase, etc. There are different tools which provide statistics for those parameters in various ways. We inspired from an inquiry we very often face, but namely: “Why those two tools are showing different results?” Today we decided to reveal the mystery.

Statistics differ with all various tools for analyzing and tracking website bandwidth as this is valid not only for AWStats or Google Analytics. The reason is not that one of the tools shows incorrect data, but the different methods tools use to analyze the number of visitors, sessions, pages and hits on the website.

If you have already tried using both tools then you have probably noticed that for the same period of time statistics in Analytics show fewer users and pages viewed than those in AWStats. This can be easily explained with the two tools’ mechanisms.

How Does AWStats Work?

AWStats is a cPanel tool which enables you to track the visits on a certain website. Visits are grouped in months, days and hours as this allows easily noticing whether the bandwidth is increasing or not. The tool provides detailed information about the users - IP address, browser, where the user comes from and others. AWStats can be accessed in cPanel » AWStats.

AWStats в cPanel
AWStats in cPanel

AWStats is a logfile analyzer. AWStats is installed and works on the server where the website itself is hosted.

Данни и статистики, генерирани от записите в лога на уеб сървъра
Data and statistics generated from records in the web server log

To use AWStats you do not need to perform setup or add code to the website. Also, this tool does not use HTTP cookies or JavaScript code from the visitors’ browsers. Instead, AWStats tracks visitors based on their IP addresses. IP addresses are retrieved from the web server logs.

All queries to the website are recorded in the web server logs. Records contain information for the visitor’s IP address, the resource searched by the visitor, date, hour, status code and others. Through cPanel » Raw Access these logs can be viewed and through cPanel » Visitors you can also view them presented in a table.

cPanel - Visitors (Последни посетители)
cPanel - Visitors

The AWStats log analyzer is supported for all hosting services by SuperHosting.BG.

Statistics in AWStats

With AWStats statistics are very similar to those in Analytics, but different in terms of the way they were collected as they concern the number of unique visitorsvisits, and pages.

A unique visitor means a unique IP address in the log for a selected period of time. Here visitors are counted even if they are unknown for AWStats bots, autoscripts, system queries to the website or the website’s system itself, also another server application, the website's administrator or the content contributor. If you wish certain IP addresses not to be tracked, exclude them from AWStats. This may happen as you add those IP address/es to the SkipHosts parameter which is a part of its configuration file.

The configuration file for AWStats is located in the /home/cpuser/tmp/awstats directory on the hosting account. If an encrypted https connection has been enabled for the website, then the configuration file is located in the /home/cpuser/tmp/awstats/ssl subdirectory. The file name contains the website’s domain name, e.g. awstats.mysupersite.com.conf.

Visits in AWStats are based on a session of 1 hour (unlike Analytics where sessions last 30 minutes), during which the user has viewed pages from the website. So 1 visit equals 1 session.

Pages in AWStats are also URLs. Besides real webpages containing HTML code and ending in .html, AWStats can also treat each resource as a webpage with an ending which has not been specified in the NotPageList parameter of the configuration file. For example if the NotPageList="css js class gif jpg jpeg png bmp" setting is enabled, the following resources will be treated as webpages: php, Unknown, woff2, woff, svg, eot, xml, ttf, mp4, pdf, txt (without robots.txt, since this file has been excluded in the SkipFiles="robots.txt$ favicon.ico$" parameter).

AWStats will also treat as a website visitor:

  • Each IP address in the server log except for the known bots (such as Googlebot, bingbot, etc.) and the excluded ones in the configuration file;
  • Unknown for AWStats search engine bot or autoscript;
  • A user who has disabled HTTP cookies in the browser;
  • A user who has disabled executing JavaScript code in the browser;
  • A system query to the website by the website’s system itself or another server application;
  • The administrator supporting the website;
  • The user contributing content to the website;
  • A single visitor will be counted as one IP address which is used by a network of users (office & home networks with one IP address);
  • Multiple visitors will be counted as different IP addresses which a single visitor is using.

AWStats will not count visits correctly when:

  • The website is using CDN (Content Delivery Network) such as CloudFlare. Due to the CDN request, real queries do not go to the website itself, but to the CDN servers. In AWStats you will see the CDN IP addresses, recorded when the CDN service requested website content so as to copy it on its servers. In such cases visitor statistics are available in the CDN service.
  • The website is using web proxy (cache and web acceleration system) such as SuperCache.
    Similarly to the CDN service, some of the queries will not reach the website due to which they will not be present in the server logs. So AWStats will not track them as well. In such cases we recommend using Google Analytics to track visits on your website.

AWStats measures a lot more additional resources and queries to the website so the numbers in its statistics are considerably higher exactly because the different way it measures data.

How Does Google Analytics Work?

Google Analytics is a service for tracking and reporting visits and understanding consumer behavior. Analytics enables you to use reports, real-time data, audience data, and bandwidth data. You can learn more about your users - you can check demographics about them, if they use mobile or desktop devices, what are the direct or organic bandwidth resources to your website, you can track social networks, email campaigns, and many more.

Данни и статистики в Google Analytics
Google Analytics data and statistics

The data collected by the tool is stored on Google servers. To use the tool you need to register on https://analytics.google.com.

To track visitors, Analytics is using JavaScript code on each page combined with HTTP cookies. Upon loading a webpage, the code is executed and data is sent to Analytics.

Проследяващият JS код на Analytics
Analytics tracking JS code

A visit or visitor is counted only when a cookie with JavaScript is executed in the visitor’s browser. If any of the two is not available, a visit will not be counted.

Statistics in Analytics

Analytics tracks and processes considerably more data than AWStats, as only part of it concerns New Users, Users, Sessions, Pageviews, Unique Pageviews, Bounce Rate, % Exit and others.

Similar to AWStats data which differ in the way of counting are New User, Session and Pageviews.

In Analytics a New User means a visitor having a unique Client ID in the HTTP cookie. Actually a user may not be new if they have removed cookies from the browser, opened the website in another browser, if they are using an application for blocking cookies or are private browsing.

The Session in Analytics is based by default on time interval of half an hour, but it can be changed from the tool’s settings. If a user who is browsing the website, leaves it for more than 30 minutes, and then opens it again, this will be counted as two visits, two sessions. It is important to notice that for counting a new session in Analytics there may be many possible scenarios. Read more: How a Web Session in Analytics is Defined?

Pageviews - For Google Analytics, a page is counted only where a tracking code has been placed. The tool counts only HTML pages with tracking code. None of the other website resources is counted as a page. Pageview is an indicator, defined as the total number of pageviews.

Analytics will count a website visit when:

  • The visitor has not disabled HTTP cookies and JavaScript code in the browser.
  • The webpage loaded contains the JS code for tracking.

Analytics will not count visits correctly when:

  • The visitor has disabled HTTP cookies and/or JavaScript code in the browser.
  • The page is not completely loaded.
  • The tracking code did not load.
  • The visitor is a bot or an autoscript which does not support JavaScript.

To take advantage of all of the tool’s benefits you need more time and in-depth knowledge.

AWStats or Google Analytics? Both of them!

AWStats is the right tool for you if are looking for answers of questions like:

  • Is your website crawled by bots and which are they?
  • What IP addresses increase the bandwidth/number of visits the most?
  • Which resource from your website loads most often and how many hits it has?
  • Which are the most frequently loaded types of files and the most downloaded resources from your website?
  • How much bandwidth (MB,GB) is generated by visitors?
  • What error messages does the website return?
  • Are there missing resources which return an error 404?
  • Is there hotlinking to your website’s resources?
  • How to use AWStats for analyzing the CPU time used?

Google Analytics is the right tool for you if are looking for answers of questions like:

  • How many unique visitors your website has per day/week/month?
  • Where users come from and what they do on the website?
  • What are the keywords which lead visitors to your website and checkout/targets success?
  • Can I track real-time visitors on the website? How many visitors are currently online, did they visit the website from mobile or desktop, which are the main pages they viewed?
  • Which are the sources of bandwidth to the website - direct and organic bandwidth, visits from referral websites, paid search, social network bandwidth, email campaigns, etc.?
  • How to track the consumer behavior on the website and the way consumers interact with the website's content?
  • What is the percentage of the visits which led to a checkout/targets success for a specific period?
  • Can I track a visitor viewing the website’s different domains?
  • Can I get detailed reports? Can I get my reports by email?
  • I own a Shopiko store - How to make my first steps with Google Analytics?

Tip: Depending on your targets, we recommend using both of the tools. After you already know in what the two tools differ and in what way statistics are collected and processed you will be able to use each of the tools in a suitable way.

You can use AWStats to provide you with information about the bandwidth and accessed resources on the website directly from the logs generated on the server. On the other hand, you will also need Analytics which is a wonderful tool for researching, analyzing and representing the website, the consumers’ behavior and planning marketing strategies. This way you will be able to check if given promotions, posts on social networks or changes on your website achieve their goals and many other things.

Technical Support Specialist

Madlena is our super-support-guru. Madlena's SuperPower is that she can explain even the most complicated technologies in plain language.