Ninja Forms integration

Lead source tracking for Ninja Forms.

Ninja Forms runs every submission through a chain of Actions. Knowing where the lead came from is not one of them.

Free official plugin, or one script - your pick No Action to build, no Add-on to buy Live in minutes

Works with all Ninja Forms features

Multi-part forms Conditional logic AJAX submissions File uploads Layout & rows Calculations
Two ways to run it

Two ways to run it on Ninja Forms.

Install the free official plugin and keep every lead inside your own WordPress admin, or drop in one hosted script and send leads to your Lead Source dashboard. Same capture, the difference is where your data lives.

Free · WordPress.org

The official plugin

  • Captures the source on every Ninja Forms submission, stored in your WordPress admin
  • Two-click install from the directory, no account needed
  • Runs alongside your existing Action chain, no Action to build
View on WordPress.org
Hosted · any platform

The one-line script

  • One JavaScript line in your <head>, no plugin and no PHP
  • Leads land in your Lead Source dashboard, independent of WordPress
  • Survives a rebuild, host change or full migration
Start free →
The gap

Ninja Forms is a pipeline of Actions. Source was never one of them.

Ninja Forms is built around Actions. Each submission flows through the ones you have enabled: email, store submission, redirect, and whatever Add-ons you have bought. There is no built-in Action that records which campaign, ad, or post sent the visitor, and the marketing Add-ons that come close still leave the hard part to you.

What the Action chain handles

Everything after the submit

  • Email notifications and auto-responders
  • Store Submission, so entries live in wp-admin
  • Redirects, success messages, webhooks
  • Multi-part steps, conditional logic, calculations
What no Action gives you

Where that lead came from

  • The campaign behind the click, named not raw
  • Source held across the visit, not read once at submit
  • The page journey before the form
  • One consistent record across every form on the site
The usual workaround

Hidden fields plus a merge tag, on every form you build.

The Ninja Forms route to source is a hidden field per UTM, populated from the query string, then merged into the email Action. It reads the URL at load, so the moment a visitor browses before submitting, the value is gone.

The manual way

  • 01
    Add a hidden field per UTM key to every form, set to populate from the matching query-string value.
  • 02
    Map each hidden field into your Email Action with its merge tag, or the values never reach your inbox.
  • 03
    Query-string population reads the URL at load. Add a cookie-persistence script so the source survives a second pageview.
  • 04
    Rebuild the same fields and merge tags on every new form, and keep them working through Ninja Forms updates.

With Lead Source

  • 01
    Add Lead Source once, the free plugin or one script tag, and every Ninja Forms form is covered.
  • 02
    The source is captured at landing and persists across the visit, so it is still there when the submission fires.
  • 03
    The campaign name is written out in plain language, not left as a raw UTM string in a hidden field.
  • 04
    New form next month? Already tracked. No hidden fields, no merge tags, no Add-on.

The Action model is what makes Ninja Forms flexible. Capturing the source before the visitor reaches the form is the one job it leaves outside the chain.

The hosted option

One script tag. That’s the whole thing.

Prefer not to run a plugin? Sign up, copy the snippet from your dashboard, and paste it into your WordPress header. Every Ninja Forms form on the site gets detected automatically, including multi-part and AJAX submissions. The block below shows what the snippet looks like, with placeholder text where your unique site ID will be.

example only. Your real code is in the dashboard
<!-- illustrative. Paste your real snippet from app.leadsource.co -->
<script src="https://leadsource.co/s/[your-site-id].js" async></script>

The real snippet is generated for your account when you sign up. Copy it from the install page in your dashboard. Under 50ms execution. Async, so it doesn’t block your page. No dependencies.

Install on WordPress

Three steps. Most sites are done in five minutes.

1

Pick your path

Install the free Lead Source plugin from the WordPress.org directory, or grab your one-line snippet from the dashboard if you would rather not run a plugin. Either covers every Ninja Forms form on the site.

No credit card required to start. The signup flow takes about a minute.
2

Activate, or paste the snippet

With the plugin, click Activate and run the short setup wizard. With the script, paste it anywhere inside your <head> using WPCode, Insert Headers and Footers, or your theme.

No Action chain changes. Your existing Email, Store Submission, and redirect Actions keep running.
3

Submit a test through any Ninja Forms form

Open a page with a Ninja Forms form on it. Fill it in. Submit. Within a minute or two, the lead appears with the source, the campaign, and every page visited before submitting.

Want to test it end to end? Add ?utm_source=test to the URL before you submit. That’ll be the source on the lead.
Common questions

Questions, answered.

Do I use the plugin or the script for Ninja Forms?

Either works and both capture the same thing. Install the free Lead Source plugin from the WordPress.org directory if you want every lead stored inside your own WordPress admin with no account. Use the one-line hosted script if you would rather keep leads in your Lead Source dashboard, independent of WordPress. Pick based on where you want the data to live.

Is there an official Ninja Forms plugin on WordPress.org?

Yes. The free Lead Source plugin is on the WordPress.org directory. Search Plugins, Add New for "Lead Source", install and activate, and it captures the source on every Ninja Forms submission. There is no Action to build and no Add-on to buy.

Do I need to add a new Action to my Ninja Forms?

No. Lead Source listens for the Ninja Forms submission event in the browser rather than running inside your Action chain. Your Email, Store Submission, and redirect Actions keep working unchanged, and the source is recorded alongside them.

Does it work with multi-part Ninja Forms and conditional logic?

Yes. Lead Source captures the source at the moment of final submission, so the number of steps and which conditional rules fired make no difference. It sees the success event and attaches the source.

Will it conflict with my Ninja Forms Add-ons or integrations?

No. Lead Source observes the submission without intercepting it, so CRM, email marketing, and webhook Add-ons all keep running as configured. It adds the source record in parallel.

Track your Ninja Forms leads. Free to start.

The free plugin or one script captures the source, UTM parameters, and page journey on every Ninja Forms submission, with no Action to build and the first lead in your inbox within minutes.

Start free

Free to start ยท no card