QwikDev / partytown

Relocate resource intensive third-party scripts off of the main thread and into a web worker. 🎉
https://partytown.qwik.dev
MIT License
13.1k stars 437 forks source link

[✨] Insider Integration #626

Open H1berto opened 2 months ago

H1berto commented 2 months ago

Is your feature request related to a problem?

Insider integration request

Describe the solution you'd like

Hello!

I work for a Vtex partner company, and we are currently working with our client, Mercafé. We have been using the integration with Partytown on their site for at least a year now, and it is a crucial library for our store's optimization and performance. At the moment, we are working on adjustments for some of Mercafé's partners, whose integration scripts/plugins are not yet fully implemented using Partytown.

One of these partners is Insider, and we are still facing challenges in making their script work correctly with Partytown. I've already consulted them, and I'm acting as a kind of intermediary to ensure we can integrate these three parties: Insider, Partytown, and Mercafé.

In summary, the last point remaining for the integration to be fully operational is ensuring that the global variable Insider initializes and loads correctly in the window with Partytown, just as it does in traditional integrations without Partytown. I tried using the forwarding events instructions, but I haven’t been able to resolve the issue using this configuration. If you visit Mercafé and type Insider in the console, you’ll notice that nothing happens.

I conducted local tests following the instructions to test our integration, but we still haven't been able to get it to load properly. I created a fork in my repository where I placed the test files I’ve been using: https://github.com/H1berto/partytown-useinsider-integration.

Standard integration:

image

Integration with Partytown:

image

Solving this issue is crucial for us so that the integration between Insider, Partytown, and Mercafé works correctly. That's why we've decided to open this issue to request help with the integration. Would you be able to assist us with this?

Thank you!

Describe alternatives you've considered

https://github.com/H1berto/partytown-useinsider-integration/tree/main/tests/integrations/useinsider

Additional context

No response