BuilderIO / partytown

Relocate resource intensive third-party scripts off of the main thread and into a web worker. 🎉
https://partytown.builder.io
MIT License
12.97k stars 427 forks source link

[🐞] Klaviyo initCustomEvent problem #485

Open nicolomenandro opened 10 months ago

nicolomenandro commented 10 months ago

Describe the bug

Hi,

Looking at your documentation, Klaviyo is supported and tested, but including it with partytown i get this error:

Uncaught (in promise) TypeError: o.initCustomEvent is not a function
    at new b (ClientStore.7e4c0cfcaf0e2b8adc09.js:3:7374)
    at eval (ClientStore.7e4c0cfcaf0e2b8adc09.js:3:9463)
    at I (ClientStore.7e4c0cfcaf0e2b8adc09.js:3:9793)
    at $ (ClientStore.7e4c0cfcaf0e2b8adc09.js:3:14423)
    at eval (ClientStore.7e4c0cfcaf0e2b8adc09.js:3:16330)
    at Array.reduce (<anonymous>)
    at eval (ClientStore.7e4c0cfcaf0e2b8adc09.js:3:16233)
    at eval (ClientStore.7e4c0cfcaf0e2b8adc09.js:3:16376)
    at Function.r [as setState] (vendors~ClientStore.eb8f20873bb5a7332a90.js:4:25456)
    at G (ClientStore.7e4c0cfcaf0e2b8adc09.js:3:16005)

That is related to a file that use the deprecated API initCustomEvent.

Understanding that Klaviyo is using a deprecated API, it's a know issue with a work around or I have to wait for a Klaviyo update of its integration script?

Thanks for your support.

Reproduction

At the moment, i don't have a public url to provide

Steps to reproduce

Include in a page with partytown enabled

Browser Info

Chrome

Additional Information

No response

gioboa commented 10 months ago

Thanks for your report. I'm sorry but without a reproduction repo it's really difficult to help you.