To capture lead source in WPForms hidden fields, add a Hidden Field and use a Query String Variable Smart Tag to read a campaign parameter from the form page's URL. Submit a test enquiry and check the saved entry. If visitors browse other pages first, you'll also need a way to retain their source. TrackLeadSource's role is to keep the available source and journey with a lead, so you can connect marketing activity with customer outcomes.
Add source fields to your WPForms form
A quote request tells you who needs your service. Adding source information helps you work out which campaign brought that person to you, then follow what happens to the enquiry.
Start with WPForms' native URL method if your campaign links open the page containing your form. The Hidden Field is available on paid plans starting with Basic. WPForms Lite doesn't include this field type, according to the WPForms hidden-field guide.
In your WordPress dashboard, open WPForms and edit the form. Drag a Hidden Field onto it, then click the field to open its options. Give it a label you can recognise, such as UTM Source.
Open the Advanced tab and find Default Value. Select Query String Variable from the Smart Tags menu, or enter the tag directly. Use a separate field for each value:
| Field label | Default Value |
|---|---|
| UTM Source | {query_var key="utm_source"} |
| UTM Medium | {query_var key="utm_medium"} |
| UTM Campaign | {query_var key="utm_campaign"} |
Save the form. These are example labels for the native WPForms method, not TrackLeadSource installation fields.
The key inside the quotes must match the parameter in your link. A tag using key="source" reads ?source=google; it won't read ?utm_source=google. WPForms explains this matching rule in its query-string tutorial.
For example, this illustrative URL uses the keys in the table. Replace the domain and path with your form page:
https://example.com/contact/?utm_source=google&utm_medium=cpc&utm_campaign=office_cleaning
Here, google names the source, cpc labels the traffic as paid search, and office_cleaning identifies the campaign. The hidden fields carry those values with the visitor's answers without adding visible questions.
Keep your campaign labels consistent. “Google” alone doesn't distinguish an ad from an unpaid search result. Likewise, Facebook can send visitors through ads or unpaid posts. Campaign tags help explain those differences; a missing UTM value doesn't prove a visit was organic.
Check the saved enquiry and its destination
Open your tagged form URL and send a test submission. In WordPress, open WPForms > Entries, select the form, and click View beside that submission. This is the entry workflow described in WPForms' entry-management guide.
For the example above, the expected values are:
| Field | Expected test value |
|---|---|
| UTM Source | |
| UTM Medium | cpc |
| UTM Campaign | office_cleaning |
If you receive enquiries by email, check the notification too. In the form builder, open Settings > Notifications and use the Smart Tags menu in the message field to insert your source fields. WPForms uses tags such as {field_id="15"} to include a submitted field value. Select your own field from the menu; the number depends on your form. See WPForms' Smart Tag documentation.
If the form sends leads to a CRM or spreadsheet, include the source fields in that connection's mapping. Open the resulting lead record and compare it with the WPForms entry. A correct entry followed by an empty CRM field points to the transfer or mapping stage.
Repeat this check whenever you change the form or its destination. The useful result is source information beside the enquiry where your team works.
Keep the source when visitors browse before submitting
Someone looking for office cleaning may click your ad, read your services page, check your coverage area, and then request a quote. Their final address might be example.com/contact/, with no campaign parameters.
The native tags above read the current URL. They can't retrieve an earlier page's parameters once those values are absent. To see the difference on your site, open a tagged services-page URL, follow an ordinary link to the contact page, and submit another test. Compare that entry with your direct-to-form test.
For this longer path, choose a method that records the source on arrival and keeps it available until submission. A developer can implement that behaviour, or you can use a tracking tool whose form support has been checked for your setup.
WPForms also has a User Journey addon, included with Pro, which shows pages visited and campaign context with form entries. If you already use it, inspect what it records and whether you can pass the information you need to your destination before adding another tool.
With any retention method, check a later campaign visit as well. Decide whether your reporting needs the first recorded source, the latest source, or both. A returning visitor can have more than one relevant marketing interaction.
TrackLeadSource
See the story behind each lead.
Keep source, campaign, and journey context together when a visitor becomes a lead.
14-day free trial. Cancel anytime
Use the journey to understand which leads become customers
TrackLeadSource collects available source, medium and campaign information, along with the recorded source journey and pages visited. Its workflow passes that context through hidden form fields with the enquiry. For a WPForms installation, confirm the supported field configuration before using it; the native Smart Tags above describe WPForms' own URL method.
Consider this illustrative office-cleaning enquiry:
| Part of the enquiry's history | Recorded context |
|---|---|
| First arrival | Google ad for office cleaning |
| Later return | An email linking to a cleaning-service page |
| Pages viewed before the enquiry | Services > Coverage area > Quote request |
| Outcome recorded by the sales team | Suitable enquiry; became a customer |
Keeping the arrival and return sources helps you see the ad's earlier role alongside the later email visit. The page path adds context for the person replying, although viewing a page doesn't prove buying intent.
The sales outcome makes this information useful for marketing decisions. If a campaign repeatedly brings enquiries outside your coverage area, review its targeting and landing-page message. When comparing channels, look at suitable enquiries and customers as well as the number of submissions. Add campaign costs if you're assessing the return on your spending.
TrackLeadSource supplies the recorded source context. Your team keeps qualification and sales results in its CRM or spreadsheet. Connecting those records is the reason to track lead source. Our guide to measuring lead quality by source explains how to compare the results.
Browser tracking can miss visits when data is cleared, tracking is blocked, or someone switches devices. Keep unknown sources visible in your reports rather than assigning them to a channel without evidence.
Common questions
The {url_referer} Smart Tag in a hidden field records the page that referred the visitor to the form page. After an internal navigation, that may be your own services page. It doesn't establish the original external source. WPForms also notes that using this tag directly in a notification returns the submission page URL instead. See its hidden-data Smart Tag guide.
Check the final address after redirects and compare each parameter name with its Smart Tag key. Confirm that you saved the changes to the form embedded on that page. If those match, investigate how your site's cache and other plugins affect field population. Use a fresh test submission to check each change.
For the native method in this guide, add and configure the hidden fields in each form that needs source data. Check each form's notification and destination mapping too. Reusing a form on several pages still requires testing the paths visitors take to reach it.
Helping marketers connect website form submissions to their source, campaign, and customer journey.


