News for hackers. Stuff that matters.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by whalesalad on Sunday February 20, 2022 @10:09PM (#30411543)
Just block Google tag manager itself. Gets two birds stoned at the same time.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by chrisseaton on Sunday February 20, 2022 @10:12PM (#30411560)
How would you do that? Isn't it the server that talks to Google Tag Manager, not the browser?
Re:Google Tag Manager, the new anti-adblock weapon (2020) by whalesalad on Sunday February 20, 2022 @10:18PM (#30411602)
Google tag manager in my experience is a script executed by the browser. Then it installs itself in the page and performs the inner payload of user script insertions. It’s a Trojan horse, really. You can block Google tag manager’s embed scripts. I wasn’t aware of a backend integration but it’s certainly possible.

Regardless, I use a DNS based ad blocker (pihole) and it takes care of all this stuff. I occasionally need to turn it off or whitelist domains (like Google tag manager) for client work, but normally I have it blocked.

Re:Google Tag Manager, the new anti-adblock weapon (2020) by chrisseaton on Sunday February 20, 2022 @10:19PM (#30411608)
> Google tag manager in my experience is a script executed by the browser.

Isn't the whole point of this new change that it runs server-side, using a proxy that you install on the website so it uses the same domain?

> Regardless, I use a DNS based ad blocker

But it's the same domain name isn't it?

Re:Google Tag Manager, the new anti-adblock weapon (2020) by lmkg on Sunday February 20, 2022 @10:31PM (#30411668)
A Server-Side GTM container compliments a client-side container, it does not fully replace it.

Some processing happens on the server, but event data must still be sent to the server-side container first. For now, the "standard" deployment of a server-side is that it receives hits directly from the browser, orchestrated by a traditional client-side container. So the client-side script is still there, just less bloated.

The server-side container has built-in facilities for serving up the client-side container script. Meaning that domain-name blocking will not prevent this. DNS-based also has some issues: Server-Side Containers run in App Engine, blocking them basically means blocking anything running on GCP.

Re:Google Tag Manager, the new anti-adblock weapon (2020) by pixeldetracking on Monday February 21, 2022 @08:04AM (#30415448)
Re:Google Tag Manager, the new anti-adblock weapon (2020) by x0x0 on Sunday February 20, 2022 @11:22PM (#30411954)
Current GTM, configured (via the server UI) to inject tracker X:

gtm javascript loads, pulls down the config, injects tracker X javascript into the browser

new gtm:

gtm javascript loads, pulls down config, streams events to google servers to fan out to tracker X as configured

So blocking gtm.js off tagmanager.google.com / www.googletagmanager.com / the various other domains still blocks all gtm injected tags.

The tl;dr is they're become much closer to segment -- which does the data fanout internally to segment. But they should still be straightforward to block.

Re:Google Tag Manager, the new anti-adblock weapon (2020) by volderette on Monday February 21, 2022 @01:24AM (#30412501)
This is not how GTM server side works. There is not a single call to Google domains from the client, when GTM server side is set up to its fullest. The config (gtm.js) will be loaded from my subdomain and not googletagmanager.com. Also gtm.js can be renamed.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by x0x0 on Monday February 21, 2022 @03:16AM (#30413165)
Per the docs here [1], that is not true. You continue to load gtag.js off the googletagmanager.com domain; subsequent events can flow to a custom domain.

[1] https://developers.google.com/tag-platform/tag-manager/serve...

Re:Google Tag Manager, the new anti-adblock weapon (2020) by xigoi on Monday February 21, 2022 @02:13AM (#30412750)
Couldn't you still recognize the script by its content?
Re:Google Tag Manager, the new anti-adblock weapon (2020) by freedomben on Monday February 21, 2022 @03:22AM (#30413195)
No because the script contents can change from site to site. Maintaining an index for every site would get you closer, but individual sites can trivially tweak things to break fingerprinting as often as they want. Even on every request.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by shafyy on Monday February 21, 2022 @02:43AM (#30412954)
Exactly, this is already done for tracking scripts, since it's commong to use proxies to load tracking scripts.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by ComodoHacker on Monday February 21, 2022 @02:38AM (#30412917)
Not with dynamic obfuscation.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by romeoblade on Sunday February 20, 2022 @10:44PM (#30411748)
You missed the part where they recommend changing the script's name as well, add in changing a few variable/function names in the script and even matching the hash of the script itself would be useless. On top of them recommending using a sub domain with an A/AAAA record so its first party.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by Ajedi32 on Sunday February 20, 2022 @11:01PM (#30411837)
Worst-case you parse the script and block it if the AST is too similar.

There are a million ways to detect and block this sort of thing when you control the client. Yes, it's harder than just blackholing a whole domain, but it's hardly impossible.

Re:Google Tag Manager, the new anti-adblock weapon (2020) by pixeldetracking on Monday February 21, 2022 @08:05AM (#30415458)
yes, french article is updated, but this english translation is quite old here it is: https://www.simoahava.com/analytics/custom-gtm-loader-server...
Re:Google Tag Manager, the new anti-adblock weapon (2020) by seandoe on Sunday February 20, 2022 @10:30PM (#30411661)
You missed the same domain part. How are you going to block a request when you don't know the url?
Re:Google Tag Manager, the new anti-adblock weapon (2020) by shafyy on Monday February 21, 2022 @02:44AM (#30412958)
You check the loaded script itself to see if it matches an expected pattern.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by seandoe on Monday February 21, 2022 @08:29PM (#30423031)
Does there need to be a loaded script with a certain fingerprint? What if they are just passing data from the browser to some random endpoint? I'm not sure, just thoughts.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by shafyy on Tuesday February 22, 2022 @02:41AM (#30425058)
There needs to be a script because the tracking still happens client-side and there will be some logic involved. The only way to avoid being blocked by the browser is to track server-side.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by HWR_14 on Sunday February 20, 2022 @11:51PM (#30412090)
The point is that DNS ad blocking is being worked around with this new system, because it looks like part of the site you're on. Also, that google is encouraging modifying the JS to prevent automated tools from blocking the javascript.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by propogandist on Sunday February 20, 2022 @11:12PM (#30411912)
use uMatrix or uBlock and block individual domains

https://github.com/gorhill/uMatrix

Re:Google Tag Manager, the new anti-adblock weapon (2020) by gaius_baltar on Sunday February 20, 2022 @11:49PM (#30412085)
Proud uMatrix user here. Sadly, just noticed that the repo is now archived and I don't know if it will be maintained. Could not find any fork either.

I'll miss this extension.

Re:Google Tag Manager, the new anti-adblock weapon (2020) by Arnavion on Monday February 21, 2022 @12:28AM (#30412265)
You have the features of uMatrix with uBlock Origin's static rules. You just have to write them by hand instead of the convenient table UI.

https://news.ycombinator.com/item?id=26284124

The only thing that uBO doesn't support is controlling cookie access, so I still use uM for that.

Re:Google Tag Manager, the new anti-adblock weapon (2020) by Semaphor on Monday February 21, 2022 @12:42AM (#30412336)
> You just have to write them by hand instead of the convenient table UI.

That’s a pretty big "just", though. Very few sites work without fiddling with rules, having to do manual text entry every time would push me towards not using it.

The UI of uMatrix is generally far superior to the mobile-friendly, simplified one of uBo.

Re:Google Tag Manager, the new anti-adblock weapon (2020) by Arnavion on Monday February 21, 2022 @03:06AM (#30413105)
>That’s a pretty big "just", though.

It is, but for me the pros outweigh the cons. In particular, even with uM I often ended up editing the rules by hand because it was easier to copy-paste and turn on and off rules for experimenting, but uM would forcibly resort the rules on save which made that annoying.

>Very few sites work without fiddling with rules,

The only sites I fiddle with the rules of are the ones I visit regularly, which is not many. Over the 1.5 years that I've been using this method, I've only got 75 "web properties" in my list (github.com, github.io and githubusercontent.com count as one "GitHub" web property; so the number of domains is a bit higher). Going by git history, I do have to fiddle with one or more rules once a month on average.

For other sites, either they work well enough with default settings, or I give up and close them, or if I really need to know what they say I use a different browser. For this other browser I never log in to anything, and have it configured to delete all history by default on exit. (I've been pondering making this an X-forwarded browser running on a different source IP, but haven't bothered.)

>The UI of uMatrix is generally far superior to the mobile-friendly, simplified one of uBo.

To be clear, editing the rules does not use the "mobile-friendly, simplified" uBO UI. It refers to the giant text field you see in the uBO "Dashboard", specifically the "My filters" tab.

But yes, it'd be the best of all worlds if uBO gains the table UI as an alternative to the filters textfield. I imagine the problem is that static filters are technically much more powerful than what the uM-style rules do, so it'd require inventing a third kind of rule, which isn't great.

Re:Google Tag Manager, the new anti-adblock weapon (2020) by Semaphor on Monday February 21, 2022 @04:51AM (#30413790)
I have almost 7000 rules for a 260kb file ;)
Re:Google Tag Manager, the new anti-adblock weapon (2020) by tremon on Monday February 21, 2022 @06:23AM (#30414497)
ηMatrix is a fork maintained for Pale Moon: https://gitlab.com/vannilla/ematrix
Re:Google Tag Manager, the new anti-adblock weapon (2020) by GekkePrutser on Monday February 21, 2022 @12:07AM (#30412167)
I liked this a lot but I don't see how someone without a computer science degree will use it successfully..

I think this is why Raymond gave up on it.. I think for the masses his time is better spent on uBlock Origin.

Re:Google Tag Manager, the new anti-adblock weapon (2020) by propogandist on Monday February 21, 2022 @01:03AM (#30412423)
It requires some effort to get oriented, but the granularity of control is fantastic. There is no competition.

Although the dev gave up on it, he's open to someone picking it up (if there are any brave souls on HN)

https://old.reddit.com/r/uBlockOrigin/comments/i240ds/reques...

Re:Google Tag Manager, the new anti-adblock weapon (2020) by Saris on Sunday February 20, 2022 @10:22PM (#30411624)
Just block the GTM js from loading, it'll stop it easily.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by seandoe on Sunday February 20, 2022 @10:33PM (#30411682)
The big change they are suggesting is that the gtm code is no longer accessed via a predictable Google domain, rather it is requested through a subdomain of the parent site.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by pixeldetracking on Monday February 21, 2022 @08:07AM (#30415472)
Re:Google Tag Manager, the new anti-adblock weapon (2020) by Saris on Monday February 21, 2022 @09:33AM (#30416278)
uBlock already blocks stuff like Plausible analytics based on what's in the code, even if it runs on the parent site. Would this be any different?
Re:Google Tag Manager, the new anti-adblock weapon (2020) by HWR_14 on Sunday February 20, 2022 @11:52PM (#30412100)
Block the code that they suggest changing the name, domain, and function signatures of? How?
Re:Google Tag Manager, the new anti-adblock weapon (2020) by inlined on Monday February 21, 2022 @01:35AM (#30412555)
If the loops, if statements, and block scopes are similar then the graph can be fuzzily identified. They’ve had anti-plagiarism software for years.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by Deukhoofd on Monday February 21, 2022 @03:37AM (#30413286)
Annoyingly that would still require downloading them, which I'd definitely prefer not to. It's bloat that serves me no purpose.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by inlined on Monday February 21, 2022 @10:06AM (#30416626)
For popular sites a backlist could be formed after the first person downloads it.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by HWR_14 on Monday February 21, 2022 @10:48AM (#30417159)
Can you point me to some anti-plagiarism software? Because this doesn't sound like it will work at a non-trivial level.
Re:Google Tag Manager, the new anti-adblock weapon (2020) by youngtaff on Monday February 21, 2022 @06:02AM (#30414331)
Yup, overwrite its API on the page