Skip to content
All articles

Analytics

UTM in a form: preserving a submission’s source

Store campaign context with a submission without saving the full page address.

When a contact arrives after a campaign, it helps to know how the visitor reached your site. A form action URL does not carry UTM parameters from the browser address bar into a submission on its own. To store them, the form must submit the relevant hidden fields or use the generated integration script.

Which data reaches a submission

ZoraForms supports utm_source, utm_medium, utm_campaign, utm_term, utm_content, and utm_id. When supplied, they appear in a dedicated area in submission details, and CSV and JSON exports contain the same values. That lets you compare campaigns with sales conversations without copying source data by hand.

The UTM integration does not store the complete URL, cookies, or browser-storage data. Each parameter has a length limit, so keep campaign labels short and descriptive. Do not put email addresses, names, phone numbers, or other personal data in them. UTM describes a campaign, not the person completing the form.

Hidden fields or generated code

For a fixed value, such as a newsletter source, you can add a hidden field yourself. That field submits the same value with every submission. It does not read parameters from the current page address, so it is not a replacement for a script across multiple campaigns.

If you want to read UTM from a link leading to the page, enable Include UTM parameters from the page address in the Integration tab and paste the updated HTML or fetch version. The generated code reads allowed parameters from the current address, adds hidden fields before submission, and needs JavaScript. A regular action form can still send a contact, but it will not automatically populate UTM.

Fixed source for a newsletter form
<input type="hidden" name="utm_source" value="newsletter" />

Verify attribution before a campaign starts

Open the page with a test address, for example https://example.com/contact?utm_source=test&utm_medium=email&utm_campaign=autumn. Submit the form and inspect the new submission’s details. If its UTM area is empty, the usual causes are an older snippet, unavailable JavaScript, or a parameter name that is not supported.

UTM cannot be reliably added automatically to submissions already sent without those fields. Update the code before publishing campaign links and keep one test submission as an implementation check. When you change the form or its protection, download the current code from the dashboard again.

Clear campaign names make reports more useful: use one spelling for channels and separate medium from campaign. For example, source can be newsletter, medium email, and campaign a product launch. ZoraForms stores the supplied values with the submission; assessing their effectiveness belongs to your analytics and sales process.

UTM in a form: preserving a submission’s source · ZoraForms Blog