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.
Works with all Ninja Forms features
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.
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
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
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.
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
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
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
- 01Add a hidden field per UTM key to every form, set to populate from the matching query-string value.
- 02Map each hidden field into your Email Action with its merge tag, or the values never reach your inbox.
- 03Query-string population reads the URL at load. Add a cookie-persistence script so the source survives a second pageview.
- 04Rebuild the same fields and merge tags on every new form, and keep them working through Ninja Forms updates.
With Lead Source
- 01Add Lead Source once, the free plugin or one script tag, and every Ninja Forms form is covered.
- 02The source is captured at landing and persists across the visit, so it is still there when the submission fires.
- 03The campaign name is written out in plain language, not left as a raw UTM string in a hidden field.
- 04New 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.
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.
<!-- 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.
Three steps. Most sites are done in five minutes.
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.
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.
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.
?utm_source=test to the URL before you submit. That’ll be the source on the lead.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 freeFree to start ยท no card