On this page
What this issue is
A hidden field is a form field visitors cannot see. Marketers use them to store campaign data such as utm_source, utm_medium, utm_campaign, gclid or fbclid with each lead. The data should come from the page URL when the visitor arrives.
This issue happens when someone types a placeholder such as {utm_source}, {{utm_source}} or [utm_source] into the field's default value, and nothing replaces it. The form then submits the placeholder text as if it were real data. Your CRM fills up with leads whose source is literally {utm_source}.
It is different from hidden fields that arrive empty. Here the field is filled, but with the wrong text, so it looks like data and is easy to miss in reports.
Why it costs you leads or sales
You do not lose the lead itself. You lose the knowledge of where it came from. Reports group every affected lead under one meaningless source, so you cannot tell which ads, emails or partners produce customers.
That leads to bad budget decisions. Good campaigns look weak, workflows that route leads by source misfire, and offline conversion uploads that rely on gclid fail because the click ID is not real.
- Ad clickURL has utm_source=google
- Landing pageForm loads with default value {utm_source}
- Form submitPlaceholder is never replaced
- CRM contactSource = {utm_source}
- Source reportsCampaign cannot be identified
The visitor arrives with real UTMs, but the form submits the raw placeholder text.
Example: 100 leads in a month. Placeholder leads pile up under one useless source.
How to check if your site has it
Open your CRM contact list
Add your source, medium and campaign columns. Sort or filter for values containing { or [ or %7B.
Look at the form's hidden field settings
Open the form editor and check the default value of each hidden field. Text in braces or brackets is a warning sign.
Submit a test lead with UTMs
Visit your page with ?utm_source=test&utm_medium=check&utm_campaign=hidden-test added to the URL, submit the form, then open the new contact.
Inspect the field in the browser
Right-click the page, choose Inspect, and search for input type="hidden". If the value attribute still shows the placeholder after load, nothing is replacing it.
<input type="hidden" name="utm_source" value="{utm_source}">How to fix it
The fix is the same everywhere: stop relying on a typed placeholder and let something read the real value from the URL. Use your form tool's built-in option if it has one. If not, use a small script.
Use your form plugin's dynamic value
Gravity Forms: enable Allow field to be populated dynamically and set the parameter name to utm_source. Contact Form 7 and WPForms need a plugin or snippet; WPForms hidden fields accept smart tags, so check the smart tag list instead of typing braces.
Remove typed placeholders
Clear any default value like {utm_source} unless the plugin documents it as a real smart tag.
Create a URL variable
Add a URL variable of type Query with query key utm_source. Repeat for each parameter.
Fill the field with a Custom HTML tag
Fire a tag on DOM Ready that sets the hidden field value from the variable, using the script in the code section below.
Use a hidden field with a URL parameter
In the form builder add a Hidden Field and set its query key to the parameter name, for example utm_source. Do not type a placeholder as the value.
Test with a tagged URL
Open the form URL with UTMs and confirm the contact shows the real values.
Add hidden inputs with no default value
Add Embed or form inputs set as hidden, with a clear name such as utm_source.
Add the script
Paste the script below in Project Settings, Custom Code, Footer code.
Leave the value empty in HTML
Output the input with an empty value attribute.
Set it from the URL with JavaScript
Use the script below on every page that has the form.
(function () {
var keys = ['utm_source','utm_medium','utm_campaign','utm_term','utm_content','gclid','fbclid'];
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) {} }
});
function fill() {
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;
});
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', fill);
} else { fill(); }
})();Before
- Default value typed as {utm_source}
- CRM source shows {utm_source}
- Campaign reports are unusable
After
- Value filled from the URL or saved session
- CRM source shows google, facebook, newsletter
- Reports match real campaigns
Placeholder typed
Leads or data lost
The form submits the text {utm_source} and the CRM stores it as the lead source.
Toggle to see how the hidden field value changes what reaches your CRM.
How to confirm it's fixed
- Open the page with ?utm_source=test&utm_medium=check&utm_campaign=fix-verify
- Inspect the hidden inputs and confirm the values show test, check and fix-verify
- Submit the form with a test email
- Open the new CRM contact and confirm source, medium and campaign match
- Repeat on mobile and on a second page that has the form
- Search the CRM for any new values containing { or [
How to prevent it happening again
- Never type placeholders into default values unless the tool documents them as real merge tags
- Keep one documented list of hidden field names and how each is filled
- Test with a tagged URL after every form, theme or tag change
- Add a CRM view that flags source values containing { or [
- Re-test when you swap form tools or embed a new form version
How FunnelGuard handles this
FunnelGuard detects this issue only partly. It runs your real form journey on a schedule and a payload rule can catch a literal placeholder in the data the form sends. That check applies to the form submission the robot makes, so it can flag a value like {utm_source} when it appears in that payload.
What it does not do: it does not audit every hidden field on every form, and it does not scan your CRM for old leads that already hold placeholder text. It also cannot judge whether a correct-looking value is the right campaign for a real visitor.
To cover the rest by hand, filter your CRM source, medium and campaign fields for values containing {, [ or %7B, and run the tagged-URL test above after each change. FunnelGuard test visits use utm_source=funnelguard and fg_test=1, so filter those test leads out of your reports.
Questions people ask
Why does my CRM show {utm_source} instead of the real source?
The form's hidden field has {utm_source} typed as its default value and nothing replaces it with the URL value. The form submits that text as it is. Use a dynamic parameter option or a script to fill the field from the URL.
How do I populate hidden fields with UTM parameters?
Read the parameters from the page URL with JavaScript (URLSearchParams) and set each hidden input's value before the form is submitted. Many form tools also offer a built-in option that maps a URL parameter name to a hidden field. Match the field name to the parameter name.
Is {utm_source} a real merge tag?
Not by default. Curly braces only work as merge tags when your specific tool documents them, and each tool uses its own syntax. In ad platforms they are URL templates filled in by the ad network, not by your form.
What is the difference between empty hidden fields and placeholder hidden fields?
Empty fields submit nothing, so the CRM source is blank. Placeholder fields submit the raw text, so the CRM looks filled but holds a meaningless value. Placeholders are harder to spot because they appear as data.
Can I fix leads that already have {utm_source} saved?
The original source usually cannot be recovered from the form data. You can bulk-edit those contacts to an unknown or legacy value so they stay out of campaign reports. If you have ad platform click exports, you may match some leads by time and email.
Can FunnelGuard detect placeholder text in hidden fields?
Partly. A payload rule can catch a literal placeholder in the data its test form submission sends. It does not scan every field on every form or the leads already in your CRM, so you should also check the CRM by hand.
Why do UTM values disappear on the second page before the form?
The parameters are only in the URL of the landing page. If the visitor clicks to another page, the URL no longer holds them. Save them in sessionStorage or a cookie on the first page, as the script above does, and fill the form from there.
Related issues
- TRK-278Hidden UTM fields present but emptyFix guide
- TRK-270UTMs not written to CRM contact fieldsFix guide
- TRK-271gclid/fbclid not written to CRMFix guide
- TRK-277Lead source field overwritten on later visitsFix guide
- TRK-280First-touch vs last-touch UTM fields swappedFix guide
- TRK-272GoHighLevel attribution source missing on contactFix guide