There are two major website statistics tracking programs that web developers and engineers use to track the effectiveness of the websites they build.  As it can be seen there are some discrepancies between them, which is what we will discover today.

The reason Awstats and Google Analytics produce different results is the factors they use to determine different hits as explained below:

 AWStats examines our Web server logs and counts every “hit” to any URL on your site. This includes “hits” to “404 not found” URLs that don’t exist and “hits” to URLs that aren’t Web pages (such as images that are hotlinked from other sites). It calculates “unique visitors” by checking whether the IP address of the hits is different.

Google Analytics, on the other hand, only counts “hits” to working HTML pages that you’ve added certain JavaScript code to. For example, it can’t normally count “404 not found” pages, or hotlinked images, or connections from browsers with JavaScript disabled, or visits from “spam harvesting robots” searching for e-mail addresses on your pages. And it calculates unique visitors differently: it uses a “cookie” on the visitor’s browser to see if the same person visits twice, even if they use different IP addresses.