Skip to main content

I need my Klaviyo sign up form to popup when most things on the Wix page are clicked. I have around 10 different blocks on the page that should all react with the same popup form being shown. Some of blocks are buttons, images, icons, etc. 

 

Therefore, I am trying to add this code snippet for each block with an onclick event:

export function video1_click_1(event) {

window._klOnsite = window._klOnsite || |];

window._klOnsite.push(h'openForm', 'USLfeF']);

}

 

When I run this code, I keep getting a reference error that window is not defined. Please can someone advise what code I can apply to every block so that it opens the same Klaviyo sign up form?

 

Thank you.

Hello @SUMMRCreativeHouse  You will have to make sure the Klaviyo OnsiteJs is loaded before triggering this function.


Reply