WordPress form hidden fields, and when you can skip them
Hidden fields carry campaign data into WordPress forms, and they work. Below is the full method, then the one snippet that sources every plugin with nothing declared.
- Channel
- Organic search
- Hidden fields
- none declared
- Landing page
- /managed-it
- Form
- Contact form
- /managed-it
- /pricing
- /contact
WordPress hidden fields, done properly
Declare, capture, populate, test, map. The five steps, start to finish.
Every WordPress plugin, zero declarations
One snippet in the header and each submission arrives sourced. Forms untouched.
The full WordPress visit, attached
Organic and direct visits named, return visitors joined up, the pages read in order.
WordPress hidden fields, still useful
Record IDs, known contacts, plans and partner codes. Those jobs stay theirs.
WordPress hidden fields, done properly
A hidden field is a named slot in your form that the visitor never sees. Add a matching parameter to the URL that opens the form, and whatever it holds rides back in the submission. It passes a value through. It never goes looking for one.
- Declare the fields in your form builder:
utm_source,utm_medium,utm_campaign,utm_term,utm_content. The names are case sensitive. - Capture the values at landing. Read the parameters as the visitor arrives and store them, so they outlive the next click. A cookie outlasts the browser session; session storage does not.
- Populate them on every form. Each plugin has its own way of doing this, which is why the work repeats per plugin.
- Test each way into the form. Every entry point stands or falls on its own, without telling you.
- Map the fields onward into your CRM, once per form and once per plugin.
- Field 1
- utm_source
- Field 2
- utm_medium
- Field 3
- utm_campaign
- utm_source
- newsletter
- utm_medium
- utm_campaign
- october-newsletter
<script async src="https://app.leadsource.co/ft.js" data-site="YOUR_SITE_KEY"></script>
Every WordPress plugin, zero declarations
Lead Source recognises the visitor on your site and pairs the submission with them the moment it lands. Nothing is pushed into the form. So there is no field to declare, no link to extend and no mapping to repeat. Five steps become one paste. The paste is covered on the WordPress lead tracking page.
- Paste the tracking code into your site header. WPCode’s Header section does the job.
- Clear the page cache so every page serves the new code.
5-minute install · no card
Your WordPress hidden fields stay put
Hidden fields you have already wired keep doing what you built them for. Lead Source never reads them, edits them or gets in their way. It writes its attribution onto the lead, next to them. Peaceful coexistence.
The full WordPress visit, attached
A hidden field holds whatever the URL handed it, and nothing more. The tracking code records the visit itself: organic, direct and referral named, a returning visitor joined to their first campaign, and the pages they read on the way. Three pricing-page reads show as three.
- A channel on every submission, tagged or not.
- First and last touch on the same lead.
- A form published tomorrow is covered on publish.
- /managed-it
- /pricing ×3
- /contact
- record_id
- 7730
- product
- cyber-security-audit
- location
- north-shore
- affiliate
- okafor-12
WordPress hidden fields, still useful
Attribution is one job a hidden field can do. For these others it stays the correct choice, and Lead Source replaces none of them. Run both.
- An internal record ID, so the submission lands already linked to its account.
- A known email, pre-filled on a form sent to an existing contact.
- A product, plan or location, so one form covers several contexts.
- A partner or affiliate code that you issued.
How do I add hidden fields to a WordPress form?
Declare a field per UTM in the form builder, store the URL parameters when someone lands, and populate them on every form. Each plugin does that part its own way. Then test every entry point and map the fields into your CRM.
What can a WordPress hidden field carry?
Only a value that was on the URL. Untagged visits from search, bookmarks and other sites bring none, so those fields come back blank. A visitor whose storage cleared before they returned comes back blank too, and no field carries the page journey. Lead Source records all three from the visit.
WordPress hidden field questions, answered.
Why are my hidden fields empty?
Usually one of three things: the field name differs from the parameter, the link that opened the form never carried the parameter, or the visitor browsed to another page before opening the form. Check them in that order.
Do I need a different setup per plugin?
With hidden fields, yes: each plugin populates them its own way. With the Lead Source tracking code, one snippet covers every plugin on the site.
Can I use both?
Yes, and plenty of sites do. Hidden fields keep their other jobs, and Lead Source handles the source, campaign and journey alongside them.
Every WordPress form, sourced without a field.
One snippet in the header and each submission arrives with its channel, campaign and pages read. Free to start.
Start freeFree to start · no card









