How to, among others, block google analytics java script urchin.js from revealing your site usage

Google Analytics is a fairly new service from google for site administrators/webdevelopers to monitor their site usage easily and free of charge. This is done by appanding a script tag in your html file (or so your site script’s add it to the code they produce) right before the end of the </body> (the UA-something is your individual Google Analytics user agent id so I x’ed it out not to vilify the source):

<script src="http://www.google-analytics.com/urchin.js"; type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-xxxxxxxx-1";
urchinTracker();
</script>

However some might not want to reveal such information (or data in the first place). You can direct your browser via a locally installed instance of privoxy and set a roule in user.action saying:

{ +block +handle-as-empty-document }
.google-analytics.com/urchin.js

Daniel even suggests to filter it out in the first place so to not even load the html code needed to get the script of googles’ site:

FILTER: google-analytics Remove Google Analytics JS.
s|<script\s[^>]*?google-analytics.com/urchin.js[^>]*>.*?</script>||gis
s|\burchinTracker\(\);||gis

This would go into the file default.filter.In privoxy’s version 3.0.5-beta-1 this issue is supposed to be included, anyway. But unfortunatelly it seamed not to work for me. At leased the html source code still includes the relevant script section. Maybe privoxy filters out the communication. But on the other hand privoxy doesn’t normally know about communication done via java (and java script also?). I’m uncertain here and would love clarification from readers. If you run privoxy you’ll get more information on your instance by calling config.privoxy.org (which really is filtered out by your local proxy and run locally, since you most likely will have opted to enable bypassing proxy Google Analytics script remotely calledon local traffic in your browser this is somewhat consequent). I’m new to privoxy but this looks like the script should be blocked. But why is it still there? So I tested it and found bypassing the proxy when calling the remote script directly you get the script’s source code displayed — nothing special so far. But when I turned on proxy settings in my browser with only the above user.action lines I only get a blank page. So I guess it means it will only block the content of the script not occurrences in <script>-tags. But the important thing here is the script never makes it into my local memory so it can’t be executed.
Ressources:

How ebay Germany helps us to learn whom we buy from

Have you ever wanted to know what size of bra your opponent has you should consider buying at ebay Germany. The German radio station B5 aktuell pointed out that in their broadcast “Das Computermagazin” on April 8th this year ebay happily send address data to those whose bid was accepted. Using google earth, google maps respectively and ebays’ lists of previous bids it seamed an easy task to find out about the seller’s erotic favours and optic abilities. The best bit is the ironic manner in which the journalist talks about his findings. If you know German you should digg right into Minute 10 of B5s’ podcast and find out about the Bremen newspaper.

Follow

Get every new post delivered to your Inbox.