Skip to main content
Solved

Wix/Editor X with Klaviyo Pop up for button


Forum|alt.badge.img+1

I really need some help figuring out how to add a pop up to a button once someone clicks on it so they can enter their name and email. This is proving to be a brutal challenge. I’m using Wix (Editor X). Does anyone know how to do this or are there any instructions anywhere to help with this sort of thing? 

 

Best answer by Taylor Tarpley

Hi @Codi S

 

Welcome to the Community! Happy to help! 

 

Sorry to hear this has been frustrating so far! Let’s get into it!

 

So first, you have ensured that Wix <> Klaviyo is integrated and working properly, correct? Once you’ve done this we have documentation how to trigger a popup or flyout form when a button is clicked that will help you get started. This does require custom coding, so the Klaviyo team won’t be able to help troubleshoot further.

 

 I have linked helpful Community threads on the same topic for more insight and am putting this topic in our developer group so you can have access to other peers in the dev Community to help you further if you need it! 

 

Thanks for participating in the Community!

-Taylor 

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

Taylor Tarpley
Community Manager
Forum|alt.badge.img+60
  • Community Manager
  • 2148 replies
  • Answer
  • July 24, 2023

Hi @Codi S

 

Welcome to the Community! Happy to help! 

 

Sorry to hear this has been frustrating so far! Let’s get into it!

 

So first, you have ensured that Wix <> Klaviyo is integrated and working properly, correct? Once you’ve done this we have documentation how to trigger a popup or flyout form when a button is clicked that will help you get started. This does require custom coding, so the Klaviyo team won’t be able to help troubleshoot further.

 

 I have linked helpful Community threads on the same topic for more insight and am putting this topic in our developer group so you can have access to other peers in the dev Community to help you further if you need it! 

 

Thanks for participating in the Community!

-Taylor 


Forum|alt.badge.img
  • Contributor I
  • 1 reply
  • August 11, 2023

It seems like an impossible task to create a button in Wix that triggers the signup form. According to the documentation it is rather straight forward, however it is not. 

 

What we tried:

  1. We used the Wix/ Klaviyo integration which worked well.
  2. In WIX → Embed Code → Embed HTML:
    (FormID was replaced with the Live formID)
<button class="klaviyo_form_trigger">Click here<button>
<script type="text/javascript"> document.querySelector(".klaviyo_form_trigger").addEventListener('click',function (){ window._klOnsite = window._klOnsite || []; window._klOnsite.openForm('FormID', () => console.log("you triggered the form!")); });</script>
  1. Publish Site → click on button
  2. Checked the dev console and found the following error:
8a93c5_83c452587358644b99b46bc2963f0eda.html:5 Uncaught TypeError: window._klOnsite.openForm is not a function
    at HTMLButtonElement.<anonymous> (8a93c5_83c452587358644b99b46bc2963f0eda.html:5:21)
(anonymous) @ 8a93c5_83c452587358644b99b46bc2963f0eda.html:5
  1. Checked the integration, reconnected →  still worked

 

See the configuration below. The form appears according to the trigger configuration, however, it doesn’t appear on button click. With the other type of integration using the “_klOnsite.push” it is the same. We also tried to integrate the Klaviyo.js manually in the head with our public API key without success.

Additionally, we also tried “only show on custom trigger” which of course didn’t work either.

 

Does anyone know how to make this work?

 

 

Our form configuration: