.google-analytics.com/

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
em4r1z

Post 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).
Wladimir Palant

Post 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.
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Post 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>
Wladimir Palant

Post 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.
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Post 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);
Last edited by Ares2 on Tue Dec 29, 2009 2:44 am, edited 6 times in total.
tmr250z

Post 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?
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Post 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.
tmr250z

Post 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?
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Post by Ares2 »

Yep. :)
tmr250z
Posts: 3
Joined: Mon Jul 06, 2009 12:30 am

Post by tmr250z »

Ares2 wrote:Yep. :)
Thanks :D
Guest

Re: .google-analytics.com/

Post 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.
Anomymous

Re: .google-analytics.com/

Post 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(){};
Boris

Re: .google-analytics.com/

Post 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.
User avatar
fanboy
Posts: 3446
Joined: Sun Jun 17, 2007 4:45 am
Contact:

Re: .google-analytics.com/

Post by fanboy »

Boris wrote: Downside, it gets updated maybe once a month.
Well, updated when theres a bug.. no new major additions.
Locked