Guide · 5 min read
Hidden fields and UTM tracking in forms
Updated 2026-09-17
TL;DR
A hidden field carries a value the respondent never sees or types, prefilled from the URL that opened the form, most often used to capture UTM parameters or a referring campaign for attribution.
Not every piece of data a form collects needs to come from a question. A hidden field carries a value along with the submission without ever showing it to the respondent, prefilled from the link that brought them there. The most common use is attribution: knowing which campaign, email, or ad actually drove a submission, without turning that into a question you'd have to ask everyone by hand.
What a hidden field is
A hidden field is a normal field on the form's schema that never renders visibly to the respondent. Its value comes from somewhere other than typing — almost always the URL that opened the form — and it's submitted along with every other answer.
Because it's invisible, a hidden field only works when something upstream reliably sets its value. If a link is missing the expected parameter, the field is simply empty on submission rather than causing an error.
Prefilling from the URL
The general pattern is a query parameter on the form's link that matches a field's ID: appending that parameter with a value prefills the corresponding field when the form loads. This works for hidden fields and for visible ones you want pre-answered, like a plan name from a pricing page or a referral code from an email.
This turns any link into a small piece of context the form already knows, without asking the respondent to type or select it themselves.
Capturing UTM parameters for attribution
UTM parameters (utm_source, utm_medium, utm_campaign, and related tags) are the standard way marketing links carry campaign context. Mapping each one to a hidden field on the form captures exactly which campaign, channel, or email drove a given submission, right alongside the response itself.
This beats trying to reconstruct attribution after the fact from referrer headers or analytics alone — the UTM values are locked into the response record at submission time, tied to that specific respondent's answers.
Other uses beyond marketing attribution
Hidden fields aren't only for UTM tags. A support form embedded on a per-customer dashboard page can prefill a hidden customer ID; a form linked from different partner pages can prefill which partner referred the visitor; an A/B test can prefill which variant someone saw.
The common thread is context the system already has that would be redundant or awkward to ask the respondent directly.
How YeetForm handles it
In YeetForm, hidden fields are one of the field types, and any field (hidden or visible) can be prefilled from the URL using `?fieldId=value` query parameters. This is the mechanism used for both UTM capture and other attribution or context data, with no separate tracking script required.