GTM Engineering term, automation and APIs

Hidden Fields

Hidden fields are form inputs that visitors never see, filled automatically with data like UTM parameters, ad click IDs and landing page URL, then saved with the form submission.

Also called: hidden fields, hidden form fields, hidden field, hidden inputs, hidden form inputs

Hidden Fields sits under every stage: it's part of the data and systems the whole funnel runs on, near related terms like UTM parameters, GCLID (Google Click ID) and Lead source (the blue squares).

Hidden fields are form inputs that visitors never see. They fill automatically with context the visitor did not type: UTM parameters, ad click IDs, the landing page, the referring site. That data saves with the submission and lands on the CRM record. Without hidden fields, you know who filled out a form. With them, you also know which campaign brought them.

How it works

A hidden field is a normal form field set not to display. Setting it up takes four steps:

  1. Create the fields on the form: utm_source, utm_medium, utm_campaign, utm_term, utm_content, a click ID such as GCLID, landing page and referrer.
  2. Capture the values with a script when the visitor first lands. It reads the page address and stores the values in a first-party cookie or browser storage. This step is what keeps data alive across a multi-page visit.
  3. Fill the fields when the form loads, from the stored values.
  4. Map to CRM properties so each hidden field writes to a matching property on the contact or lead.

Most teams keep two sets. First-touch fields are written once and never overwritten. Latest-touch fields update on every conversion. First touch feeds original source reporting. Latest touch shows what brought someone back.

Hidden fields can also carry internal context: the page or product the form sits on, a content offer ID, an A/B test variant or a partner code. Pair them with a visible "How did you hear about us?" question for self-reported attribution, and you get both the tracked and the remembered story.

Example

A company runs paid search, LinkedIn ads and a newsletter sponsorship, all driving to a demo form (all numbers hypothetical).

Month Demo requests With campaign data Without
Before hidden fields 220 0 220
After, script only on landing pages 240 132 (55%) 108
After, script sitewide with storage 235 207 (88%) 28

The middle row shows the classic gap. Visitors landed on an ad page, read two blog posts, then converted on the pricing page. The UTMs were gone by then. Storing them sitewide fixed most of it. The remaining 12% were mostly direct visitors and people who blocked cookies. With campaign data on 88% of demos, the team saw that one LinkedIn campaign drove 40% of qualified demos at half the cost of paid search.

By company size

Small business: A contact or booking form with hidden UTM fields shows which flyers, social posts or Google ads drive real inquiries. Many form and scheduling tools support hidden fields with no code. Use tagged links everywhere you promote.

Mid-market: RevOps standardizes hidden fields across every form, maps them to CRM properties and builds reports on them. The ongoing job is QA: new forms, new landing page tools and consent changes break capture quietly.

Enterprise: Hidden fields feed attribution models, offline conversion tracking and partner reporting. Consent management decides what can be stored, regionally. Governance covers naming, field ownership and which values are allowed.

Hidden fields vs form enrichment

Hidden fields capture where the visitor came from and what they did. Form enrichment looks up who they are, like company size and industry, from their email or domain. Both reduce what you ask the visitor to type. Most good forms use both.

Why it matters for GTM teams

Every budget debate depends on knowing which channels create pipeline. Hidden fields are the cheapest, most reliable piece of that evidence, and they are often half broken. We'd standardize one set of hidden fields on every form, store first-touch values sitewide, map them to CRM properties, and test with a tagged link every time a form or page builder changes. Then we'd pair tracked data with self-reported answers.

Common mistakes

  • Capturing UTMs only on the landing page, so multi-page visits lose them.
  • Overwriting first-touch values on every new conversion.
  • Inconsistent UTM naming that splits one campaign into five.
  • Hidden fields that exist on the form but are not mapped to CRM properties.
  • Never testing after a site redesign or form tool switch.
  • Storing values without checking your consent setup covers them.

FAQ

How do hidden fields capture UTM parameters?

A small script reads the UTM values from the page address when the visitor lands, stores them in a cookie or browser storage, and writes them into the hidden fields when the form loads. Storing them matters, because visitors often browse several pages before converting and the UTMs disappear from the address after the first click.

Are hidden fields allowed under privacy rules?

Hidden fields themselves are just a way to pass data. What matters is what you collect, whether your consent setup covers it and whether your privacy policy discloses it. Campaign parameters and page URLs are routine, but check with your privacy counsel. This is a plain-language summary, not legal advice.

Why are my hidden fields arriving empty?

Common causes include the script loading after the form, consent banners blocking storage, redirects that strip UTMs, forms embedded in an iframe that cannot read the parent page, and CRM properties not mapped to the form fields. Test each form with a tagged link and check the record that lands in the CRM.

See all automation and APIs terms ↳

Used in these articles