News for hackers. Stuff that matters.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by dlubarov on Monday February 21, 2022 @04:17PM (#30420735)
Where does Google recommend changing the name of the script? The author claims that they do, but their link just recommends self-hosting the script. In Google's recommended JS, the path is exactly the same, only the hostname is different ("www.googletagmanager.com" replaced with "<DOMAIN NAME>").

Self-hosting by itself might make blocking marginally more difficult, but there are other reasons to do it:

- Browsers these days segment caches by origin, so there's no caching benefit to using Google as a CDN.

- With HTTP2, a first-party request is likely to immediately go through an existing (multiplexed) connection, saving a handshake.

- It's arguably better for privacy, as users and legislators seem to be concerned about links to Google leaking IPs (https://news.ycombinator.com/item?id=30135264).

There are no comments on this comment yet.