How to pass UTM parameters into a HubSpot form

HubSpot makes it relatively easy to pass UTM parameters from a URL into hidden fields in a HubSpot form. In this blog post, we will outline step-by-step how to do so.

Step #1: Create HubSpot properties for UTM parameters

We will want to create HubSpot properties for the 5 standard UTM parameters:

  • utm_campaign
  • utm_source
  • utm_medium
  • utm_term
  • utm_content

To do so, in HubSpot click on Settings -> Properties -> Create a property under Contact Properties.

I also like to create a Property group called “UTM Parameters”. It should look like this when you’re done.

UTM parameters

Note that the “Internal Name” of the HubSpot property should be all lowercase to match the URL parameter name in the URL.

Step #2: Insert UTM parameter properties as hidden form fields in your HubSpot forms

Go to Marketing -> Lead Capture -> Forms and select a form you want to update.

Add your newly created UTM parameter properties as hidden form fields to your form.

Save your form!

Step #3: Test your HubSpot form

Append URL parameters to a landing page with your HubSpot form. Here is a string of URL parameters you can use for testing:

?utm_campaign=lead-to-account matching&utm_medium=ppc&utm_source=google adwords&utm_content=ad1&utm_term=lead-to-account matching salesforce

Now submit your form and go view the contact in HubSpot. It should look like this:

If you see the above, everything is working and you’re all set – congratulations!