Getting Started

3. Capture leads automatically

Turn on one toggle and the tracking script captures every form submission on your site as a Lead – no hidden fields, no per-form setup. The easiest way to track form submissions, with Exclusions for the pages you want to skip.

This is step 3 of getting started. Once the tracking script is live, you can let it capture every lead automatically. Flip one toggle and the script listens to every form on your site and records each submission as a Lead – no hidden fields, no code per form. It's by far the easiest way to track form submissions.

Prerequisite: the tracking script is installed

Automatic capture is a feature of the tracking script, so the snippet has to be live first. See Install the tracking script. The script only runs – and only captures – on domains whose root matches your tracking script's host.

What it does

When automatic lead capture is on, the script watches the page for form submissions and fires a Lead event the moment someone submits one. It then ties that lead to the visitor's click ID, so the lead is attributed back to the exact channel, campaign, ad set and ad that brought them in.

It's built to work across the messy real world of website builders:

  • Standard <form> submissions are detected automatically – the most common case.
  • A formless-click fallback handles page builders that don't use a real <form> element (common with some funnel and German marketing builders).
  • A MutationObserver keeps it working on single-page sites where the URL changes without a full page reload.

No hidden Click ID field needed

Automatic capture replaces the manual approach of adding a hidden Click ID field to each form. Turn it on once and every form is covered – existing and future. You only fall back to manual setup when you want to capture one specific form and nothing else.

Turn it on

Open Settings → Tracking

Go to Settings → Tracking. You'll find the Tracking card with the description "If you want to capture leads automatically, turn this on and follow the instructions per CMS."

Switch the toggle on

Flip the toggle to On. The status flips from a red Off to a green On, and an Other CMS domains panel appears underneath with your Exclusions list and the per-platform setup guides.

Confirm your platform is set up right

For most platforms the snippet in your <head> is all that's needed. A few builders have a quirk worth checking – open the Per-platform setup guides in the panel, or see Platform notes below.

It only captures where the script loads

Automatic capture works on the pages where your tracking script actually runs. If a form lives on a domain or subdomain without the snippet, install it there too – see Install the tracking script.

Exclude pages and forms

Sometimes you don't want a form captured as a lead – an internal admin form, a login for existing customers, a staging page. The Exclusions list (inside the Other CMS domains panel) lets you switch capture off for specific pages.

  • Add a page path and the script skips form capture on that exact page – for example /admin or /login.
  • Use a trailing * for a prefix match – /private/* excludes every page under /private/.
  • Leave the list empty to keep capture active on every page where the script loads.

Each entry shows who added it and when, and you can Remove it at any time to start capturing that page again.

Common things to exclude

  • Login or account pages for existing customers (so logins aren't counted as new leads).
  • Internal or admin forms that aren't real prospects.
  • Staging / preview URLs you don't want polluting your reports.

Platform notes

Most sites need nothing beyond the snippet. These are the platform-specific things to know – the same guidance shown in the Per-platform setup guides in your settings.

Install the "Insert Headers and Footers" plugin and paste the snippet into the <head> section (or add it directly to header.php inside <head>). Standard WordPress forms are captured automatically.

Full WordPress guide.

Site Settings → Custom Code → Add Custom Code, set the location to <head>, paste the snippet and save. Elementor Pro AJAX forms are supported automatically – no extra setup.

  • Wix – Settings → Custom Code → Add Custom Code → paste into Head, set to All pages, save.
  • Webflow – Project Settings → Custom Code → Head Code → save and publish.
  • Squarespace – Settings → Advanced → Code Injection → Header → save.

Webflow guide.

  • Framer – Site Settings → General → Custom Code → Head → publish.
  • Tilda – Site Settings → More → HEAD code → save.

Framer guide.

Some funnel and German marketing builders (for example con-kit, or funnels hosted on *.leadjourney.io) often skip the real <form> element. The formless-click fallback handles these automatically.

If the wrong button gets detected, add a data-lj-form attribute to the wrapping <div> around the form so the script knows which element to watch. For Perspective.co and similar hosted funnels, also add *.leadjourney.io to your allowed domains so the funnels we host can run the script.

Add the snippet to your index.html <head>, or load it dynamically with document.createElement('script'). For React / Vue / Svelte single-page apps, the script's built-in MutationObserver handles client-side route changes automatically – no extra setup.

Full custom-code guide.

Where captured leads show up

Each captured submission becomes a Lead event, matched to the visitor's click ID. You can confirm and inspect them in two places:

From there, the rest of your pipeline (qualified, booked, won…) is tracked with offline events sent from your CRM – see Events & the Events Manager.

Not seeing captured leads?

Confirm tracking is On in Settings → Tracking, the page isn't on your Exclusions list, and the snippet is live on that page. If the wrong element is being picked up on a formless builder, add a data-lj-form attribute to the form's wrapper. Still stuck? See Why are leads missing?.

On this page