UTM Parameter Capture via Gravity Forms Hidden Fields
Overview
UTM parameters on inbound links are only useful if they are captured at the point of conversion. Without explicit capture, the attribution data is lost the moment a visitor submits a form. Gravity Forms solves this by allowing hidden fields to auto-populate from URL query parameters — passing source data through to Salesforce and enabling accurate sales attribution.
This is especially critical on commission-based or performance contracts, where proving which campaign drove a closed deal is a contractual requirement.
The Problem
A common attribution gap:
- A contact clicks an ad or email link tagged with UTM parameters (e.g.,
?utm_source=linkedin&utm_medium=paid&utm_campaign=abm-q2) - They land on a page with a lead capture form
- The form submits — but captures no UTM data
- The lead arrives in Salesforce with no source information
- Revenue is closed, but cannot be attributed to the originating campaign
As Mark noted during an ABM strategy session for [1]:
"A UTM parameter is useless unless you capture it. If you put a UTM parameter on a link coming off of an ad, but then there's a form on that page and the form doesn't capture it — you just lost it."
Implementation: Gravity Forms Hidden Fields
How It Works
Gravity Forms supports hidden field types that can be pre-populated from URL parameters using the {query_string} merge tag or individual parameter population.
Setup Steps
-
Add a hidden field to your Gravity Form for each UTM parameter you want to capture:
-utm_source
-utm_medium
-utm_campaign
-utm_term(optional)
-utm_content(optional) -
Configure parameter population on each hidden field:
- In the field settings, set the Parameter Name to match the UTM key (e.g.,utm_source)
- Gravity Forms will auto-populate the field value from the URL on page load -
Map fields to Salesforce via the Gravity Forms Salesforce add-on or a middleware integration (e.g., Zapier, native connector):
- Map each hidden UTM field to the corresponding Lead or Contact field in Salesforce
- Ensure the Salesforce fields exist and are visible to reporting -
Tag all outbound links with UTM parameters consistently — ads, emails, direct mail QR codes, LinkedIn posts, etc.
Result
Every form submission carries the originating campaign data into Salesforce. Sales can filter closed deals by utm_campaign to calculate revenue attributable to each ABM campaign or channel.
Why This Matters for Commission Contracts
On performance-based engagements (e.g., a percentage-of-sales contract), attribution is not just a reporting nicety — it is the mechanism by which the agency gets paid. Without UTM capture:
- Leads generated by the agency's campaigns appear sourceless in CRM
- Sales team cannot confirm which deals came from ABM efforts
- Commission calculations become disputed or impossible
UTM discipline — tagging every link and capturing every parameter — should be treated as a non-negotiable technical requirement from campaign launch.
Related Patterns
- [2]
- [3]
- [4]
Client Examples
- [1] — UTM capture via Gravity Forms hidden fields was identified as a foundational requirement for their ABM program, given the commission-based contract structure. Implementation was scoped as a post-kickoff technical task following the Thursday client presentation.