I tried to use this in production, but it ended up breaking some random GTM tags our marketing firm added to the site, so I had to roll it back. God, I wish I could use it though. I hate the whole idea of GTM. It’s such a crap ecosystem. I’d love to just put it in a sandbox and tell it not to touch anything.
Partytown is very exciting. We've been working with the team at Builder to implement it inside the Next.js script component, using the `worker` strategy. `next/script` helps you optimize loading third-party scripts, so Partytown was a great fit. Folks at Builder are a pleasure to work with.<p><a href="https://nextjs.org/docs/basic-features/script#offloading-scripts-to-a-web-worker-experimental" rel="nofollow">https://nextjs.org/docs/basic-features/script#offloading-scr...</a>
Very cool! I wonder how they get around all of the “window” related APIs. I imagine you can pollyfill some of them but I would expect some random bugs here and there? I hope I’m wrong because this is otherwise great.<p>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…
Looking at the example scripts this tool lists, I wonder if I should just add it to my adblock lists. Seems like an easy solution to block all manner of cyberstalking in a one go.<p>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?
>Below are just a few examples of third-party scripts that might be a good candidate to run from within a web worker. The goal is to continue validating commonly used services to ensure Partytown has the correct API, but Partytown itself does not hardcode to any specific services. Help us test and join the conversation in Partytown’s Discord!<p>Google Tag Manager (GTM)<p>Google Analytics (GA)<p>Facebook Pixel<p>Mixpanel<p>Hubspot<p>Segment<p>Amplitude<p>A great selection of scripts which I don't want to run under any circumstances.
Sandboxing and monitoring/controlling API use of 3rd party scripts sounds really interesting. Are there any limitations of the webworker approach to this? Compared to eg using a js-in-js interpreter.
Partytown seems like such a great idea; it's easy to imagine an alternate universe in which something just like it took off and today it'd be considered nuts not to use it.