Skip to main content

I have a quiz page on my site and it gathers quiz information and then gets the customer email and submit all that data to klaviyo a subscribe to the emails. Now I want to add a new field in that quiz where customer would enter their phone number before entering the email and then after the email is submitted both email and SMS subscription should be added to that profile.

 

Here is the code I am using in the quiz page.

<form id="email_signup" class="klaviyo_gdpr_embed_My_list" action="" data-ajax-submit="//manage.kmail-lists.com/ajax/subscriptions/subscribe" method="GET" novalidate="novalidate">
<input type="hidden" name="g" value="My_list">
<input type="hidden" name="formId" value="">
<input type="hidden" name="$fields" value="Phone">
<input type="email" id="k_id_email" name="email" value="" class="name text_input">
<input type="tel" id="k_id_phone" name="phone" value="" class="phone text_input">
<button class="submit_btn">{% render 'icon-right-arrow' %}</button>
<button type="submit" id="klaviy_form_submit_btn" class=" hidden"></button>
<div class="klaviyo_messages hidden">
<div class="error_message " style="display:none;"></div>
</div>
<div class="success_message hidden" >
<p class="thank_you" ></p>
</div>
</form>

 

Does anyone know how I can achieve this?

 

Regards,

Zain Ali.

Hi @zain_ali11!
 

May I ask if this is a custom site, or if you’re using one of our pre-built integrations with an e-commerce platform (like Shopify)?

- Brian


The store is built on Shopify, however the quiz page is custom and built using Shopify’s templating language.’Liquid’.


Hi @zain_ali11!

Since this is a custom use case it is technically beyond the scope of Community/Support, but we have a wonderful network of Official Klaviyo partners who may be willing to help with extra development and custom features!
 

- Brian


Does this https://manage.kmail-lists.com endpoint still works after retiring api v1/v2?