BuilderIO / partytown

Relocate resource intensive third-party scripts off of the main thread and into a web worker. 🎉

Home Page:https://partytown.builder.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[🐞] Klaviyo initCustomEvent problem

nicolomenandro opened this issue · comments

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 <script type="text/partytown" id="" src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=xxxx"></script> in a page with partytown enabled

Browser Info

Chrome

Additional Information

No response

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