Ninja Forms Attribution Tracking
Know which marketing channels actually generate leads through your Ninja Forms. AttributionHub captures UTM data, referrers, and landing pages — then stores them as hidden field values in every submission.
Why Ninja Forms Submissions Need Marketing Context
Ninja Forms is a powerful WordPress form builder with a clean drag-and-drop interface and solid free tier. But like most form plugins, it captures what someone submitted — not how they found you.
When a potential customer fills out your contact form after clicking through from a Facebook ad, all you see is their name and message. The connection to the ad campaign? Lost.
AttributionHub fixes this by capturing marketing attribution data on every page view and writing it into Ninja Forms hidden fields before submission. Every lead arrives with its source, campaign, and channel already attached.
What Data Gets Captured
UTM Parameters
Source, medium, campaign, term, and content values from the visitor's URL, stored with the form submission.
Landing Page & Referrer
The first page visited and the referring website, showing you the complete entry path for every lead.
Automatic Channel Detection
Each lead is tagged as Paid Search, Organic, Social, Direct, Email, or Referral — no manual classification.
First Touch & Last Touch
Both the original source and the most recent touchpoint are captured, giving you the full picture.
How It Works
Step 1: Add the Tracking Script
Place the AttributionHub script in your WordPress site header:
<script src="https://cdn.attributionhub.com/attribution.js?id=YOUR_ID" async defer></script>
Step 2: Add Hidden Fields in Ninja Forms
Open your form in the Ninja Forms builder. From the fields panel, drag Hidden fields from the Misc or Layout & HTML section. Set the Field Key for each hidden field to match the AttributionHub field names:
| Hidden Field Label | Field Key | Example Value |
|---|---|---|
| Channel | ah_channel | Paid Social |
| Source | utm_source | |
| Medium | utm_medium | paid-social |
| Campaign | utm_campaign | summer-promo |
| Keyword | utm_term | ninja forms tracking |
| Landing Page | ah_landing_page | /services |
| Referrer | ah_referrer | facebook.com |
Step 3: Test Your Setup
Visit your site with UTM parameters and submit a test form:
https://yoursite.com/contact?utm_source=facebook&utm_medium=paid-social&utm_campaign=summer-promo
Check the Ninja Forms submission detail to confirm the hidden fields contain the correct attribution data.
For complete setup instructions, see the Ninja Forms integration guide.
Use Cases
Consultants & Freelancers — Track whether clients find you through Google, LinkedIn, or word of mouth. Attribution data helps you invest time in the channels that actually generate business.
Nonprofits — Understand which campaigns drive donation form completions. Knowing whether donors came from email, social media, or search helps you allocate fundraising budgets effectively.
Online Courses — When students fill out enrollment or inquiry forms, see which ads or content brought them there. Focus promotion on what works.
WordPress Theme & Plugin Developers — If you offer support or contact forms on your site, attribution tracking shows which marketing efforts bring in the most customer inquiries.
What Makes AttributionHub Different
AJAX-Ready
Ninja Forms uses AJAX for submissions. AttributionHub sets hidden field values before the AJAX request fires, ensuring data is always captured.
No Plugin Required
One script tag handles everything. No WordPress plugin installation, no version conflicts, no database overhead.
Cookieless Tracking
First-party storage means attribution works even when visitors block third-party cookies.
Merge Tag Support
Use Ninja Forms merge tags in email notifications to include attribution data in your alerts.
Frequently Asked Questions
Does this work with the free version of Ninja Forms?
Yes, the free version of Ninja Forms supports hidden fields. You can add them through the form builder and set the Field Key to match AttributionHub field names.
Will attribution data appear in my email notifications?
Yes. You can include hidden field values in Ninja Forms email notifications using merge tags, so every lead notification includes the marketing source.
Can I export attribution data?
Yes. Ninja Forms submission exports include all field data, including hidden fields. You can export to CSV or connect to third-party tools via Ninja Forms' integrations.
Does it work with multi-step forms?
Yes. AttributionHub populates hidden fields regardless of form structure. Multi-step forms, conditional logic, and calculated fields all work as expected.
Start Tracking Your Ninja Forms Leads
Set up attribution in minutes. See which channels and campaigns actually drive leads through your Ninja Forms.
Get Started Free