Browse all guides
Your HeyLead dashboard already has every lead's source. Hidden fields are for the other place your form sends leads, such as HubSpot, Zoho, Salesforce, Pipedrive, a Google Sheet or your inbox, so each record there shows where the lead came from too.
No hidden fields needed if you connect your CRM with a webhook or Zapier. Those send the source for you. Use hidden fields when your form already posts straight into your CRM.
How it works
- 1You add hidden fields to your form, for example UTM Source, UTM Medium and Channel.
- 2You give each one a placeholder as its default value, like
[utm_source]. - 3When a visitor opens the page, HeyLead replaces each placeholder with the real value (for example
google). When they send the form, your CRM receives it with the rest of the answers.
Fields and placeholders
Copy the default values below. There are three ways to mark a field. Use whichever your form builder allows:
- Default value set to a placeholder, e.g.
[utm_source](works in most builders). - Field name set to a standard name with an empty value, e.g.
utm_sourceorlo_channel. It's filled automatically. - Developer attribute
data-lo="utm_source"on the input.
Fields to add
| Field label | Default value | Field name (optional) | Example result |
|---|---|---|---|
| UTM source | |||
| UTM medium | cpc | ||
| UTM campaign | spring-sale | ||
| UTM term (keyword) | emergency plumber | ||
| UTM content (ad) | ad-variant-b | ||
| Channel | Paid Search | ||
| First channel | Organic Search | ||
| First landing page | /emergency-plumbing |
Use either the placeholder as the default value, or the field name with an empty value. Both are filled automatically.
Your form builder
WordPress
- 1Open Forms → your form → Edit.
- 2Under Advanced Fields, drag a Hidden field into the form.
- 3Set Field Label to
UTM Source. - 4Open the field's Advanced tab and set Default Value to
[utm_source]. - 5Repeat for each field you want (see the list), then Save Form.
- 6Map the fields in your Gravity Forms feed (HubSpot, Zapier, Salesforce add-on…) to your CRM properties.
Test it: open your site with ?utm_source=test&utm_medium=test at the end of the address, send the form, and check the record in your CRM shows “test”.
UTM values come from the visit that converted. If someone first found you on Google and came back through an ad, [utm_source] is the ad's source and [first_channel] is Organic Search.
Plain HTML
<input type="hidden" name="utm_source" value="[utm_source]">
<input type="hidden" name="utm_medium" value="[utm_medium]">
<input type="hidden" name="utm_campaign" value="[utm_campaign]">
<input type="hidden" name="utm_term" value="[utm_term]">
<input type="hidden" name="utm_content" value="[utm_content]">
<input type="hidden" name="lo_channel" value="[channel]">
<input type="hidden" name="lo_first_channel" value="[first_channel]">
<input type="hidden" name="lo_landing_page" value="[landing_page]">Forms in an iframe
Typeform, Jotform, Tally, Fillout, Paperform, Cognito Forms and Calendly run on their own website inside a frame. HeyLead adds utm_source, utm_medium, utm_campaign, utm_term, utm_content and lo_channel to the frame's address automatically. Create hidden fields (Typeform) or URL parameters (Tally, Jotform) with exactly those names to store them. Calendly saves UTM values on each booking by itself.
Test it
- 1Open your form page with a test tag:
https://yoursite.com/contact?utm_source=test&utm_medium=test&utm_campaign=test. - 2Send the form with your own email.
- 3Open the new record in your CRM. UTM Source, Medium and Campaign should say test.
- 4In HeyLead, Sites → your site → Forms shows a CRM fields badge next to forms that have hidden fields.
Not filling in?
- Make sure the tracking script is on the same page as the form (check it).
- Type the placeholder exactly, including square brackets and no spaces:
[utm_source]. - Contact Form 7 uses square brackets itself, so use field names (
[hidden utm_source]) instead of placeholders. - If your form is in an iframe, see the iframe section above.
- Developers can check the values in the browser console with
HeyLead.fields().
Did this guide answer your question?
Still need help?
A real person replies within one business day. Include your website address and what you've tried.