.google-analytics.com/
OK, it seems that the greasemonkey script only works for urchinTracker, but not for the new ga script. Probably because .pageTracker is not the right thing?
Code: Select all
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-xxxxxxx-x");
pageTracker._trackPageview();
} catch(err) {}</script>
Code: Select all
var _gat = {tracker: {_trackPageview: function(){}}, _getTracker: function() {return this.tracker;}}
TYVM, works great on all sites I tested.
So If anyone else is interested in blocking Google Analytics completely without causing some sites to not work properly, simply add the filter
and a Greasemonkey UserScript like this
So If anyone else is interested in blocking Google Analytics completely without causing some sites to not work properly, simply add the filter
Code: Select all
||google-analytics.com^$third-party
Code: Select all
// ==UserScript==
// @name Google Analytics fix
// @namespace https://adblockplus.org/forum/viewtopic.php?t=4160
// @include *
// ==/UserScript==
window.setTimeout("window.urchinTracker = function(){};", 0);
window.setTimeout("var _gat = {tracker: {_trackPageview: function(){}}, _getTracker: function() {return this.tracker;}}", 0);
Last edited by Ares2 on Tue Dec 29, 2009 2:44 am, edited 6 times in total.
Yep, still freezes. But this site doesn't use the standard GA code (there is an additional script with .pageTracker), so it's just a problem with this specific site.tmr250z wrote:Really? Did you try it on typeracer.com?
I just did, and I'm still getting that browser freezing error I described here. Does that still happen for you too or is it just me?
Yeah, so I'm just going to add an exception for typeracer.com in the filter and the userscript.Ares2 wrote:Yep, still freezes. But this site doesn't use the standard GA code (there is an additional script with .pageTracker), so it's just a problem with this specific site.
Code: Select all
.google-analytics.com/$domain=~typeracer.com
Code: Select all
// ==UserScript==
// @name Google Analytics fix
// @namespace http://adblockplus.org/forum/viewtopic.php?t=4160
// @include *
// @exclude http://typeracer.com/*
// @exclude http://*.typeracer.com/*
// ==/UserScript==
window.setTimeout("window.urchinTracker = function(){};", 0);
window.setTimeout("var _gat = {tracker: {_trackPageview: function(){}}, _getTracker: function() {return this.tracker;}}", 0);
Re: .google-analytics.com/
se224141 wrote:I notice .google-analytics.com/ doesn't figure in Easylist.
http://www.google-analytics.com/urchin.js is not blocked at http://www.yogameditation.com/.
http://www.google-analytics.com/ga.js is not blocked at http://www.economist.com/.
Any specific reason.
Re: .google-analytics.com/
"@grant none" runs the whole script in the window context without using unsafeWindow or GM APIs.
Code: Select all
// ==UserScript==
// @name Google Analytics fix
// @namespace http://aaa.aaa.aa/
// @include *
// @grant none
// ==/UserScript==
urchinTracker = function(){};
pageTracker = function(){};
Re: .google-analytics.com/
It needs a lot of exceptions as few other tracking scripts and especially on shopping and gaming websites. You have to download Fanboy's "Advanced tracking List" filter. It blocks GA and other tracking scripts not included in Easylist. Downside, it gets updated maybe once a month.Guest wrote:se224141 wrote:I notice .google-analytics.com/ doesn't figure in Easylist.
http://www.google-analytics.com/urchin.js is not blocked at http://www.yogameditation.com/.
http://www.google-analytics.com/ga.js is not blocked at http://www.economist.com/.
Any specific reason.
Re: .google-analytics.com/
Well, updated when theres a bug.. no new major additions.Boris wrote: Downside, it gets updated maybe once a month.