HubSpot UTM tracking that reaches the contact record from any page
Create a few tl_ contact properties, hide them on your HubSpot form and TraceLead fills them with where the visitor first came from: the Google ad, the LinkedIn post, the newsletter, the ChatGPT answer. The source lands on the contact record on any HubSpot plan, including Free and Starter, which have no attribution reports.
No card needed. No lead caps on any plan.
- HubSpot forms: Tested on every release against the builder's markup
- HubSpot CRM: Documented pattern, not covered by an automated test
- How we test
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
Why HubSpot hidden fields miss the UTM parameters
A HubSpot hidden field can take its value from the URL, but only from the URL of the page where the form is sent. That is fine for a landing page with the form on it, and nowhere else.
A visitor who clicks an ad to your pricing page and enquires from /contact arrives with the campaign fields blank. Visitors from search, social and AI answers never carried UTM tags at all.
-
Monday
Clicks a Google ad, lands on
/pricing?utm_source=google&utm_medium=cpc&utm_campaign=brand-uk&gclid=…, leaves. -
Thursday
Types your address, opens
/contact, sends the HubSpot form.
| Hidden field | Read from the URL | Filled by TraceLead |
|---|---|---|
| tl_channel | empty | paid_search |
| tl_source | empty | |
| 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 sets the hidden properties on whichever page the form is embedded.
How to pass UTM parameters to a HubSpot form
Four steps: three in HubSpot, one on your page. The visitor sees the same form as before.
What we test: the form embed, in raw HTML and in the new editor's iframe, against HubSpot's rendered markup and a stand-in for its form API, on every release. How HubSpot stores the properties after submission is a documented setup, not something our tests reach.
The full HubSpot guide-
Create the contact properties
In Settings → Properties, choose the Contact object and create a Single-line text property per value, for example TraceLead channel. HubSpot suggests an internal name from the label: change it to the
tl_name before saving, because it cannot be edited afterwards.TraceLead channel tl_channel TraceLead source tl_source TraceLead medium tl_medium TraceLead campaign tl_utm_campaign TraceLead landing page tl_landing_page TraceLead first visit tl_first_touch_at -
Add them to the form as hidden fields
In the form editor, add each property, turn on Make this field hidden and leave the default value empty. Publish the form. On your site's page in TraceLead, Start from a preset → HubSpot writes the matching mappings in one step; edit a row if your properties already have other internal names.
-
Add the TraceLead tag to the page
Paste the script tag and your consent call on the page that embeds the form. For a raw HTML form, that is all: the snippet fills every input named
tl_<field>, including forms HubSpot mounts after the page loads, and counts the submission as a lead. -
Forms from the new editor: add the form API script
New-editor forms render in an iframe on HubSpot's domain, where no script on your page can reach the inputs. Paste the script from the guide before HubSpot's embed code. When the form is ready it sets each property through HubSpot's form API, and after a successful submission it reports the lead:
form.setFieldValue('0-1/tl_' + key, fields[key]); window.tracelead('lead', 'hubspot-' + event.detail.formId);Then open the page with
?utm_source=test&utm_medium=cpc, accept cookies, send a test entry and open the new contact.
HubSpot lead source tracking, beside the original source
Each new contact from the form carries the first touch in your own properties: TraceLead channel paid_search, source google, campaign brand-uk. HubSpot's own source properties are left alone.
Add the properties to the contact sidebar, filter lists by them or build a report of contacts by TraceLead channel. A visit from a ChatGPT answer usually arrives as source chatgpt.com, channel referral.
Also available: utm_term, utm_content, Microsoft, Meta, LinkedIn, TikTok and X click ids, and optionally the last touch and the number of visits before the enquiry.
| HubSpot internal name | Holds | Example |
|---|---|---|
| tl_channel | The channel the first visit came from | paid_search |
| tl_source | Where it came from | |
| tl_medium | How it came | cpc |
| tl_utm_campaign | The campaign name from your UTM tags | brand-uk |
| tl_gclid | Google Ads click id, for offline conversion import | Cj0KCQjw… |
| tl_referrer_host | The site that sent the visit | chatgpt.com |
| tl_landing_page | The first page seen, sensitive parameters removed | /pricing? |
| tl_first_touch_at | When the first visit happened | 2026-10-05T09:14:02Z |
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 pass UTM parameters to a HubSpot form?
Create a contact property per value with an internal name such as tl_utm_campaign, add it to the form as a hidden field and install the TraceLead tag on the page. Raw HTML forms are filled by the snippet with no extra code; forms from the new forms editor need the short script in the HubSpot guide, which sets each property through HubSpot's form API.
Why are my HubSpot hidden fields empty?
A hidden field that reads the URL only sees the UTM tags on the page where the form is sent. If the visitor landed on another page, or came back days later, there is nothing to read. TraceLead keeps the first visit after consent and fills the properties on any page. If they stay empty with TraceLead installed, check that consent was given and that the internal names are tl_channel and so on, not a name HubSpot suggested.
Does this replace HubSpot's original source?
No. TraceLead writes only into the tl_ properties you create and leaves HubSpot's own source properties as they are. You get the first campaign, click id and landing page from your own site beside them, as plain text you can filter and report on.
Do I need HubSpot Professional for lead source tracking?
No. The values arrive as ordinary contact properties, so lists, filters and a report of contacts by TraceLead channel work on HubSpot Free and Starter, which have no attribution reports of their own.
How do leads from ChatGPT show up in HubSpot?
A visit from a ChatGPT answer is usually classified by its hostname: TraceLead source chatgpt.com, medium referral, channel referral. Perplexity, Gemini and Claude are recorded the same way under their own hostnames, so you can filter contacts by source.
Does TraceLead connect to my HubSpot account?
No. TraceLead holds no HubSpot credentials and never sees the contact. The form sends the values to HubSpot with the visitor's answers; TraceLead keeps only a pseudonymous lead record (random ids, the form id and page path, and its channel and campaign) for your dashboard.
What if the same contact fills in a form twice?
HubSpot keeps the value it receives at each submission, so a second submission overwrites the properties. The value is still that browser's first touch unless it has expired, 90 days by default, or the visitor used another device.
Your next HubSpot contact, with its first touch.
Create the tl_ properties, hide them on the form and add the tag. Iframe forms need one extra script from the guide.
No card needed. Cancel any time.
HubSpot → Settings → Properties → Contact
tl_channel, tl_source, tl_medium, tl_utm_campaign
Form editor: add each one, Make this field hidden
TraceLead → your site → Start from a preset → HubSpot