Skip to content

Track the source of leads in WS Form with hidden fields

Visitor analytics can show where traffic came from, but it does not reliably show which visit produced a particular lead. Adding hidden attribution fields to WS Form closes that gap: each submission carries the channel, campaign detail and landing page that preceded it, so you can see which marketing activity actually generated enquiries.

Why visitor data alone is not enough

Google Analytics and similar tools describe visits, yet a form submission is a separate event. Without attribution stored on the submission itself, you cannot confidently connect a name, email or phone number to the ad, search result or social post that brought that person to the site. Hidden fields solve this by travelling with the submission while remaining invisible to the person completing the form, so the extra data does not change what visitors see or do.

Step 1: Install the code and add hidden fields

Install the tracking code on the website first, using the WordPress installation instructions. Then add hidden fields to each WS Form form you want to measure. The fields described are Channel, Channel Drilldown 1, Channel Drilldown 2, Channel Drilldown 3 and Channel Drilldown 4. WS Form guidance explains how to add hidden fields to a form.

Step 2: Populate the hidden fields before submission

Once the code is in place, the tool records where each visitor arrived from. When that visitor later completes a form, the tool writes the arrival information into the hidden fields, for example Paid Search, Paid Social or Organic Search. Because the fields are hidden, visitors do not see the attribution values and the form experience stays unchanged.

Step 3: Capture the data with the submission

On submission, WS Form stores the attribution values alongside the answers the lead typed in, such as name, email and phone. You can then view the values in the WordPress Submissions table, include them in new-lead notification emails, send them through WS Form integrations to Salesforce, HubSpot or Pipedrive, pass them via Zapier to other CRMs, or send them to Google Sheets with the native Google Sheets integration.

What the channel fields contain

Channel describes the broad route the lead used to reach the site. The drilldown fields break that route into finer detail. For a paid Google Ads visit, an illustrative set of values is Channel: Paid Search, Channel Drilldown 1: Google, Channel Drilldown 2: the campaign name, and Channel Drilldown 3: the keyword used. For an organic Google visit, the same structure might be Channel: Organic Search, Channel Drilldown 1: Google, Channel Drilldown 2: www.google.com or the specific Google domain, and Channel Drilldown 3: the search keyword where available. The exact values depend on the UTM parameters and referral information available for that visit.

Landing page and landing page group

Alongside channel data, the tool captures the first page the visitor landed on and the group that page belongs to. For example, a landing page might be a specific blog article path, while the landing page group is /blog. Comparing the two lets you see whether a whole section of the site generates leads and which individual pages within that section do the work.

Three reports worth building

Leads by channel shows monthly lead volume across routes such as Paid Search, Paid Social and Organic Search, giving an overview of where enquiries originate and where more effort may be worthwhile. Leads by Google Ads campaign shows which campaigns produce leads rather than only clicks or visits, helping you direct budget towards campaigns that convert and pause those that do not. Leads by social network shows which social platforms generate leads from company posts, so posting effort can follow the networks that perform best.

Pre-launch checklist

Use this checklist before relying on the data: confirm the tracking code is installed on every page where forms appear, confirm each form has all five channel fields, submit a test form from a tagged campaign link and check the values in the Submissions table, verify the values appear in notification emails, and confirm the CRM or spreadsheet destination receives the fields correctly. Re-test after changing themes, forms or integrations.

Wrap up

With attribution stored on every WS Form submission, you can see in WordPress, in notification emails, in a CRM or in a spreadsheet which channels and campaigns are producing leads. That makes it easier to invest in the activity that works and reduce the activity that only produces visits. Before committing, check the current plan terms and setup effort directly with the provider, since trial length and time to first working form can vary by site.

Hidden-field map for WS Form lead-source tracking
FieldWhat it recordsExample use
ChannelBroad arrival routeCompare Paid Search with Organic Search
Channel Drilldown 1Platform or sourceIdentify Google
Channel Drilldown 2Campaign or referring domainReport leads by campaign
Channel Drilldown 3Keyword or further detailReport leads by keyword
Channel Drilldown 4Additional drilldown detailUse where a fourth level is available
Landing pageFirst page visitedFind the exact page that produced the lead
Landing page groupSection of the siteCompare blog, product and other sections

Example values depend on UTM parameters and referral data available for the visit.

Frequently asked questions

How does lead-source data get into a WS Form submission?

Add the tracking code to the site, create the hidden fields on the form, and let the tool populate them before submission. The values are then stored with the other answers and can be viewed, emailed, or sent onward.

What is the difference between Channel and the Channel Drilldown fields?

Channel identifies the broad route in, such as Paid Search, Paid Social or Organic Search. The drilldown fields add progressively more specific detail, such as the platform, campaign and keyword where available.

Where can I use the captured lead-source data after submission?

Yes. The captured fields can be shown in the WordPress Submissions table, added to notification emails, passed through WS Form integrations to a CRM such as Salesforce, HubSpot or Pipedrive, sent via Zapier to other systems, or sent to Google Sheets.

What do landing page and landing page group show?

The landing page is the first page the visitor reached, and the landing page group is the broader section of the site, for example /blog. Together they show which sections and individual pages produce leads.