How to keep UTM parameters with HubSpot contacts

Save UTM parameters on HubSpot contacts, check hidden-field and external-form routes, and connect recorded source journeys with sales outcomes.

Augustinas Grupas

Creator of TrackLeadSource

8 min read

Summarize with:

Share:

To keep UTM parameters with HubSpot contacts, store the values in contact properties and pass them through your form when someone submits an enquiry. HubSpot forms can populate hidden fields from matching URL parameters. For visitors who browse before submitting, you also need to retain the earlier source data. TrackLeadSource collects available source and journey context for this purpose, while HubSpot holds the contact and sales outcome you use to judge the campaign.

Check which form sends the contact to HubSpot

A HubSpot form embedded on your website and a WordPress form sending data to HubSpot can need different setups.

For a HubSpot form, use contact properties as hidden fields and populate them from the form page's URL. HubSpot documents this in its query-string guide.

For a form built elsewhere, check how its submissions reach HubSpot. HubSpot's non-HubSpot forms tool does not collect hidden-field values. Installing its tracking code and creating UTM properties won't make that route carry your hidden UTM fields. HubSpot's external-form documentation describes the limitation and points to form integrations or its form-submission API as alternatives.

If you already use an integration, inspect its field mapping. The source may be saved correctly in WordPress yet missing from the HubSpot contact because the connection doesn't send it. Our WPForms hidden-field guide covers checking the form side of that path.

Save UTM values through a HubSpot form

These steps use HubSpot's documented native form method. You'll need permission to create contact properties and edit forms, plus room within your account's custom-property allowance.

Create the contact properties

First, check for existing UTM properties so you can reuse a consistent set. In Settings > Properties, select Contact properties. For any missing values, create single-line text properties with these internal names:

LabelInternal nameExample value
UTM Sourceutm_sourcelinkedin
UTM Mediumutm_mediumpaid_social
UTM Campaignutm_campaignwarehouse_consultation

The labels help your team read the record. The internal names determine which URL parameters populate the fields. Confirm them before using the properties in your forms. See HubSpot's property setup guide.

Source and medium work together. linkedin / paid_social identifies your tagged paid-social traffic; linkedin / social could label an unpaid post. Keep those conventions consistent across campaign links. A referring website alone may not distinguish paid from unpaid traffic, and missing UTMs don't prove a visit was organic.

Add the properties as hidden fields

Open Marketing > Forms and edit your HubSpot form. Add the UTM contact properties, edit each field, and turn on Hidden field. A field marked Required cannot be hidden.

For campaign values that vary by visit, avoid setting a fixed default such as linkedin on a form used by several channels. Review the form's returning-visitor prefill setting too; HubSpot notes that it can affect hidden values. Save the changes using Review and update. These controls are described in its hidden-field documentation.

Use a tagged link to the page containing that form. This illustrative URL matches the internal names above:

https://example.com/request-consultation?utm_source=linkedin&utm_medium=paid_social&utm_campaign=warehouse_consultation

The native query-string method reads the values present on that page. Adding a contact property alone doesn't collect earlier visits or fill in missing campaign data.

Verify the contact after submission

Open your tagged form page and submit a test enquiry using an address you control. Then open the resulting contact under CRM > Contacts and inspect the UTM properties. For the example above, expect linkedin, paid_social and warehouse_consultation.

Check the contact record itself, even if the form submission already shows the right values. Those contact properties are what you'll use for filtering and later analysis.

Run the checks below before relying on the setup:

TestWhat to check
Open the tagged form page and submitThe contact properties match the URL values
Open a tagged service page, then browse to an untagged form pageWhether the earlier campaign survives that navigation
Submit again with a different campaignWhich values change and which remain protected
Send an external-form enquiry through your integrationThe saved form values reach the intended contact properties

The second test matters when prospects need more information before contacting you. A visitor may read a service page and a case study before requesting a consultation. If the form URL no longer contains the campaign tags, the native query-string fields have no earlier values to read.

Keeping those values requires a retention method as well as a form. Choose a tracking tool or custom implementation that supports your actual form, then verify the saved contact through that path.

TrackLeadSource

See the story behind each lead.

Keep source, campaign, and journey context together when a visitor becomes a lead.

Start free trial

14-day free trial. Cancel anytime

Keep the source journey with the enquiry

TrackLeadSource collects available source, medium and campaign information, along with the recorded source journey and visited pages. Its workflow passes that context through hidden fields with the enquiry. Your form connection then needs to carry the submitted values into the corresponding HubSpot properties.

For a HubSpot setup, confirm the supported form configuration and mapping before relying on it. The native example above uses HubSpot's own fields; it isn't a TrackLeadSource installation recipe.

Imagine a warehouse manager first arrives through a LinkedIn ad, later returns through a newsletter, and reads a case study before requesting a consultation. This is an illustrative record:

Information kept with the enquiryExample
First recorded arrivalLinkedIn ad for warehouse consulting
Later recorded arrivalNewsletter link
Pages visited before submissionConsulting services > Case study > Request consultation
Qualification recorded by salesSuitable project in the service area
Associated deal outcomeClosed won

The later newsletter visit and the earlier ad both help explain the enquiry. Keeping only one campaign value can hide that sequence. The page history gives the person replying useful context, although a page visit alone doesn't establish buying intent.

Your team records qualification and sales outcomes in HubSpot. When those outcomes stay connected to the captured source information, you can investigate which campaigns bring suitable projects and customers. That is the business reason to track lead source.

Use the available history with its limits. Blocked tracking, cleared browser data and visits from another device can leave gaps.

Connect the contact with the sales result

When the enquiry becomes a sales opportunity, associate the contact with its deal. In the contact record's right sidebar, use the Deals association card to add an existing deal or create one, subject to your permissions. HubSpot explains the process in its record-association guide.

Keep the deal stage, amount and outcome current. Then compare campaigns using suitable enquiries and closed sales, allowing enough time for the sales process to finish. A campaign bringing many requests outside your service area may need a targeting change. A smaller campaign bringing suitable projects deserves a closer look, including its costs and deal values.

Count each deal once. If several contacts are associated with the same sale, adding its amount once per contact would inflate revenue. For a deeper comparison, see how to measure lead quality by source.

An authorised AI connection can help examine the records after the data is saved. HubSpot documents a connector that can access permitted contacts, deals and associations. Check that your connection can retrieve the source properties and outcomes required for your question. An export containing those columns can also support the analysis.

For example, ask it to compare enquiries created last quarter by recorded campaign, show the qualified enquiries and associated closed-won deals, count each deal once, and report missing source values separately. Check the totals against HubSpot before changing a campaign's budget.

Common questions

HubSpot's Original and Latest Traffic Source properties describe the first and most recent known web sources. Their drill-down fields can already include campaign details. Custom UTM properties give you fields for the raw values passed through your chosen capture route. Inspect what you already have before adding more fields. HubSpot's traffic-source guide explains its native properties.

Define separate first-captured and latest-captured values, then configure your integration or automation to write the first set only when empty. The field name alone won't protect a value. Test a repeat submission and inspect both sets. The first campaign captured by a form may also differ from the visitor's first recorded website interaction.

You can construct the tagged URL yourself. HubSpot's builder helps create links for reporting and has its own subscription requirements; it doesn't replace the contact properties, form fields or retention method. See the current Tracking URL Builder documentation if you plan to use it.

Augustinas Grupas

Augustinas Grupas

Creator of TrackLeadSource

Helping marketers connect website form submissions to their source, campaign, and customer journey.

Keep reading

Know the story behind your next enquiry