Run Third-Party Scripts from a Web Worker
partytown.builder.io
partytown.builder.io
1. Serverside GTM and segment proxied through a first party domain get around ad blockers 2. Many traditional paid media sources like Facebook ads open in in-app-browsers that are unlikely to have ad blockers 3. Marketing and product analytics tend to be separate.
https://nextjs.org/docs/basic-features/script#offloading-scr...
This should also be something that providers of 3rd party scripts should take notice of when developing. Why not design to be in a web worker from the start if you can…
I suspect that you may want to pollyfill APIs for performance but I think for many use cases just that shim to the true API should work well enough.
Looks like a good solution to a very strange tool. If your web pages are bogged down by external scripts enough for this to matter, why not get rid of the bloat instead of letting it consume precious battery power in a secondary thread?
Google Tag Manager (GTM)
Google Analytics (GA)
Facebook Pixel
Mixpanel
Hubspot
Segment
Amplitude
A great selection of scripts which I don't want to run under any circumstances.