Skip to content
TraceLead

Gravity Forms UTM tracking for visitors who browse before they enquire

Give each Gravity Forms Hidden field a parameter name like tl_channel and TraceLead fills it with where the visitor first came from, even when they enquire from another page or come back a week later. The values are saved in the entry and travel with your notifications and feeds.

No card needed. No lead caps on any plan.

  • Gravity Forms and WordPress plugin: Tested on every release against the builder's markup
  • How we test
Added to your Gravity Forms entry Sample data

Added by TraceLead's hidden fields. The name and email stay in your form.

Channel
Paid search
Source / medium
google / cpc
Campaign
brand-uk
Click ID
gclid
Arrived from

Why Gravity Forms dynamic population misses most UTM parameters

The usual recipe is to tick Allow field to be populated dynamically and set the parameter name to utm_source. Gravity Forms then copies that parameter from the address of the page the form sits on.

That catches the visitor who lands on the form page and sends it straight away. Everyone who lands on an article, reads your pricing and then opens /contact arrives with empty fields, and so does every visit from search or social that never had UTM tags.

Two visits, one enquiry Sample data
  1. Monday Clicks a Google ad, lands on /pricing?utm_source=google&utm_medium=cpc&utm_campaign=brand-uk&gclid=…, leaves.
  2. Thursday Types your address, opens /contact, sends the Gravity Forms form.
Hidden field Read from the URL Filled by TraceLead
tl_channel empty paid_search
tl_source empty google
tl_utm_campaign empty brand-uk
tl_gclid empty Cj0KCQjw…
tl_landing_page /contact /pricing?utm_source=google&utm_medium=cpc

TraceLead keeps the first visit in a first-party cookie on your domain once your banner allows it, and fills the field on whichever page the form is sent from.

How to add UTM tracking to Gravity Forms

You keep using Gravity Forms' own Hidden field. Dynamic population stays ticked only because that is where the parameter name lives; the value comes from TraceLead.

The full Gravity Forms guide
  1. Install the TraceLead WordPress plugin

    Upload and activate the plugin, then paste your site ID under Settings → TraceLead. It prints the tag on every page and marks the Gravity Forms fields TraceLead may fill. Gravity Forms picks its own input names, so the plugin is what connects the two.

  2. Add a Hidden field per value

    From Standard Fields, add a Hidden field for each value you want. Label it however you like, for example "Channel".

  3. Set the parameter name under Advanced

    On the field's Advanced tab, tick Allow field to be populated dynamically and set Parameter Name to tl_ plus the field:

    Channel        → tl_channel
    Source         → tl_source
    Campaign       → tl_utm_campaign
    Google click   → tl_gclid
    Landing page   → tl_landing_page

    The plugin adds data-tracelead="channel" to that input when the form renders, and the snippet fills it.

  4. Connect consent and send a test entry

    In Settings → TraceLead, follow the WordPress Consent API or let your banner call TraceLead itself; nothing is filled before consent. Then open any page with ?utm_source=test&utm_medium=cpc, accept cookies, go to a different page with the form and send it. Look at the entry under Forms → Entries.

What arrives in your Gravity Forms entries

Each Hidden field holds one plain value, stored in the entry like any other field. Add it to a notification with the merge tag picker, or map it in a CRM feed.

Also available: utm_term, utm_content, gbraid, wbraid, Microsoft, Meta, LinkedIn, TikTok and X click ids, and optionally the last touch and the number of visits before the enquiry.

Parameter Name Holds
tl_channel The channel the first visit came from
tl_source Where it came from
tl_medium How it came
tl_utm_campaign The campaign name from your UTM tags
tl_gclid Google Ads click id, for offline conversion import
tl_referrer_host The site that sent the visit
tl_landing_page The first page seen, sensitive parameters removed
tl_first_touch_at When the first visit happened

Attribution without personal data. No names, emails, form values, IP addresses or user agents. Ever.

No privacy workarounds. Nothing before consent, no fingerprinting, no ad-blocker bypass, no cross-site identity.

Made in the UK. GBP pricing, UK consent rules in mind, and a person who answers email.

Questions, answered

Anything else? Email us and a person replies.

Can Gravity Forms dynamic population capture UTM parameters?

Only from the address of the page the form is on. If the visitor lands on a blog post from an ad and enquires from your contact page, the UTM tags are no longer in the address and the field arrives empty. With TraceLead, the parameter name is only how the plugin recognises the field; the value comes from the first visit kept in a first-party cookie, not from the address.

How do I track lead source in Gravity Forms?

Add a Hidden field with the parameter name tl_channel, another with tl_source, and so on, and install the TraceLead WordPress plugin. Each entry then holds the channel (paid_search, organic_search, email, referral, direct and so on), the source and the campaign of the visitor's first visit.

Can Gravity Forms capture the gclid?

Yes. Add Hidden fields with the parameter names tl_gclid, tl_gbraid and tl_wbraid (the last two are Google's click ids on iOS). The click id from the ad click is kept for the lifetime you set, 90 days by default, so it is in the entry even when the enquiry comes days later, ready for an offline conversion import in Google Ads.

Do I still need to tick "Allow field to be populated dynamically"?

Yes, because that is where Gravity Forms shows the Parameter Name box. The plugin reads the name tl_ plus the field from it and marks the input for TraceLead. It only marks Hidden fields with a tl_ parameter name; every other field is left alone.

What do visitors without UTM tags show as?

They are classified from the click id or the referring site. Someone who found you on Bing arrives as bing / organic in the organic_search channel, a link shared on Facebook as facebook / social, an AI assistant link as that site / referral, and a typed address as direct. The rules are published in the docs.

Does TraceLead see the entry?

No. The snippet writes into the hidden fields and never reads the other fields. Gravity Forms saves the entry and sends its notifications as before; TraceLead keeps only a pseudonymous lead record (random ids, the form id and page path, and its channel and campaign) for your dashboard, if lead collection is on.

What happens before consent, or if TraceLead is unreachable?

The form submits normally and the hidden fields are empty. Nothing is stored or filled until your banner signals consent, through the WordPress Consent API or a call to tracelead('consent', true).

Your next Gravity Forms entry, with its source.

Install the plugin, add Hidden fields with tl_ parameter names, send a test entry.

No card needed. Cancel any time.

The whole install v1.4.0
Hidden field → Advanced
[x] Allow field to be populated dynamically
Parameter Name: tl_channel

Repeat for tl_source, tl_utm_campaign, tl_gclid