All articles
WixLead CaptureMulti-Step FormsMeta CAPICollectform

Lead Capture Forms for Wix (2026): Use the Custom Element, Not the HTML iFrame

August 6, 20269 min read
Lead Capture Forms for Wix (2026): Use the Custom Element, Not the HTML iFrame

Wix offers two ways to put someone else's form on your page. Almost everyone picks the wrong one.

The HTML iFrame element is the obvious choice. It is the one called "Embed HTML", it accepts a code snippet, and it appears first in most tutorials.

The Custom Element is the one you want, and Wix's own documentation explains why in a sentence most people skim past: the HTML element creates a sandboxed environment with no direct access to the other elements on your page.

If you are running ads, that sandbox is the difference between tracking that works and tracking that quietly does not.

Why the sandbox matters for ad tracking

When someone clicks your Meta ad and lands on your Wix page, the URL carries fbclid. TikTok sends ttclid. Google sends gclid.

Those parameters arrive on the parent page URL. They are the deterministic link between an ad click and whatever that person does next, and they are far more reliable than a cookie, because Safari deletes third-party cookies after 24 hours and caps JavaScript-set first-party cookies at seven days.

An iframe is a separate document from another origin. By design, it cannot read the URL of the page containing it. So a form inside an HTML iFrame element never sees the click ID at all, and every conversion event it sends afterwards falls back to guessing.

A Custom Element is a web component. It runs inside your page's document, with full DOM access, and Wix's documentation notes it also performs better than the iframe equivalent. It reads the click ID on landing, holds it as a hidden field, and sends it with the conversion event.

The embed method is not a technical detail. It decides whether your ad platform can connect the conversion to the click that caused it.

We wrote about the broader differences between iframes and web components separately, with load-time numbers.

What Wix Forms does and does not cover

Wix Forms is fine at what it is for. Contact, enquiries, simple signups, straightforward capture.

Where it stops:

Wix Forms
Single-step captureYes
Multi-step with branchingNo
Calculations and variablesNo
Different endings per answerNo
Meta PixelYes, via marketing integrations
Meta Conversions APINo
TikTok Conversions APINo
Advanced matching field mappingNo
Event per buttonNo
Consent that gates tracking but keeps the leadNo

For a page behind paid traffic, the bottom half of that table is where the money is.

The embed, done properly

Step 1. Add the loader script site-wide.

Go to Settings → Custom Code → Add Custom Code, paste this, set it to load in the head on all pages:

<script type="module" src="https://cdn.collectform.com/collectform.js"></script>

Site-wide means it is fetched once and cached, rather than reloaded per embed.

Step 2. Add the Custom Element where the form goes.

On the canvas, click Add → Embed Code → Custom Element. Set the server URL to the same script:

https://cdn.collectform.com/collectform.js

Set the tag name to:

collectform-embed

Then add the attribute form-id with your form's ID from its Share tab.

The rendered element is exactly this:

<collectform-embed form-id="YOUR_FORM_ID"></collectform-embed>

Publish, and check it on the live site rather than in the editor. Custom Elements render as a placeholder while you are editing.

Do not use the HTML iFrame element for this. It will appear to work, the form will load, submissions will arrive, and your click IDs will be missing from every conversion event. That is the worst kind of broken, because nothing reports an error.

What you get once it is in

Multi-step forms with real logic

One question per screen, which consistently outperforms a wall of fields on mobile, where most Wix traffic from paid social arrives. Formstack's research found multi-page forms converting at 13.9% against 4.5% for single-page.

Conditional logic routes people by their answers. Calculation steps compute an estimate from what they entered and show it before the contact step, so the visitor gets something back before handing over a phone number.

Blocks include single and multiple choice, image choice, swipe cards, dropdowns, scales, ratings, dates, numbers, addresses, and a loader screen that ticks through steps while the result is worked out.

Native Meta and TikTok Conversions API

Both configured in the form itself, with no server container and no tag manager project.

Events are deduplicated against your browser pixel by shared event ID, so running Pixel and CAPI together counts each conversion once rather than twice. Double counting inflates your reporting while misleading your bidding, which is worse than under-reporting.

Advanced matching, mapped field by field

Meta scores event match quality from 0 to 10 on how many identifying parameters each event carries. Hashed email and phone alone typically lands around 5.0 to 6.0. Crossing 8.0 generally takes seven or eight parameters on most events.

Map each field to its parameter and values are hashed before they leave. A form that collects an address contributes city, state and zip without asking anything extra. This is the part that decides whether server-side tracking helps at all.

Granular button mapping

Instead of one blanket event on submit, a specific button fires a specific event: Lead on the qualified step, Schedule on a booking ending. That lets you optimise toward booked appointments rather than form fills. Full mechanics here.

Cookie consent that keeps the lead

One toggle shows a consent prompt before any ad tracking runs. If the visitor declines, nothing goes to Meta or TikTok and you still receive the submission.

You keep the lead, the ad platform gets nothing, and there is no second consent tool to wire into Wix.

Zapier, webhooks and email notifications

A webhook fires the instant the form completes, so leads reach your CRM in seconds rather than sitting in a sync queue. Zapier handles everything else in your stack.

Email notifications go to your team on every submission, and a separate respondent email can go to the person who filled it in, carrying their answers or their calculated result. A calculator that shows a number on screen and never emails it has wasted a touchpoint.

Wix-specific notes

Custom Code requires a premium plan and a connected domain. Wix restricts custom code on free sites. If Settings → Custom Code is unavailable, that is why.

Check the mobile editor separately. Wix maintains a distinct mobile layout, and an element placed on desktop needs checking there. A web component sits in the normal layout flow rather than a fixed-height frame, which helps, but Wix's mobile editor still deserves a look.

Custom Elements do not render in the editor. You will see a placeholder while editing and the real form on the published site. Do not assume it is broken because the canvas looks empty.

Velo is not required. Wix documentation mentions hosting the element's JavaScript with Velo, which applies when you have written the component yourself. Pointing the server URL at an external CDN is supported and is what you want here.

Wix Forms versus embedded form

Wix FormsCollectform Custom Element
StepsOne screenMulti-step, one question per screen
Conditional logicNoYes
CalculationsNoYes, with variables
Conditional endingsNoYes
Meta PixelVia integrationsBuilt in
Meta CAPINoBuilt in, per form
TikTok CAPINoBuilt in, per form
Advanced matchingNoField-level mapping
Event per buttonNoYes
Cookie consent gatingNoYes, lead still delivered
Zapier and webhooksVia Wix AutomationsBuilt in
Email notificationsYesYes, plus respondent email
Reads ad click IDsNoYes, same-document access

A few honest caveats

Wix Forms is the right tool for simple capture. A contact form or a newsletter signup does not need any of this, and using the native element keeps it inside Wix's own dashboard where it belongs.

Your submissions live outside Wix. That is useful if you run several sites and want one dashboard, and a change of workflow if your team expects everything in the Wix inbox.

This does not fix a weak offer. Cleaner tracking makes the platform learn faster from what is actually happening. If the offer is not working, it will learn that faster too.

Verify rather than assume. After publishing, confirm the Lead event is arriving in Events Manager and check its match quality. Events arriving and events matching are different things, and only the second one lowers your cost per lead.

The short version

Use the Custom Element, not the HTML iFrame. That single choice decides whether your ad platform can connect conversions to clicks.

Script in Settings → Custom Code, element on the canvas, fields mapped for advanced matching, consent switched on, then check match quality in Events Manager.

Build the site in Wix. Let the form see the page it is standing on.


Collectform is a multi-step lead form you embed on the page you already own, as a web component rather than an iframe. Plans start at $20/month billed annually, with a 7-day trial. Browse the templates.

Frequently asked questions

The lead tracking form platform built for paid traffic.

Replace your weak form with a high-converting, multi-step lead form, with server-side tracking built-in. Drop it into the funnel you already have with one line of code.

7-day free trial · No credit card · Cancel anytime