Embedding
Embedding a funnel
A published funnel runs anywhere you can paste a line of HTML. The embed script is 18.4 KB gzipped, loads asynchronously, and adds nothing to the global scope of the page hosting it. If you cannot edit your site's HTML, use the hosted page instead and link to it.
Three steps
- List the domains that will show it. Open the funnel, then the Connect tab, and add every site that will embed it - including staging and preview hosts. A funnel answers only on the domains you list.
- Publish the funnel. A draft funnel has no embed code. Publishing mints the version the runtime serves.
- Paste the script where the funnel should appear. The funnel renders in place of the element you paste with it.
The inline script
Replace the funnel id with your own. Keep the async attribute; without it the script blocks your page from painting. The data-api attribute tells the script where to send answers, and it is not optional - the runtime is served from a different host than the API.
<!-- Paste where the funnel should appear -->
<div data-leadgible-funnel="fnl_your_funnel_id" data-mode="inline"></div>
<script src="https://leadgible-staging-app.yhengdesigns.workers.dev/v1/embed.js" data-api="https://leadgible-staging-api.yhengdesigns.workers.dev" async></script>The hosted page
Every published funnel also has a page of its own. Link to it from an email, an ad or a QR code. The URL takes the same funnel id.
https://leadgible-staging-api.yhengdesigns.workers.dev/f/fnl_your_funnel_idDomain allowlist
A funnel only answers on domains you list. Add every site that will embed it - including staging - or the funnel returns nothing there, with no error the visitor or the page can see. It is the first thing to check when an embed renders nothing.