Hacker News new | ask | show | jobs
by kevincox 1646 days ago
But the analytics script provides an API that some websites rely on so it would end up breaking some sites. This necessitates the approach of disarming the script rather than just blocking it.
3 comments

Fortunately Firefox has a shim to deal with this[1].

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1637329

I just don't use websites that break because of that.
I use ublock, which does block the script, and run into issues occasionally because of this. It seems to be mostly an issue with shopping carts.
uBlock Origin includes a dummy script that emulates the real Google Analytics script: https://github.com/gorhill/uBlock/blob/master/src/web_access...
Hmm, I don't think I've ever encountered a website that was broken without enabling javascript that was obviously analytics (I use umatrix pretty aggressively). The one that usually breaks checkout flow for me is that the credit card processors all want to use an iframe and often recaptcha and usually it takes 3-4 reloads before it actually even tries to load it all.
I've seen a few sites that actually communicate with scripted-in ad providers to verify you have downloaded and watched their ads, visited partner pages. For "free" downloads, for example.