News for hackers. Stuff that matters.
Re:Google Analytics Opt-Out Browser Add-On by Animats on Friday March 07, 2025 @03:11AM (#43288171)
Does this prevent Google Analytics from working, or does it tell Google that you don't want Google Analytics. There's a difference.

Most sites work with googletagmanager.com blocked. Privacy Badger will block it if you ask, although it gives you a warning that some sites may break. Generally not ones you really need.

Re:Google Analytics Opt-Out Browser Add-On by fwn on Friday March 07, 2025 @03:25AM (#43288245)
It does

    (function() {
        var a = document.createElement("script");
        a.type = "text/javascript";
        a.id = "__gaOptOutExtension";
        a.innerText = 'window["_gaUserPrefs"] = { ioo : function() { return true; } }';
        document.documentElement.insertBefore(a, document.documentElement.firstChild);
    })()
here

    "matches": [
      "http://*/*",
      "https://*/*"
    ]
Re:Google Analytics Opt-Out Browser Add-On by zaruvi on Friday March 07, 2025 @05:12AM (#43288894)
Thanks for checking! Stealing this and adding it to my global userscript, just in case ublock doesn't catch the download.
Re:Google Analytics Opt-Out Browser Add-On by hedora on Friday March 07, 2025 @11:07AM (#43291307)
Unless I’m misreading the code, it looks like it’s running GA, but giving it an opt-out signal to harvest.
Re:Google Analytics Opt-Out Browser Add-On by SahAssar on Friday March 07, 2025 @12:27PM (#43292085)
It's not, It's adding a global variable called _gaUserPrefs to every site. If the actual GA script is loaded it would look for this as the opt-out signal.

Of course any other tracking (or GA tracking) could use this as a part of fingerprinting.

Re:Google Analytics Opt-Out Browser Add-On by Animats on Friday March 07, 2025 @01:07PM (#43292478)
Ah. So there is a "trust us" aspect to this.
Re:Google Analytics Opt-Out Browser Add-On by SahAssar on Friday March 07, 2025 @01:16PM (#43292594)
Yes, if you use googles products to block googles products you have to trust google.

My main point is that the extension itself does not load GA, which the parent seemed to say. It can also be used for other fingerprinting since it is a variable accessible by other scripts.