Measuring Campaigns• 7 min read

How to Get UTM Parameters into Your CRM (HubSpot, Salesforce, Freshsales, Keap)

UTM values only reach your CRM if a form carries them. How to capture them with hidden fields, keep them across pages, and map them in four common CRMs.

Part of our guide to tracking marketing campaigns.

UTMLOOP COMPREHENSIVE VIEW

The short answer

UTM values live in the landing page URL, so a CRM only stores them if the form a lead submits sends them along. Add a hidden field for each UTM parameter to your forms, fill those fields from the URL (and from storage, so the values survive page changes), and map each field to a matching property on the contact or lead.

Why UTMs go missing between click and CRM

The values are only in the URL of the first page a visitor lands on. If they click to a second page before filling in the form, the UTMs are gone unless something saved them. A small script that writes the values to a first-party cookie or localStorage on landing, and reads them back into the hidden fields on submit, fixes this.

Decide whether you want first touch (the campaign that brought the person first) or last touch (the one right before they converted), and store accordingly. Many teams keep both, in separate fields.

The universal setup: hidden fields

Create five properties in your CRM: utm_source, utm_medium, utm_campaign, utm_content and utm_term. Add five matching hidden fields to every form. Fill them from the URL or from storage on page load. Map each form field to its property. Test with a tagged URL and confirm the values appear on the new record.

HubSpot

HubSpot sets Original and Latest Traffic Source properties automatically from its tracking code, and for some sources the drill-down properties use the utm_campaign value. Those properties are system-controlled and do not store every raw UTM value. For the raw values, create custom contact properties and add them to your HubSpot forms as hidden fields.

Salesforce

Create custom fields on the Lead object for each parameter, add matching hidden inputs to your Web-to-Lead form or form tool, and map them. To report on campaigns, connect leads to Salesforce Campaigns using the utm_campaign value or a campaign ID.

Freshsales

Freshsales does not document a native way to store each lead's UTM values. Create custom contact fields, add hidden fields to your web form or form tool, and map them in the form-to-Freshsales integration.

Keap

Create custom contact fields named for each parameter and add them to your Keap web form as hidden fields with matching names. If the form sits on a page other than the landing page, fill the hidden fields from storage rather than the URL.

Keep the values clean before they arrive

A CRM report is only as clean as the links behind it. If one rep tags "LinkedIn" and another "linkedin", your CRM gets both. Enforce one convention where links are made, using the UTM validation rules and a shared naming convention.

Frequently Asked Questions

Do CRMs capture UTM parameters automatically?

Mostly not as raw values. HubSpot derives traffic source properties automatically, but storing each UTM value on a contact needs custom properties and hidden form fields in nearly every CRM.

Why are my CRM UTM fields empty?

Usually because the visitor moved to another page before submitting, and nothing saved the values from the landing URL. Store them in a cookie or localStorage on landing.

Should I store first-touch or last-touch UTMs?

Store both if you can, in separate fields. First touch shows what creates demand; last touch shows what closes it.

Sources

  1. HubSpot Knowledge Base: Understand traffic source properties
  2. Salesforce Ben: How to capture UTM parameters in Salesforce
  3. MeasureSchool: How to capture UTM parameters in hidden form fields

Join 14,000+ marketing growth leaders

Receive our bi-weekly breakdown of campaign analytics setups, attribution rules, naming tactics, and link-stitching blueprints. Direct to your inbox.

More on measuring campaigns

Back to the guide