Help me block those stupid Google Analytics __utma cookies!
June 6, 2007 7:52 PM   Subscribe

I've had it with the endless stream of __utma/b/c/z cookies spewed forth by Google Analytics from every website on the planet. Is there a Firefox extension that will block them, perhaps based on the NAME being "__utm*"? I'm tempted to pay someone to create such an extension ...

In this AskMefi post from Nov 2005, I lamented how the newly free Google Analytics software had made web surfing far more tedious for me because of how I allow/block cookies. Nearly 2 years later and I still hate it.

Now, I know someone's going to say "geez, just block all cookies". Uh huh. Have you ever tried to surf the web (and Web 2.0 in particular) and block all cookies? Exactly. See the original AskMefi post above for more about this.

It occured to me recently that one solution would be for Firefox to block any cookie whose NAME (not value) is "__utma", "__utmb", "__utmc" or "__utmz", or more generally "__utm*". It would do so without prejudice, and in particular without considering or interfering other cookie rules that I might have set up for a particular site. I have hundreds if not thousands of those rules, like "allow all cookies from" which turns out to be necessary for MeFi to work with a logged in user.

So, can anyone think of a way to do this in Firefox, or think it would be doable for less than, say, $50?
posted by intermod to Computers & Internet (19 answers total)
Tried this? (First hit off... google).

If it works... Paypal:
posted by puddpunk at 7:58 PM on June 6, 2007

Well I just tried it and it works - no cookies turned up in my cookie jar when I visited a site using Google tracking.

That page also offers another solution, set to in your hosts file will prevent the urchin.js from being loaded in the first place and avoiding the cookie drop.
posted by puddpunk at 8:04 PM on June 6, 2007

Shouldn't he be sending that payment to Google?
posted by alms at 8:06 PM on June 6, 2007

Really, it should go to the developer of the extension (not me) but I figured if someone was willing to throw money at something without doing a cursory web search I might as well give it a shot.

On the chance that you did actually come across that before asking here and for some reason that extension doesn't fit your needs I'm sure that the author of the extension would be willing to break out that specific functionality into a separate on for you for a little bit of dosh.
posted by puddpunk at 8:13 PM on June 6, 2007

Response by poster: Sonofabitch. I googled first using some keywords, but never the actual question. Durr. Thanks puddpunk.

I'll let this question cook for a day and then will try out the CustomizeGoogle extension.

Hey, this might be the straw that finally gets me off Mozilla on my older machines.

on preview: Good idea about throwing some money at the CG guy(s), if I can figure out how. I'll try out the full-blown CG extension first and see how that goes. I do prefer smaller targeted solutions ...
posted by intermod at 8:27 PM on June 6, 2007

I use Cookie Safe with the default of blocking all cookies, and selectively allow sites.
posted by Zed_Lopez at 11:07 PM on June 6, 2007

(alternatively, you could allow them by default, and selectively block by domain or subdomain)
posted by Zed_Lopez at 11:10 PM on June 6, 2007

I threw* in Opera's content blocking list (because they're so often slow as crap, dragging the parent sites down with them) -- I'm sure you can do the same with Firefox's AdBlock.
posted by Freaky at 11:22 PM on June 6, 2007

Privoxy is great for blocking this sort of thing.
posted by Zonker at 4:22 AM on June 7, 2007

Like Freaky said, I block the entire google-analytics domain with an AdBlock wildcard.
posted by box at 5:03 AM on June 7, 2007

If you don't like that extension, I think you could just use Firefox itself to block cookies.

Under tools/options/privacy, there's a checkbox for 'accept cookies', with an Exceptions button. If you click Exceptions, type in, and click Block, I believe Google will be blocked from sending you all further cookies. If you then remove the ones you already have, you should be cookie free, without needing any extensions.
posted by Malor at 5:25 AM on June 7, 2007

Response by poster: OK, everybody who commented after my last comment at 11:27pm ET, thanks but it's not that simple. As discussed in the old AskMefi linked above, I'm well aware of all the basic cookie blocking tools and have been using them for years and years. These cookies are not coming from a single domain! The CustomizeGoogle page about this describes the problem well.

Thanks though.
posted by intermod at 6:20 AM on June 7, 2007

intermod: Presumably cookies are being set from the JS loaded from (hence they're being set in the context of the site they're being <link>ed from, not Google), so blocking that JS from loading in the first place should solve the problem without resorting to additional extensions (unless you don't already have adblock).
posted by Freaky at 8:42 AM on June 7, 2007

This is the easier way:

add "" (minus quotes) to your hosts file. In windows its here: C:\WINDOWS\SYSTEM32\DRIVERS\etc

This will block your computer from making connections to google's urchin servers. The script will never run.
posted by damn dirty ape at 8:50 AM on June 7, 2007

What Freaky said, use NoScript to block google-analytics script altogether. It's amazing and also an extension I avoided installing for a long time because, imho, the description sounds complicated when it's really very easy to surf, effectively!, with it.
posted by anaelith at 9:04 AM on June 7, 2007

Now, I know someone's going to say "geez, just block all cookies". Uh huh. Have you ever tried to surf the web (and Web 2.0 in particular) and block all cookies? Exactly. See the original AskMefi post above for more about this.

Geez, just block accept all cookies. It's not worth your time. Anyone who wants to do anything trackery is going to be able to do it via the cookie you need to even use the site. Ad-based tracking cookies can be handled with adblock.

Does it not drive you nuts, having all these clicks just to load a page?
posted by bonaldi at 10:44 AM on June 7, 2007

Also, firefox allows you to set cookies to "accept once per session." This way you can accept all the cookies you want and when you close the browser it deletes them. You can specify this on a per-site level. If you want to invest some time this is a good solution.
posted by damn dirty ape at 11:45 AM on June 7, 2007

Response by poster: Thanks Freaky for the script loading clarification. I'll try that hosts hack -- which I already use on my Linux machine for adservers that hosts those awful lowermybills motion ads. I like this solution the best because then I don't have to install an extension and run risk of extension problems (plenty of those stories on the interwebs). Native Firefox all the way :)
posted by intermod at 6:27 PM on June 8, 2007

Response by poster: A followup ...

The hosts hack only blocks the cookies that have been ordered by the script hosted at Some sites have the UTM javascript hosted locally, like

and in those cases I get the cookies again.

Now, I did indeed see a big improvement with just the hosts hack, but if I want to really get rid of all of them, it looks like I'm back to using the CustomizeGoogle extension. Oooooookay.
posted by intermod at 11:10 AM on June 9, 2007

« Older Names joined before?   |   "You walk in to the restaurant, all strung out... Newer »
This thread is closed to new comments.