Howto: block google analytics

One of the emerging google applications thouroughly used is the google analytics.

As stated in wikipedia, Google Analytics (often abbreviated GA) is a free service offered by Google that generates detailed statistics about the visitors to a website. Its main highlight is that the product is aimed at Marketers as opposed to webmasters and technologists from which the industry of web analytics originally grew. Currently google states that more than 1 million web sites are using google analytics in order to analyze the incoming web traffic.

Google analytics is cool mainly because it requires few and easy actions from the webholder  in order to  monitor the web traffic. In other words it is as simple as using a javascript snipet in every web page (you may locate it anywhere in the html source code) and voila! No extra programs are needed in order to analyze the web traffic.

On the other hand the other solution is the usage of server logs analysis programs that are a bit stiff to use. The most thoroughly used apps by web hosters are awstats, webalizer, w3perl, and analog none of which comes near close to the  efficiency of google analytics. This is due to the fact that these applications need the log files to be in some special format (must be configured explicitly in apache, IIS, or other web servers [2])

The main problem with google analytics and every single piece of information that google collects is given away freely. That it’s one thing to give Google full access to all of the information you enter into Google. Likewise it’s another thing to share with a third party the complete session history of everyone on any site. Google’s privacy policy ought to clearly and effectively spell out what they will do with this data. (They do promise not to give it away to a third party, but when you’re a large corporation you don’t need to give it away to extract a great deal of value.) They are also stating that the may combine the provided data with third companies in order to effectively improve the user expirience. But wait a minute! What does user expirience improvement really means? Many conspiracy theories [1] [2]  respond to this particular question with varius answers but the fact is that NOONE KNOWS! And since we better be safe than sorry the best course of action is to disable the google analytics (as well as google ads. There are reports that google ads code also sends information to google analytics databases). [3] Even though the google states that its self orientation is against  any harmful, or dishonest action, who can be totally sure? Especially when [2] the chinesse people are limited in their searches to only “politically correct” topics (notice that other nations have taken similar actions). Also the same holds for other google services eg per country disabled youtube videos etc…

How can we deal with the Google’s monitoring services?

There are two mainstream approaches  even though one could create his own obfuscation mechanism in order not only to disable the google tracking but also to confuse it ;-) We will discuss the first two option while the third is left to the creativity of the reader :-D

The first one has to do with DNS messing. In simple terms you only have confuse your own web browser making it unable to locate the google analytics page and thus making it impossible get the required script to submit the collected data. In linux this is possible by changing the file hosts in directory /etc by adding the following line: 127.0.0.1 google-analytics.com

In windows XP you have to tamper the system32\drivers\etc\hosts under your WINDOWS installation folder (add the same line: 127.0.0.1 google-analytics.com). Some other windows users reports that the file is in the root windows folder. In ANY CASE search at your windows installation folder for the file hosts and then make the above mentioned edit.

This method works because whenever an application (normally the web browser) wants to connect to google-analytics web site either for download or upload of information then the computer tells the application that this domain name is at the same machine, and when it tries to either send or receive data the connection fails because there is nothing to find there ;-)

The second method is to use third party software in your firefox browser called customizegoogle.  After the installation of the addon go to Firefox -> Tools -> CustomizeGoogle Options… -> Privacy and there tick the Don’t send any cookies to google analytics. This is not as good solution as the previous one because you are still sending data to the google-analytics and effectively the tracking is feasible from the combination of browser ID, Operating System ID and IP address which are static during an hours surf. This kind of protection actually allows the google-analytics to track you inside a website A but cannot link that information with tracking information from another website B (Meaning that google cannot come to the following conclusion; after user X visited website A pages 1,2 and 3 then he visited website B pages 2,7,11. Only partial conclusions are feasible; user X1 visited website A pages 1,2 and 3, user X2 visited website B pages 2,7,11)

The third method is a combination of the first and second methods. Firstly you redirect your requests on your localhost. Then you have to write a snipet of code that handles all these requests and in turns sends false data to google. in order to confuse it :-) Of course on every modern data mining platform outliars are almost instantly discovered but it would be fun though :-)

The reason for this article is that my university decided to outsource the website tracking to google fact that I judge is inappropriate for such an institution.

If anyone is intrested in exchanging ideas on how to trick google feel free to leave me a cooment with your actual email (emails are hidden from public view)

Leave a Comment

Name (required)

Mail (will not be published) (required)

Website

Comment