Skip to main content
Solved

Klaviyo Sign Up Form Popup not work with Wix event listener

  • August 3, 2024
  • 1 reply
  • 22 views

Forum|alt.badge.img

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(['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.

Best answer by Maxbuzz

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

View original

1 reply

Forum|alt.badge.img+31
  • Partner
  • 252 replies
  • Answer
  • August 5, 2024

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