On this page
What this issue is
UTM parameters are tags such as utm_source and utm_campaign added to the end of a URL so analytics knows which campaign sent the visitor. Click IDs such as gclid (Google Ads) and fbclid (Meta) work the same way.
This issue happens when a visitor arrives on a landing page with those parameters, then clicks to a different page that holds the form, and the parameters are not passed along. The link goes to /contact instead of /contact?utm_source=google&utm_campaign=spring. The first page recorded the campaign, but the form page and the form submission have no trace of it.
Why it costs you leads or sales
The lead still arrives, so nothing looks broken. But the source is blank, or shows as direct, so your CRM cannot tell which ad produced it. You then judge campaigns on partial data and may cut the ones that actually work.
Ad platforms are affected too. If a Google Ads click ID never reaches the form page, offline conversion imports cannot match the lead back to the click, and bidding learns from fewer signals.
- Ad clickURL has utm_source and gclid
- Landing pageAnalytics records the campaign
- Button to form pageLink points to /contact with no query string
- Form pageNo UTMs in the URL or hidden fields
- Lead in CRMSource blank or direct
The ad click carries UTMs, but the button to the form page drops them.
Example: share of leads with a campaign source in the CRM, before and after carrying UTMs to the form page.
How to check if your site has it
Open the landing page with test UTMs
Visit your landing page URL with
?utm_source=test&utm_medium=cpc&utm_campaign=utmcheck&gclid=abc123added to the end.Click through to the form page
Use the same button or link a real visitor would use. Do not edit the URL yourself.
Read the address bar
If the
utm_parameters are gone and nothing else restores them, the link drops them.Check the hidden fields
Right-click the form, choose Inspect, and look for hidden inputs named like utm_source. Empty values mean they are not being filled.
Submit a test lead
Check the entry in your CRM or form tool for the source fields.
How to fix it
There are two reliable approaches. You can append the current query string to internal links, or you can store the parameters on the first page and read them back on the form page. Storing them is more robust because visitors often browse several pages before the form.
(function () {
var keys = ['utm_source','utm_medium','utm_campaign','utm_term','utm_content','gclid','fbclid'];
var params = new URLSearchParams(window.location.search);
var found = false;
keys.forEach(function (k) {
var v = params.get(k);
if (v) { sessionStorage.setItem(k, v); found = true; }
});
})();document.addEventListener('DOMContentLoaded', function () {
var keys = ['utm_source','utm_medium','utm_campaign','utm_term','utm_content','gclid','fbclid'];
keys.forEach(function (k) {
var v = sessionStorage.getItem(k);
if (!v) return;
document.querySelectorAll('input[name="' + k + '"]').forEach(function (el) {
el.value = v;
});
});
});Add hidden fields to the form
In your form plugin (for example Gravity Forms, WPForms or Contact Form 7 with an add-on), add hidden fields named utm_source, utm_medium, utm_campaign and so on. Some plugins can fill them from the URL automatically; check the field's dynamic population option.
Add the scripts
Add the two snippets with a header and footer scripts plugin or your child theme so they load on every page.
Create a Custom HTML tag
Paste the storage snippet into a Custom HTML tag and fire it on All Pages.
Fill the form fields
Add a second Custom HTML tag with the fill snippet, fired on the form page. If the form loads late, fire it on Window Loaded or re-run after the form renders.
Add hidden inputs
In the form, add a Custom Embed with hidden inputs named utm_source and the others, or use a hidden field element if your plan offers it.
Add the scripts
Paste both snippets in Project Settings, Custom Code, Footer Code.
Add hidden fields
In the form or survey builder, add hidden fields for the UTM values and map them to contact fields.
Check how the page is linked
If the landing page and form are separate funnel steps, make sure the button URL keeps the query string, or add the snippets in the funnel's custom code area.
Add the code with Custom Code
In Settings, Custom Code, add the storage snippet to all pages. Wix forms may need Velo to set hidden field values; platform support varies, so test it.
Inject the scripts
Use Settings, Advanced, Code Injection, Footer for both snippets. Add hidden fields in the form block where available, or use a form tool that supports them.
Keep the query string on internal links
Where you control the markup, build the link with the current
window.location.searchso the button to the form page keeps its parameters.Save to the lead record
Make sure your backend stores the hidden field values with the lead, not just the visible fields.
document.querySelectorAll('a[href^="/"]').forEach(function (a) {
var q = window.location.search;
if (q && a.href.indexOf('?') === -1) { a.href = a.href + q; }
});How to confirm it's fixed
- Open the landing page with test UTMs and click the real button to the form page.
- Hidden inputs on the form page contain the test values.
- A test submission shows utm_source=test in your CRM or form entry.
- The GA4 session keeps the original campaign and is not shown as direct.
- Repeat in a private window and on mobile.
How to prevent it happening again
This usually breaks when someone edits a button link, swaps a form plugin or rebuilds the page. Add a UTM pass-through test to your launch checklist for every new landing page, and re-run it after any theme, form or consent tool change.
Day 1
A designer rebuilds the landing page and the button links to a clean /contact URL.
Week 1
Leads keep arriving, so nobody notices. Sources in the CRM show blank or direct.
Week 4
Campaign reports look weak and budget is moved away from ads that were working.
After fix
Parameters are stored and hidden fields are filled; sources appear again.
How FunnelGuard handles this
FunnelGuard detects this issue today. A robot visitor opens your landing page with marked test parameters, follows the real journey to the form page and checks whether the parameters survive each step. Test traffic is marked with utm_source=funnelguard and fg_test=1, and it never clicks real ads.
If the campaign values go missing, a failure is re-checked from a second region before one alert goes out by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a screenshot and a likely cause. You can try it on the Free plan (1 site, 2 journeys, daily checks, no card), and paid plans include a 3-day free trial.
The campaign tags are present on arrival and gone by the form page.
Questions people ask
Why are my UTM parameters disappearing on the next page?
Usually the link to the next page points to a clean URL without the query string, so the browser does not carry the UTMs across. A redirect or a form tool that rebuilds the URL can also drop them. Store the values on arrival or add them to internal links.
How do I pass UTM parameters to a form page?
Save the UTMs in sessionStorage or a first-party cookie on the landing page, then copy them into hidden form fields on the form page. Make sure your form tool saves those hidden fields with the lead. Test with a real submission.
Why does my CRM show lead source as blank or direct?
The campaign values never reached the form submission. If the landing page and form page are separate and the link drops the UTMs, the lead arrives without a source. Hidden fields filled from stored values fix this.
Will GA4 still credit the campaign if UTMs are lost on the second page?
Often GA4 keeps the original session source, since the landing page hit recorded it. The problem is your form and CRM data, which depend on the values being passed along. A new session started by a redirect can also reset attribution.
Do I need hidden fields for UTMs in every form?
Yes, if you want the source stored with each lead. Add hidden fields for utm_source, utm_medium, utm_campaign, utm_term, utm_content and click IDs such as gclid. Names must match what your script fills.
Is storing gclid and UTMs allowed under consent rules?
It depends on your region and setup. Many sites treat storing click IDs as needing consent, so run the storage script after consent is granted. Check with your privacy adviser.
How can I tell automatically if UTMs are lost between pages?
FunnelGuard runs the journey with marked test parameters on a schedule and checks whether they survive to the form page. It alerts you with a screenshot and a likely cause if they do not.
Related issues
- TRK-311UTMs lost on redirect (http->https, www, trailing slash)Fix guide
- TRK-334Server redirects drop query string (301 to /)Fix guide
- TRK-332Iframe forms lose parent page UTMsFix guide
- TRK-317UTMs overwritten by internal links with utm tagsFix guide
- TRK-313UTMs lost crossing to checkout / booking domainFix guide
- TRK-335Language/geo redirect drops click IDsFix guide