A Gravity Forms entry tells you who submitted the form.
It doesn’t tell you where they came from.
No campaign. No source. No channel. No click ID. Just name, email, and whatever else you asked for.
That’s fine if you don’t care about marketing attribution. If you do, you’re not aware of which channel drives the most leads.
Here’s what lead source tracking actually means in Gravity Forms, the four data points you’re probably missing, and the three ways to capture them…
Table of Contents
What “lead source” actually means
Lead source isn’t one field. It’s four.
- Original referral source: where the visitor came from on their first visit to your site, preserved across sessions
- Most recent referral source: where they came from on the visit that converted
- UTM parameters:
utm_source,utm_medium,utm_campaign,utm_content,utm_term - Google Ads click IDs:
GCLID,GBRAID,WBRAID
Most “lead source” setups capture one of these and stop there. Then teams wonder why attribution arguments keep breaking out.
All 4 should be captured on every entry.
Why Gravity Forms doesn’t do this by default
Gravity Forms is a form builder. Its job is collecting the submission, not tracking how the visitor got there.
Source tracking is a separate problem. It involves:
- Reading UTM and click ID parameters from the URL when a visitor lands
- Storing that data so it survives the rest of the session
- Preserving first-visit data across multiple sessions, sometimes weeks apart
- Writing those values into hidden fields at submission time
None of that happens on its own. You either build it, or you install something that does.
The three ways to capture lead source in Gravity Forms
1. DIY hidden fields
Gravity Forms has a built-in feature for this called Dynamic Population.
- Add a Hidden field to your form
- Open the field’s Advanced tab
- Check Allow field to be populated dynamically
- Set the Parameter Name to
utm_source
Repeat for each parameter you want to capture: utm_medium, utm_campaign, utm_content, utm_term, gclid, gbraid, and wbraid. When a visitor lands directly on the form page with those parameters in the URL, Gravity Forms populates the hidden fields automatically. No JavaScript required.
The catch: this only works when the form page is the landing page. If a visitor clicks your ad, lands on a blog post, browses around, then navigates to /contact, the URL parameters are long gone by the time they reach the form.
To fix that, we’ve written a JavaScript snippet that captures UTMs and click IDs on any page load, stashes them in session storage, and populates matching Gravity Forms hidden fields when the form renders.
Full code and setup instructions here: Capture UTM Parameters Across Pages in Gravity Forms.
✅ Free
✅ Captures UTMs and Google Ads click IDs (with the snippet)
✅ Survives navigation within a single session
❌ Loses first-touch across multiple sessions (visitor clicks your ad today, converts three weeks later)
❌ Doesn’t capture landing page URLs or first-visit dates
❌ Requires manual setup on every new form you build
❌ Breaks for users who block session storage through privacy tools
Good enough for single-session campaigns. Not good enough if you care about attribution across a multi-visit buying cycle.
2. Google Analytics plus reporting glue
Use GA4 or Google Tag Manager to capture UTMs at the session level, then reconcile form submissions to GA sessions by timestamp or user ID.
✅ Already set up if you’re running GA4
❌ Doesn’t store source data inside the form entry
❌ Requires manual reconciliation in every report
❌ Loses data when users block trackers, which a lot of them do
❌ Dies when the GA session expires
Useful for traffic reporting. Useless for individual lead attribution.
3. A plugin built for this
Capture all four data points automatically. Store them inside the Gravity Forms entry itself. Preserve across sessions. Pass them to your CRM.
✅ First-touch source preserved across multiple visits
✅ Last-touch source captured at submission
✅ UTMs and Google Ads click IDs included
✅ Stored on the entry, not in a cookie that disappears
✅ Works with your CRM mapping out of the box
This is the category Plugin Brewery built for.
Quick comparison
| Approach | Captures UTMs | Captures click IDs | Preserves first-touch | Stored on entry |
|---|---|---|---|---|
| DIY + JS snippet | ✅ | ✅ | ❌ | ✅ |
| GA4 + reconciliation | ✅ | Partial | ❌ | ❌ |
| Referral Source Tracking plugin | ✅ | ✅ | ✅ | ✅ |
Shameless plug: one row gets all four checkmarks…
What you actually want stored on every entry
When a lead submits, you should be able to open the Gravity Forms entry and see the whole story:
✅ Original source (the first channel that brought them in, potentially weeks ago)
✅ Most recent source (what brought them back on the day they converted)
✅ Full UTM string (source, medium, campaign, content, term)
✅ Google Ads click ID (GCLID, GBRAID, or WBRAID) when applicable
✅ Landing page URL on first visit
✅ Landing page URL at submission
Open an entry. See the whole path. No spreadsheet cross-referencing. No GA session reconciliation. No guessing.
That’s lead source tracking done right.
How Plugin Brewery’s plugin handles it
I built Referral Source Tracking for Gravity Forms because every existing option had a gap. Analytics-only tools don’t store data on the entry. DIY hidden fields lose first-touch. Other plugins capture one or two sources and call it done.
What the plugin does:
- Captures first-touch and last-touch sources on every submission
- Stores the full UTM string, click IDs, and landing page URLs on the entry itself
- Preserves first-visit data across sessions, not just within a single visit
- Writes directly into Gravity Forms entry fields for clean CRM mapping
- Works with any form on your site without per-form setup
If you use WP Forms instead of Gravity Forms, there’s a WP Forms version that does the same thing.
Both are built for the same problem: every form entry arrives with its source story already attached, automatically.
A quick note on attribution models
Lead source tracking captures the data. First-touch vs last-touch attribution is how you use it.
Captured data means you can answer both questions:
- Which channels bring new people in? (first-touch)
- Which channels close the conversion? (last-touch)
Without captured data, neither question has an answer. You’re guessing from key event counts, session totals in GA4 and hoping the CRM notes are right.
For more on how the two models differ and when to use each, see First-Touch vs Last-Touch Attribution.
The short version (TL;DR)
Gravity Forms stores the submission. It doesn’t store the lead source. That part is on you.
You need four things on every entry: first-touch source, last-touch source, UTMs, and Google Ads click IDs. DIY hidden fields plus a JavaScript snippet cover three of them within a session. GA4 covers none of them on the entry itself. A purpose-built plugin covers all four, across every session.
If you want to stop guessing where leads come from and start reporting on it with actual data:
👉 Referral Source Tracking for Gravity Forms
👉 Referral Source Tracking for WP Forms