I am sure many of you already know how to do this, but I bet some have been lazy and just let it slide. I'd rather leave as little a footprint as possible.
Its pretty straight forward, just add this to your hosts file:
127.0.0.1 www.google-analytics.com
127.0.0.1 google-analytics.com
127.0.0.1 ssl.google-analytics.com
Your host file is located at:
c:\windows\system32\drivers\etc\hosts For XP, Vista & 7
/etc/hosts for most Linux systems & Macs
cool tip, thanks
The hosts file might be too drastic for some.
Google has the Google Analytics Opt-out Add-on for Chrome: https://chrome.google.com/extensions/detail/fllaojicojecljbmefodhfapmkghcbnh?hl=en
You could also use add-ons like Disconnect or Ghostery which would do the same thing. Ghostery works on FireFox as well.
I'm not sure why I want to block my self from Analytics.. does it really matter if a webmaster is going to know I came from G and made 3 pageviews.. Am I missing something here besides the paranoia? :)
It can speed up your browsing if you aren't pulling the Analytics JavaScript every time you visit a new site.
...and then yes, there is the tin-foil hat aspect as well. ;)