Block Google Analytics Cookies to Stop Staff Contaminating your Data
Tuesday, November 25th, 2008Many webmasters use Google Analytics to track their web traffic. This is a good idea and can be really useful in helping you to optimise your site and maximise your conversions.
However if your staff are constantly browsing your site, they will totally contaminate the data.
It is easy to block this though. All you need to do is add the following line to your HOSTS file
CODE:
-
# [Google Inc]
-
127.0.0.1 www.google-analytics.com
Finding Your HOSTS file
The hosts file is located in different locations in different operating systems and even in different Windows versions:
- Windows NT/2000/XP/2003/Vista: %SystemRoot%\system32\drivers\etc\ is the default location, which may be changed. The actual directory is determined by the Registry key \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath.
- Windows 95/98/Me: %WinDir%\
- Linux and other Unix-like operating systems (including iPhone OS): /etc
- Mac OS 9 and earlier: System Folder: Preferences or System folder (format of the file may vary from Windows and Linux counterparts)
- Mac OS X: /private/etc (uses BSD-style Hosts file)
- OS/2 and eComStation: "bootdrive":\mptn\etc\
- Symbian 1st/2nd edition phones: C:\system\data\hosts
- Symbian 3rd edition phones: C:\private\10000882\hosts, only accessible with file browsers with AllFiles capability, most are not.
