Integrating custom signup checkbox

  • 9 March 2023
  • 1 reply
  • 282 views

Badge +1

Dear community,

 

we built our own questionnaire and would like to integrate a signup checkbox in the quiz. The site is not connected to Shopify and the questionnaire is custom built so it would be a custom script probably. How can we do this? 

We have an optional input field to provide the email address. Below we would put a checkbox that needs to be checked in order to signup directly to Klaviyo and trigger the double-confirmation mail. If the user does not want to signup he can skip the question. 

I am not sure how we can approach this. Any hint would be highly appreciated!

Best,
Max


1 reply

Userlevel 7
Badge +61

Hi @maximilian,

Thank you for sharing this with us.

To ensure your custom form works with Klaviyo, you’ll need to paste our onsite javascript into the header of your site. Going forward, whenever you publish a new form in Klaviyo, it will appear automatically. Simply replace PUBLIC_API_KEY with your public API key. Here’s the snippet:

  1. <script type="text/javascript" async="" src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=PUBLIC_API_KEY"></script>

You may also find this section on adding checkboxes helpful. It gives you some basic example code to work.

Also, you will need users to fill the email field in your form in order for the profile to be created in Klaviyo. Therefore, I recommend you make this a mandatory field on your form.

I hope that’s a helpful start. Thanks for being a community member.

Reply