On this page
What this issue is
UTMs are tags such as utm_source, utm_medium and utm_campaign added to a link so you know where a visitor came from. A CRM is the system where your leads and customers are stored. This issue means a lead arrives in the CRM, but the contact fields for source, medium or campaign are empty or hold the wrong values.
Why it costs you leads or sales
The leads still come in, so nothing looks broken. But you cannot connect a closed deal to the ad or email that started it. Reports show "direct" or "unknown", so budget decisions are made on bad data. You may cut a campaign that works and keep one that does not.
- Ad clickURL has utm_source and utm_campaign
- Landing pageUTMs visible in the URL
- Next page / formUTMs not stored, hidden fields stay empty
- CRM contactSource and campaign fields blank
- Revenue reportDeal shows as direct or unknown
The visit is tracked and the lead is captured, but the campaign data drops out between the page and the CRM.
Example: share of CRM leads that carry a utm_campaign value before and after fixing persistence. Numbers are illustrative.
How to check if your site has it
Open a tagged URL
Visit your landing page with
?utm_source=test&utm_medium=manual&utm_campaign=utm-checkin a private window.Browse to the form
Click through to a second page, then open the form. Do not use the back button.
Inspect the hidden fields
Right-click the form, choose Inspect, and search for
utm_source. The field value should betest.Submit and look up the contact
Submit with a test email, then open that contact in your CRM and read the source, medium and campaign properties.
Compare
If the values are blank, find which step lost them: storage, hidden field or CRM mapping.
| What you see | Likely cause |
|---|---|
| Hidden field empty in the page | UTMs not captured or stored, or the field name does not match |
| Hidden field filled, CRM blank | Form field not mapped to a CRM property |
| CRM shows the right value on the first visit only | Values overwritten on later visits |
| Only works on the landing page | No persistence across pages |
How to fix it
The fix has three parts: store the UTMs when the visitor arrives, copy them into hidden form fields, and map those fields to CRM properties. The code below handles the first two for any form.
(function () {
var keys = ['utm_source','utm_medium','utm_campaign','utm_term','utm_content'];
var params = new URLSearchParams(window.location.search);
keys.forEach(function (k) {
var v = params.get(k);
if (v) { try { sessionStorage.setItem(k, v); } catch (e) {} }
});
document.addEventListener('DOMContentLoaded', function () {
keys.forEach(function (k) {
var v = null;
try { v = sessionStorage.getItem(k); } catch (e) {}
if (!v) return;
document.querySelectorAll('input[name="' + k + '"]').forEach(function (el) {
el.value = v;
});
});
});
})();Add hidden fields
In your form plugin (for example Gravity Forms, WPForms or Contact Form 7), add hidden fields named exactly
utm_source,utm_medium,utm_campaign,utm_termandutm_content. Exact options vary by plugin.Add the script
Place the snippet in your theme footer or a header and footer plugin so it loads on every page.
Map to the CRM
In the CRM integration settings of the form, map each hidden field to its CRM property.
Create a Custom HTML tag
Paste the snippet into a Custom HTML tag.
Trigger on all pages
Use the All Pages trigger so UTMs are stored on whichever page the visitor lands on.
Preview
Use Preview mode with a tagged URL and confirm the hidden fields fill. Forms loaded late may need a DOM Ready or Window Loaded trigger.
Add hidden inputs
Webflow has no built-in hidden field element, so add an Embed element inside the form with
<input type="hidden" name="utm_source">and one for each other UTM.Add the script
Put the snippet in Project Settings, Custom Code, Footer code.
Connect the form
Send submissions to your CRM through your form integration and map the fields.
Add hidden fields to the form
In the form builder, add Hidden fields and set their query key names to the UTM names. Menu labels can differ by version.
Map to contact fields
Link each hidden field to a custom contact field so the value is saved on the contact.
Pass UTMs across pages
If the form is on another page from the landing page, add the snippet in the site's custom code.
Add inputs
Add
<input type="hidden" name="utm_source">and similar for each UTM to your form.Include the script
Load the snippet on every page.
Save on the server
Make sure your backend or CRM API call includes these fields and writes them to the matching contact properties.
How to confirm it's fixed
- Hidden fields hold the right values after you click through two pages.
- A test lead appears in the CRM with source, medium and campaign filled.
- The values match the URL you used, not a placeholder.
- A second tagged visit does not wipe the original values if you want first-touch.
- Test contacts are deleted or tagged so they do not pollute reports.
How to prevent it happening again
This breaks quietly when a form is rebuilt, a theme changes, a plugin updates or a field is renamed. Keep a list of the hidden field names and CRM properties, and retest after any change to forms, redirects or tag setups. Test with a tagged URL, not by looking at the form alone.
The tags are present on arrival but missing when the lead is saved.
How FunnelGuard handles this
FunnelGuard detects this issue. A robot visitor opens your site with marked test traffic, follows the journey to your lead form, and submits a test lead. Its utm_persistence check looks at whether the UTM values survive to the submission, and a CRM lookup checks whether they were written to the contact. If they are missing, the failure is re-checked from a second region, then one alert goes out with a screenshot and a likely cause.
Plans start with a Free tier (1 site, 2 journeys, daily checks, no card). Paid plans have a 3-day free trial.
Questions people ask
Why are my UTMs not showing in my CRM?
Usually the UTMs are in the first page URL but are not stored, so the form has nothing to send. Other causes are missing hidden fields, mismatched field names, or form fields not mapped to CRM properties. Test with a tagged URL to see which step loses them.
How do I pass UTM parameters to a CRM form?
Add hidden fields named after each UTM, fill them from the URL or from stored values with a small script, and map them to CRM contact properties in the form or integration settings. Then submit a test lead and check the contact.
Why are my hidden UTM fields empty?
The script may not run on that page, the field names may not match, or the form may load after the script has finished. Visitors who arrive on one page and fill a form on another also lose the tags unless you store them.
Do UTMs persist across pages automatically?
No. UTMs live in the URL and disappear when the visitor goes to a link without them. You need to store them in sessionStorage, localStorage or a cookie on arrival, subject to your consent rules.
Should I use sessionStorage or a cookie for UTMs?
sessionStorage lasts for the tab session and is simple. A cookie or localStorage can keep values for returning visitors, but check your privacy and consent obligations first.
Why does my CRM show the wrong source after a second visit?
A later visit can overwrite the first values if the form always writes to the same property. Use separate first-touch and last-touch properties, or set the field to write only when empty.
How can I test that UTMs reach my CRM?
Open your landing page with test UTMs in a private window, click through to the form, submit a test email, then open the contact and read the UTM properties. FunnelGuard can run this check on a schedule.
Can FunnelGuard tell me when UTMs stop reaching the CRM?
Yes. It submits a marked test lead, checks UTM persistence and looks up the contact in the CRM. If values are missing, it sends one alert with a screenshot and a likely cause.
Related issues
- TRK-278Hidden UTM fields present but emptyFix guide
- TRK-279Hidden fields populated with literal placeholders ({utm_source})Fix guide
- TRK-280First-touch vs last-touch UTM fields swappedFix guide
- TRK-277Lead source field overwritten on later visitsFix guide
- TRK-271gclid/fbclid not written to CRMFix guide
- TRK-268HubSpot form submissions not linked to tracked visitor (hutk missing)Fix guide