Use your own HTML pages in a funnel
Build funnel steps from pages you code yourself, pasted into the editor or created through the API by an AI agent, and wire the signup form, the checkout link and the thank-you page so the visitor path works.
A funnel does not own its pages. It is a chain of steps that point at pages, checkouts and e-mail automations you already have, so any page in Your site → Pages & Funnels can be a step, including a page you paste or upload as HTML or create through the API with an AI agent such as Claude Code. When you finish, you will have a funnel whose pages are entirely your own code, with the same canvas, counters and e-mail sequence as a funnel built from a template.
What each step needs
Zanfia stores your HTML exactly as you wrote it and adds only the analytics, cookie banner and pixel scripts when the page is served. The funnel works through a few HTML attributes, not through placeholders in the text.
| Step | What your HTML needs |
|---|---|
| Signup page (entry of the funnel) | The native Zanfia form: <form data-zanfia-form="[workspaceId]/[formId]"> with an email input, a submit button and the zanfia-page-forms.js script. data-zanfia-redirect on the form sends the visitor to the next step after signup. |
| Sales or pitch page | A plain link to the checkout. Copy the address with Copy link in the checkout editor. |
| Welcome page, thank-you page | Nothing special. Any HTML. |
| One-time offer | Easiest from the canvas: Add step → One-time offer creates the page with the timer, the "No, thanks" link and on-page payment. Hand-written offer pages need the offer block that the generated page carries. |
| Checkout | Not a page. The step points at a checkout you created in the product. |
Create the signup form
In the sidebar open Marketing → Forms (/marketing/forms) and click Create form. Set the
tags and the opt-in mode there; the form settings also hold the confirmation e-mail. See Signup
forms. Note the form id from the editor address
(/marketing/forms/f/[formId]) or from zanfia forms list.
Put the native form in your signup page
The full contract is in Your form on your own site. The minimum is:
<form data-zanfia-form="[workspaceId]/[formId]" data-zanfia-redirect="/welcome">
<input name="email" type="email" required autocomplete="email" />
<input
name="website"
type="text"
tabindex="-1"
autocomplete="off"
aria-hidden="true"
style="position:absolute;left:-9999px;opacity:0"
/>
<button type="submit">Sign me up</button>
<div data-zanfia-success hidden>Thank you! Check your inbox to confirm.</div>
<div data-zanfia-error hidden>Something went wrong. Please try again.</div>
</form>
<script src="https://zanfia.co/zanfia-page-forms.js" defer></script>zanfia forms snippet [formId] --lang en prints this markup with your ids filled in. Set
data-zanfia-redirect to the slug of the next page of the funnel (for example /welcome).
Link the sales page to the checkout
Open the checkout in the product and click Copy link. Use that address as the href of the
buy button on your sales or pitch page. Purchases that start from that link count on the funnel
canvas once the checkout is a step of the funnel.
Create the pages in Zanfia
Either way the pages start as Draft:
- In the dashboard: Pages & Funnels → New page or funnel → Blank page - paste your own HTML, then Paste HTML or Upload .html. See Bring your own HTML.
- With an agent or a script:
POST /pageswith the slug, title and HTML (CLI:zanfia pages create --slug welcome --title "Welcome" --file welcome.html; MCP tool:create-page). See Pages.
Publish every page
Open each page and click Publish, or use POST /pages/[pageId]/publish (CLI: zanfia pages publish [pageId]; MCP tool: publish-page). A funnel cannot go live while one of its pages is a
draft, and a draft page would show "not found" to visitors.
Join the pages into a funnel
Pick one of two ways:
- On the canvas: open the first page, switch the mode at the top to Funnel and click Turn these pages into a funnel. Then Add step → Page → Or pick a page you already have for each next page, in the visitor's order. Remove from the funnel takes a generated step out without deleting its page, so you can also start from a template and swap its pages for yours.
- With an agent or a script:
POST /funnels/from-pageswith the page ids in visitor order (CLI:zanfia funnels from-pages --page [id1],[id2],[id3]; MCP tool:create-funnel-from-pages). See Funnels.
Add the checkout and the e-mails
Add step → Checkout adds the checkout the sales page links to (its one-time offers and thank-you page come with it). Add step → E-mails attaches an automation you already have or creates a new delivery sequence as a draft. Activate the e-mails from the canvas when the copy is ready. From here on everything works as in Build a funnel from a template.
Good to know
Zanfia keeps the links you wrote. On pages written with the assistant or from a template the
funnel re-points the form's redirect at the next published step whenever you reorder or publish; a
page you brought as your own HTML keeps the data-zanfia-redirect you typed, so update it
yourself when you change the order. A page with a signup form or inside a funnel cannot be locked
to product buyers, and removing a funnel never deletes its pages.
Working with an AI agent
The quickest route is the ready-made skill: Install the Zanfia funnels skill gives your agent this whole contract, the tool cheat sheet and page templates in one command. Without it, connect your agent to the workspace as described in Connect AI clients to your workspace and tell it to write each page as a complete HTML file, to use the native form contract from Your form on your own site, to create and publish the pages with create-page and publish-page, and to assemble the funnel with create-funnel-from-pages. The agent reads the same help articles as Markdown by adding .md to the address, and the whole API is described at https://zanfia.com/openapi/workspace-api.json.
Was this article helpful?

