@furnaceX
This is pretty easy and the most common mistake I’ve seen is people add the code to Shopify page but don’t turn the Klaviyo form live. So just make sure your Klaviyo form is Live and then it should show on your Shopify page. Just refresh the page 2-3 times after you set it Live in Klaviyo and it will show..
That’s not my question. Perhaps I wasn’t clear enough. For the customer facing website, the form is added AFTER the page loads by Klaviyo’s javascript code. This causes the page to load and the form to be blank for a couple of seconds because the JS code hasn’t run yet.
I would prefer to just embed the form’s html code in my site rather than wait for Klaviyo’s JS code to get around to rendering the code.
I’m an experienced developer and coder, so I don’t need a simple solution.
Any ideas?
Hi @furnaceX,
Thanks for your question and clarifying it a bit more! Yes, you actually can accomplish this, although it will require custom coding, with which you seem very comfortable as you mention!
If you want a form to load faster, you’ll need to fully custom code the signup form so it doesn’t require Klaviyo .JS. In doing so it’ll essentially be seen as just another aspect of the website and load before the .js script instead of using the .js script to retrieve the code. In a similar behavior to how you would custom code a form to read as part of the website and load without ad blockers preventing its display.
While we cannot hep troubleshoot custom coding, I’d advise using the base code in this thread to get started!
Thanks for participating in the Community!
-Taylor
Is there a way to create a custom embedded form WITHOUT Klaviyo JS or redirecting the form to a standalone page? Something like this:
<form
method="POST"
action="//manage.kmail-lists.com/subscriptions/subscribe"
novalidate="novalidate"
>
<input type="hidden" name="g" value="LIST_ID" />
<input type="email" value="" id="k_id_email" placeholder="Your email" />
<button type="submit">Subscribe</button>
</form>
Replacing LIST_ID with the proper list ID, of course.