Skip to main content
Solved

Wix Embed issue

  • November 8, 2025
  • 6 replies
  • 39 views

Forum|alt.badge.img

We’re trying to embed a sign up form on a wix site, with no success. Has anyone successfully completed this? 

Best answer by Byrne C

Hey ​@Shaundesigner_,

Embed forms are a little tougher to get working in Wix, as you’ve found out by now! This happens because Wix uses iFrames to add custom HTML, and iFrames act like their own browser, ignoring our onsite javascript (which is needed for forms to appear), which is located in the <head> element of the site. 

In short, you’re likely embedding your form in a place that can’t see Klaviyo’s code. The solution here is to add Klaviyo’s onsite javascript again, this time, directly into the iFrame where you added the embed form code.

This is the javascript you’d add, just above the embed form code, inside the iFrame:

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

Replace PUBLIC_API_KEY with your public API key.

Note that when you do this, any other popup forms you have will load inside this iFrame. 

If you wanted to avoid using iFrames altogether, you could use another Wix plugin that allows you to add HTML without iFrames. This is a good option.

Feel free to let me know if I can answer any more questions about this, or if anything else comes up. Happy to do so!

6 replies

Timmy Solomon
Problem Solver III
Forum|alt.badge.img+6
  • Problem Solver III
  • November 9, 2025

Hi @Shaundesigner_,

Yes,  it’s absolutely possible to embed a Klaviyo signup form on a Wix site, but it requires using the custom HTML embed option correctly since Wix strips certain scripts by default.

Here’s the proper way to do it:

  1. Publish your Klaviyo form first (don’t use the “Popup” version, use “Embed form”).

  2. In Klaviyo, go to Signup Forms → [Your Form] → Install Code, then copy the full Embed Code snippet.

  3. In your Wix Editor, open the page where you want the form to appear.

  4. Add a “Custom Embeds → Embed HTML” element (or “Embed Code” block, depending on your editor version).

  5. Paste the Klaviyo embed code exactly as provided — don’t modify or wrap it in additional script tags.

  6. Publish your site, then refresh the live version (not preview) to confirm it displays correctly.

Pro tip:
If you’re still not seeing the form, make sure that:

  • You’ve enabled “Load scripts once” in Wix advanced settings.

  • You’re not using a dynamic page or repeater section, as Klaviyo scripts won’t render correctly inside those.

  • You test on a live domain, not the Wix preview link (scripts are often blocked in preview mode).

If you’d prefer, you can also integrate via Klaviyo’s JavaScript snippet (from Account → Settings → Developer Settings → API Keys → Public API key) and then insert your form’s div container manually.

Let me know if you’d like me to walk you through that alternative method — it works great for custom-designed Wix sections.

 Timmy Solomon,
Klaviyo Certified Expert | Email Marketing & Integration Specialis


Forum|alt.badge.img
  • Author
  • Contributor II
  • November 9, 2025

ok ill try this again how every im prob on my 15th go at this now lol

thank you ill try right now

 


Forum|alt.badge.img
  • Author
  • Contributor II
  • November 9, 2025

this is the URL where the form is embeded

https://www.invisibletoinvincible.com/winterarc


Forum|alt.badge.img
  • Author
  • Contributor II
  • November 9, 2025

ok ive got it working but only in the body end, so theres not much freedom with placement etc, but its there and working


Timmy Solomon
Problem Solver III
Forum|alt.badge.img+6
  • Problem Solver III
  • November 9, 2025

Nice work getting it to show, that’s progress!

You’re right — when the Klaviyo embed only renders properly in the body end, it’s usually because Wix limits script execution in certain sections. To gain more placement flexibility, here are a few options you can try:

  1. Use a lightbox or container section:
    Add the Klaviyo embed code inside a custom HTML iframe within a box or strip. This isolates the script and lets you freely position it anywhere on the page.

  2. Manually place the form’s container div:
    From Klaviyo’s embed code, separate the <div id="klaviyo-form-XXXXXX"></div> from the script.

    • Place the div wherever you want the form to appear.

    • Keep the script tag in the “Body end” section (under Settings → Advanced → Custom Code in Wix).
      This way, the script still runs globally, but the form loads exactly where the div is placed.

  3. For more control, you can also use Klaviyo’s API-based or JavaScript integration, which allows full styling and positioning without Wix’s HTML block limitations.

If you’d like, I can show you the exact code snippet structure for method #2 — it’s the cleanest approach for most Wix + Klaviyo setups.


Byrne C
Community Manager
Forum|alt.badge.img+27
  • Community Manager
  • Answer
  • November 12, 2025

Hey ​@Shaundesigner_,

Embed forms are a little tougher to get working in Wix, as you’ve found out by now! This happens because Wix uses iFrames to add custom HTML, and iFrames act like their own browser, ignoring our onsite javascript (which is needed for forms to appear), which is located in the <head> element of the site. 

In short, you’re likely embedding your form in a place that can’t see Klaviyo’s code. The solution here is to add Klaviyo’s onsite javascript again, this time, directly into the iFrame where you added the embed form code.

This is the javascript you’d add, just above the embed form code, inside the iFrame:

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

Replace PUBLIC_API_KEY with your public API key.

Note that when you do this, any other popup forms you have will load inside this iFrame. 

If you wanted to avoid using iFrames altogether, you could use another Wix plugin that allows you to add HTML without iFrames. This is a good option.

Feel free to let me know if I can answer any more questions about this, or if anything else comes up. Happy to do so!