Skip to content
TraceLead

Unbounce UTM tracking that still knows the source on the second visit

Add hidden fields named tl_channel, tl_utm_campaign and so on to your Unbounce form, and TraceLead fills them with where the visitor first came from. The source is in each lead in Unbounce and in every integration Unbounce sends leads to.

No card needed. No lead caps on any plan.

  • Unbounce: Tested on every release against the builder's markup
  • How we test
Added to your Unbounce leads 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 Unbounce lead source tracking breaks on the second visit

Unbounce can fill a hidden field from a URL parameter of the same name. That covers the visitor who clicks an ad and converts at once, with utm_campaign still in the address.

It does not cover the visitor who leaves and comes back from a bookmark or another page, and it never covered search, social and referral visits, which arrive with no parameters at all. Those leads land in Unbounce with blank source fields.

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 Unbounce 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 the page's domain once your banner allows it, and fills the fields on the visit that converts. Its value replaces Unbounce's URL fill, so the first touch wins.

How to set up Unbounce hidden fields for UTM tracking

Four steps, three of them in the Unbounce builder. The tested fixture renders Unbounce's published form markup on every release.

The full Unbounce guide
  1. Allow the landing page's domain

    In TraceLead, add the domain the page is published on, such as go.example.com, to your site's allowed domains, plus Unbounce's preview domain while you test.

  2. Add the tag in the JavaScripts panel

    In the page builder, open JavaScripts → Add new JavaScript, paste the TraceLead tag and your consent call, and set Placement to Head. For every page at once, use Settings → Script Manager instead.

    <script async src="https://app.tracelead.io/snippet/v1/tracelead.js" data-site="tl_YOUR_SITE_ID"></script>
  3. Add a Hidden Field per value

    Edit the form and add a Hidden Field for each value. Set its Field name and ID to tl_ plus the field, and leave the default value empty:

    tl_channel
    tl_source
    tl_utm_campaign
    tl_gclid
    tl_landing_page
  4. Publish and check a lead

    Publish, open the page with ?utm_source=test&utm_medium=cpc, accept cookies and send a test entry. It appears under Leads with tl_channel set to paid_search.

What arrives in your Unbounce leads

Each hidden field arrives with the lead in Unbounce's lead list and in every integration Unbounce sends leads to, where you map it like any other field.

Also available: utm_term, utm_content, Microsoft, Meta, LinkedIn, TikTok and X click ids, the referring site, and optionally the last touch and the number of visits before the lead.

Unbounce field name and ID 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.

How do I add UTM hidden fields to an Unbounce form?

Edit the form, add a Hidden Field for each value and set its Field name and ID to tl_channel, tl_source, tl_utm_campaign and so on. Leave the default value empty; TraceLead fills it on the published page once the visitor accepts cookies.

Unbounce already fills hidden fields from URL parameters. Why add TraceLead?

Unbounce fills a hidden field from a URL parameter of the same name, so it only works when the visitor submits while the parameter is still in the address. TraceLead's value replaces it once consent is given, so a visitor who clicked an ad last week and returns without UTM tags still arrives with that campaign.

Where do I put the TraceLead tag in Unbounce?

In the page builder, under JavaScripts → Add new JavaScript, with Placement set to Head, together with your consent call. To use it on every landing page, add it once under Settings → Script Manager instead.

What lead source do visits without UTM tags get?

They are classified from the click id or the referrer: a Google ad click with a gclid is google / cpc / paid_search, a Google search is google / organic / organic_search, a link from ChatGPT is usually chatgpt.com / referral, and a typed address is (direct) / (none) with the channel direct.

My Unbounce page is on its own subdomain. Does that matter?

Add the domain the page is published on, for example go.example.com, to your site's allowed domains in TraceLead, and the Unbounce preview domain while you test. A subdomain of your main domain, such as go.example.com, shares the first touch with example.com when the browser allows; a page on a separate domain, such as the Unbounce preview domain, keeps its own record.

Does TraceLead see the email address or other answers?

No. The snippet writes into the hidden fields and never reads any value in the form. The lead goes from the page to Unbounce 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 if TraceLead is down or blocked?

The form still submits. The hidden fields are empty for that lead; nothing in the Unbounce form waits for TraceLead.

Your next Unbounce lead, with its source.

Add the tag in the JavaScripts panel, add the hidden fields and publish.

No card needed. Cancel any time.

The whole install v1.4.0
JavaScripts → Add new JavaScript (Placement: Head):
<script async src="https://app.tracelead.io/snippet/v1/tracelead.js" data-site="tl_YOUR_SITE_ID"></script>

Form → Hidden Field, Field name and ID:
tl_channel
tl_source
tl_utm_campaign
tl_gclid