Block Google Analytics Cookies to Stop Staff Contaminating your Data
Nov 25, 2008 · 2 minute readCategory: business
This is post is now quite old and the the information it contains may be out of date or innacurate.
If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub
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
# [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.