Page 2 of 2

PostPosted: Mon Jun 29, 2009 5:55 pm
by em4r1z
Does this imply that Gmail ads will be displayed? Because that's happening to me, at least in Gmail in Spanish and in the personal domains hosted in Google Apps (whose interface is also in Spanish).

PostPosted: Mon Jun 29, 2009 8:38 pm
by Wladimir Palant
No, Google Analytics has very little to do with Google Ads. So you better create a new topic for this question. Don't forget to mention the website where you see this behavior and the filter subscription you are using.

PostPosted: Tue Jun 30, 2009 6:54 pm
by Ares2
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>

PostPosted: Tue Jun 30, 2009 11:06 pm
by Wladimir Palant
Code: Select all
var _gat = {tracker: {_trackPageview: function(){}}, _getTracker: function() {return this.tracker;}}

But I would definitely use setTimeout() trick here, just to be on the safe side.

PostPosted: Fri Jul 03, 2009 9:15 pm
by Ares2
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
Code: Select all
||google-analytics.com^$third-party

and a Greasemonkey UserScript like this
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);

PostPosted: Fri Jul 03, 2009 11:20 pm
by tmr250z
Ares2 wrote:TYVM, works great on all sites I tested. :)


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?

PostPosted: Sat Jul 04, 2009 8:32 pm
by Ares2
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?

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.

PostPosted: Mon Jul 06, 2009 12:26 am
by tmr250z
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.


Yeah, so I'm just going to add an exception for typeracer.com in the filter and the userscript.


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);


That will work right?

PostPosted: Mon Jul 06, 2009 12:37 am
by Ares2
Yep. :)

PostPosted: Tue Jul 07, 2009 3:26 am
by tmr250z
Ares2 wrote:Yep. :)


Thanks :D

Re: .google-analytics.com/

PostPosted: Mon Jul 29, 2013 5:55 pm
by Guest
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/

PostPosted: Mon Jul 29, 2013 9:25 pm
by Anomymous
"@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/

PostPosted: Mon Jul 29, 2013 11:07 pm
by Boris
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.


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.

Re: .google-analytics.com/

PostPosted: Tue Jul 30, 2013 10:42 am
by fanboy
Boris wrote: Downside, it gets updated maybe once a month.


Well, updated when theres a bug.. no new major additions.