Capture UTM Parameters in WordPress Forms
A WordPress form can record more than the details a visitor types. With the right hidden fields and site code, each submission can also carry the channel, campaign detail, landing page, and click identifier that explain where the lead came from. That makes it possible to compare leads, customers, and revenue by the marketing activity that produced them.
Why form-level attribution matters
Start with the decision you need to make: which channels and campaigns create enquiries, which create customers, and which create revenue. UTM parameters attached to a form submission provide the campaign layer. Channel classification adds the broader source, including organic search, organic social, direct, and referral traffic that may have no UTM values. Classification is based on technical inputs such as UTM parameters, HTTP referrer data, and device type. Together, they prevent a report from treating every lead as anonymous.
A four-step setup and check
First, install the attribution code in the site header, using theme settings, a header/footer plugin, or Google Tag Manager. Second, add hidden fields to the forms that capture leads. Third, let the code classify the visit and populate those fields. Fourth, confirm that the values appear with a test submission in the form plugin's entries area and in any connected CRM or spreadsheet. Hidden fields are invisible to visitors but remain part of the submitted record.
Failure distinction: landing-page-only capture
A common failure is losing campaign data when the visitor leaves the landing page. For example, someone arrives from a paid search ad, reads the homepage, then opens a quote form on another page. If parameters are read only on arrival, they may be gone by submission. Browser storage solves that gap by carrying the classification forward until the form is completed.
Worked example: reading a paid-search submission
In an illustrative paid-search journey, the hidden fields might record Channel = Paid Search, Channel Drilldown 1 = Google, Channel Drilldown 2 = Share Files Campaign, and Channel Drilldown 3 = Free Trial Ad. Landing Page = www.dropbox.com/features/share and Landing Page Group = Features add the first page viewed and its section. Those values depend on the UTM parameters the advertiser uses, so treat the example as a mapping pattern rather than a guaranteed result.
Click IDs and landing pages add context
Beyond UTM values, click IDs can connect a lead to the exact ad click. When the lead later becomes a customer, that identifier can be sent back to the advertising platform as an offline conversion. Landing-page fields answer a different question: which page or content section first brought the visitor in. Use those fields to compare, for instance, blog-originated leads with leads from service pages.
Reports to build after data is flowing
Once submissions reach a CRM or spreadsheet, build reports in layers. Leads by channel shows demand by source. Leads by social network separates environments that share one ad interface. Customers by campaign moves beyond enquiries to closed business. Revenue by keyword, enabled by tracking templates that insert the search term into parameters, shows which terms produce value. Compare each layer before shifting budget, because a channel can drive visits without producing customers.
| Hidden field | What it records | Use it to answer |
|---|---|---|
| Channel | Broad source category | Which source produced the lead? |
| Channel Drilldown 1 | First level of source detail | Which platform or network? |
| Channel Drilldown 2 | Second level of source detail | Which campaign? |
| Channel Drilldown 3 | Third level of source detail | Which ad or variant? |
| Landing Page | First page viewed | Where did the visitor arrive? |
| Landing Page Group | Section of the landing page | Which content area produced the lead? |
Field set described in the captured workflow; confirm labels in the owner's form and CRM.
| Report | Primary measure | Decision it supports |
|---|---|---|
| Leads by Channel | Lead count by source | Where to focus marketing resources |
| Leads by Facebook Ads Network | Lead count by network | Which social environment performs best |
| Customers by Google Ads campaign | Customer count by campaign | Which campaigns create customers |
| Revenue by Keyword | Revenue by search term | Which keywords deserve higher bids or SEO attention |
Example reporting views; actual fields depend on UTM naming and CRM mapping.
Frequently asked questions
What are the basic setup steps?
Add a small site code through theme settings, a header/footer plugin, or Google Tag Manager, then add hidden fields to each lead form so attribution values have a destination on submission.
Which hidden fields are needed?
Channel, Channel Drilldown 1, Channel Drilldown 2, Channel Drilldown 3, Landing Page, and Landing Page Group. The exact labels should match the fields configured in your form builder and CRM.
Does attribution survive navigation to another page?
Yes. Storing attribution in the browser lets it persist when a visitor moves from a landing page to a separate form page, unlike a method that only reads parameters on the first page.
Can click IDs be captured too?
Click identifiers such as GCLID, MSCLKID, and FBCLID can be passed with the lead, then returned to an ad platform when that lead later becomes a customer for offline conversion measurement.
What reports become possible after capture?
Group leads by channel, leads by social network, customers by paid-search campaign, and revenue by keyword. Each view connects spend to outcomes rather than only website visits.