On this page
What this issue is
HubSpot sets an original source on each contact the first time it knows who they are. It works this out from the visitor's hubspotutk cookie, which the HubSpot tracking code sets in the browser. The cookie holds the visitor's earlier page views, referrer and UTM parameters.
When the form is submitted, HubSpot matches the cookie to the new contact and copies the history over. If that match fails, the contact is created with source Offline Sources, Direct traffic, or with the UTM and drill-down fields blank. The lead exists, but you cannot tell which campaign produced it.
Why it costs you leads or sales
You do not lose the lead itself. You lose the proof of where it came from. Reports then credit Direct traffic, paid campaigns look like they produce nothing, and budget gets moved away from channels that actually work.
It also breaks follow-up. Workflows that route or score by source, and offline conversion uploads that need a click ID, stop working for those contacts.
- Ad clickURL has utm_source and gclid
- Landing pageRedirect or missing tracking code drops the data
- Form submitNo hubspotutk match, no hidden UTM values
- HubSpot contactSource shows Direct or Offline
The contact is created, but the campaign data never reaches it.
Example: the same 100 leads before and after the fix. Numbers are illustrative.
How to check if your site has it
Open a recent contact
In HubSpot go to Contacts, open a contact from a paid or tagged campaign and look at Original source, Original source drill-down 1 and 2.
Filter for suspect contacts
Create a contact list or view filtered by Original source is Offline Sources, or Original source drill-down 1 is unknown, and sort by create date.
Test it yourself
Open your landing page in a private window with ?utm_source=test&utm_medium=cpc&utm_campaign=check added, submit the form with a new email, then check the new contact's source fields.
Look for the tracking code
On the landing page open DevTools, Application, Cookies, and look for hubspotutk. In the Network tab look for requests to track.hubspot.com or js.hs-scripts.com.
How to fix it
Common causes are: the tracking code missing from the page holding the form; a cookie banner blocking the HubSpot cookie before consent; a redirect that strips UTMs; a non-HubSpot form that posts to HubSpot without the cookie; and no hidden fields to store UTMs. Work through these in order.
Install the tracking code on every page
Make sure the HubSpot tracking script loads on the landing page and on any page with the form, including embedded forms on other domains.
Keep UTMs through redirects
Test your landing URL with UTMs. If the final URL loses them, change the redirect to pass the query string through.
Let the cookie set after consent
If you use HubSpot's cookie banner or another consent tool, check that the hubspotutk cookie is set once visitors accept. Visitors who decline will not be tracked.
Use HubSpot forms or send the cookie
For a non-HubSpot form, pass the hubspotutk value as hutk in the context of a Forms API submission. Without it HubSpot cannot link the lead to the visit.
Add hidden fields as a backup
Create contact properties for UTM source, medium, campaign and click ID, add them as hidden fields on the form and fill them from the URL.
Use the HubSpot plugin or paste the script
Install the official HubSpot plugin and connect your account, or add the tracking code from HubSpot Settings, Tracking & Analytics, Tracking code. Check that caching or script-optimising plugins do not delay or remove it.
Check non-HubSpot form plugins
If you use another form plugin with a HubSpot add-on, confirm it sends the hubspotutk cookie. If it does not, switch to a HubSpot form.
Add the tracking code as a tag
Create a Custom HTML tag with your HubSpot script, fire it on All Pages, and respect your consent settings.
Fill hidden fields
Add a Custom HTML tag that copies UTM values into hidden inputs (see the code below), fired on pages with the form.
Add the script in Project settings
Go to Project settings, Custom code, and paste the HubSpot tracking code in the Head or Footer section. Publish the site.
Native forms need extra work
Webflow's own forms do not send data to HubSpot by themselves. Use an embedded HubSpot form, or send the data through an integration that includes the hubspotutk cookie.
Post with context
When you call the HubSpot Forms API, include context.hutk (the hubspotutk cookie value) and context.pageUri.
Pass UTMs as fields
Also send UTM values as hidden field values so they are saved even if the cookie is missing.
(function () {
var params = new URLSearchParams(window.location.search);
var keys = ['utm_source', 'utm_medium', 'utm_campaign', 'gclid'];
keys.forEach(function (key) {
var value = params.get(key);
if (value) sessionStorage.setItem(key, value);
});
document.querySelectorAll('form').forEach(function (form) {
keys.forEach(function (key) {
var input = form.querySelector('input[name="' + key + '"]');
if (input && sessionStorage.getItem(key)) input.value = sessionStorage.getItem(key);
});
});
})();Before
- Original source: Offline Sources
- UTM source: empty
- Click ID: empty
- Campaign reports show Direct traffic
After
- Original source: Paid search
- UTM source: google
- Click ID stored
- Campaign reports match ad spend
How to confirm it's fixed
- The hubspotutk cookie is set on the landing page after consent
- The landing URL keeps its UTMs after any redirect
- A test submission with UTMs creates a contact with the right Original source and drill-downs
- Hidden UTM and click ID fields hold the expected values
- New contacts from real campaigns stop appearing as Offline Sources
How to prevent it happening again
This usually breaks after a change: a new theme, a cookie banner update, a new redirect, a form rebuilt in another tool. Retest with a tagged URL after each of these.
- Retest with a UTM-tagged URL after any site, consent or form change
- Keep one documented set of UTM field names across forms
- Avoid redirects on ad landing pages, or make them pass the query string
- Review Offline Sources contacts from website forms weekly
How FunnelGuard handles this
FunnelGuard detects this issue today. A robot visitor opens your landing page with its marked test parameters (utm_source=funnelguard, fg_test=1), submits the lead form, then reads the resulting HubSpot contact. It checks the contact's fields such as utm_source and gclid, and the original source, to see whether the campaign data arrived.
If the data is missing, a failure is re-checked from a second region first, then one alert goes out by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a screenshot and a likely cause. It does not click real ads. You can try it on the Free plan (1 site, 2 journeys, daily checks) or start a 3-day trial of a paid plan.
Questions people ask
Why is my HubSpot contact showing Offline Sources?
Offline Sources means HubSpot could not link the contact to a tracked website visit. Typical causes are a missing tracking code, a declined or blocked cookie, a non-HubSpot form that did not send the hubspotutk value, or a contact added through import or API.
Why are UTM parameters not saved in HubSpot?
UTMs are only saved if the tracking code runs on the landing page and the cookie is set. They are also lost if a redirect strips the query string before the page loads, or if there are no hidden fields to store them.
How do I capture UTM parameters in HubSpot forms?
Create contact properties for UTM source, medium, campaign and click ID. Add them as hidden fields to the form, then fill them from the URL with a small script or your tag manager. The input names must match the property internal names.
Why does HubSpot show Direct traffic for paid ad leads?
HubSpot shows Direct traffic when it sees no referrer or UTM data for the visit. This often happens when a redirect removes UTMs, the visitor's session started on another domain, or the tracking cookie was not set.
Do HubSpot UTM fields work with non-HubSpot forms?
Yes, but you must do the work yourself. Send the hubspotutk cookie as hutk through the Forms API, and also pass UTM values as hidden field values. Without them HubSpot has nothing to link to the visit.
Can I fix the source on contacts that already exist?
Original source is set when the contact is created and is not meant to be edited by hand. Fix the cause for new leads, and for old ones store the real campaign in a custom property so reports can use it.
How can I test HubSpot attribution without waiting for real leads?
Open your landing page in a private window with UTM parameters added, submit the form with a new email, then check the contact's original source fields. A monitoring tool like FunnelGuard can run this kind of test on a schedule.
Related issues
- DLV-096gclid/fbclid not stored on the CRM record for offline conversionsFix guide
- DLV-078HubSpot form submission not attributed to the pageFix guide
- DLV-076Contact not created in the CRM after submitFix guide
- DLV-088Fields unmapped: phone lands in notes or nowhereFix guide
- DLV-097Consent/marketing opt-in field not passed to the CRMFix guide
- DLV-079Salesforce Web-to-Lead silently fails (wrong OID, daily limit 500)Fix guide