Custom code components

Your own quiz, calculator or configurator on any funnel or website page, safely

Custom code components let you put your own HTML, CSS and JavaScript on a funnel or website page: a quiz that asks one question at a time, a calculator that works out what a customer is losing, a price configurator. You write a component once, then add it to any page like a normal block.

Make one

Go to Sites > Components and click New component, or start from the ready-made Quiz calculator. Give it a name, write its HTML, CSS and JavaScript, and list its settings: the things you want to change per page without touching code, such as the headline, the questions or the currency. The preview runs your code exactly as a live page will. Your AI assistant can also write components for you through the PromoPilot connector (save_component).

Put it on a page

In the page editor, open the block list, find Your components and drag in Custom component. Pick the component in the panel on the right and fill in its settings there.

Collect leads

Inside the component, call PP.submit({email, ...answers}). The lead goes through the same steps as a form: the contact in your CRM, tags, a deal in your pipeline, your email sequence, playbooks and the next step. Your code can also use PP.settings, PP.theme, PP.next() and PP.open(url), and your page colours as CSS variables such as var(--pp-primary).

Count what happens inside it

PP.track(name, props) adds an event to the funnel's or website's Analytics tab, such as PP.track("quiz_started") or PP.track("quiz_answered", {step: 2}). Names are lowercase letters, digits and underscores (up to 40); props are up to 10 simple values (text up to 100 characters, numbers or true/false). The ready-made Quiz calculator already reports when a quiz starts, each answer and the result.

Safety

Every component runs in a sealed frame. It cannot read or change the page around it, reach your PromoPilot account or open pop-ups, and it cannot call other websites (no fetch or form posts); leads leave through PP.submit, which saves them to your CRM. It can only move the visitor to another page after they click. Scripts and styles may load from cdn.jsdelivr.net and fonts from Google Fonts. PromoPilot staff can see component code and may block a component that breaks our terms.

Good to know

  • Custom code components are on the paid plans.
  • Only the brand owner or an admin can write component code; anyone who can edit pages can add a component to a page.
  • A published page keeps the code it was published with until you publish it again.
  • Search engines do not read text inside a component, so keep your main sales words in normal blocks.

New to PromoPilot? Creating an account is free.

All guides