How Do You Pass UTM Parameters Into a HubSpot Form?
To pass UTM parameters into a HubSpot form, create a custom contact property for each parameter, add each one to the form as a hidden field, and set it to prefill from the matching query parameter. Then test a tagged link and check the contact record. Tools like Trakt record each submission's source but don't sync to HubSpot.
- Create custom contact properties for
utm_source,utm_medium,utm_campaign,utm_content, andutm_term. - Add hidden fields to each form, mapped to those properties and prefilled from the query parameter of the same name.
- Test with a UTM-tagged URL and check that all five properties are populated on the new contact.
The HubSpot UTM chain, in four steps
The UTM in the URL prefills a hidden form field, which saves to a custom HubSpot contact property that is copied onto the deal.
Every section below covers one link in that chain, so if a value is blank in HubSpot, find the link that is broken instead of rebuilding the form.
What Your HubSpot Contact Record Will Show
Once this is set up, every contact created through your HubSpot forms has custom properties populated with the UTM data from the URL they arrived on. A lead from a LinkedIn Sponsored Content campaign, for example, shows:
utm_source: linkedinutm_medium: paid-socialutm_campaign: q2-enterprise-retargetutm_content: cta-variant-b
That data flows into your deals, reports, and CRM views, so you can filter by campaign, build attribution reports, and answer "which campaign drove this deal."
How to Capture UTMs in HubSpot, Step by Step
Step 1: Create custom contact properties in HubSpot
You need a custom property for each UTM parameter you want to capture. HubSpot's native properties won't receive hidden field data, so you have to create these yourself.
Go to Settings → Properties → Contact properties → Create property, and create one property for each of the following:
| Property label | Internal name | Field type |
|---|---|---|
| UTM Source | utm_source | Single-line text |
| UTM Medium | utm_medium | Single-line text |
| UTM Campaign | utm_campaign | Single-line text |
| UTM Content | utm_content | Single-line text |
| UTM Term | utm_term | Single-line text |
Use single-line text for all of them, not dropdowns and not multi-select. UTM values are free-form strings, and a dropdown field won't accept values it doesn't already know.
Step 2: Add hidden fields to your HubSpot forms
For each form you want to track, add hidden fields that map to the custom properties you just created. In HubSpot's form editor:
- Click "Add field" and choose the custom property you created (for example, "UTM Source").
- Once it's added to the form, click the field to open its settings.
- Check "Make this field hidden."
- Under "Set a default value," select "Prefill from query parameter."
- Enter the query parameter name:
utm_source.
Repeat for utm_medium, utm_campaign, utm_content, and utm_term.
When a visitor arrives at your page with ?utm_source=linkedin in the URL, HubSpot reads that parameter and pre-fills the hidden field before the form is submitted. The contact is created with the UTM value in the custom property.
Step 3: Test it
Before you trust this setup with real leads, verify it works. Build a test URL with all five parameters using the Trakt UTM Builder:
https://yoursite.com/demo?utm_source=linkedin&utm_medium=paid-social&utm_campaign=test&utm_content=test-cta&utm_term=test
Open that URL, fill out the form with your own email, then find the contact in HubSpot. Check the custom properties: all five should be populated.
If they're blank, double-check that each hidden field is mapped to the correct property and that "Prefill from query parameter" is enabled with the exact parameter name. It is case-sensitive: utm_source, not UTM_Source.
If you want each submission's source recorded alongside HubSpot, pre-register for Trakt.
HubSpot's Original Source vs. Custom UTM Properties
HubSpot's native source tracking has one thing going for it: it's always on and doesn't require form configuration. It captures the referring domain, session type, and approximate channel even without UTMs. The problem is granularity. "Paid Search" tells you the channel, while utm_campaign=q2-enterprise-retarget-linkedin tells you the specific campaign.
| Original Source (native) | Custom UTM properties | |
|---|---|---|
| Setup | Always on, no form configuration | Properties and hidden fields on every form |
| Based on | Referrer data and page metadata | The UTM parameters in the URL |
| Level of detail | Channel, such as "Paid Search" | Specific campaign, ad set, or creative |
| Best used for | Broad channel reporting | Campaign-level attribution and deal reporting |
Keep both. Use HubSpot's native source for broad channel reporting, and your custom UTM properties for campaign-level attribution and deal reporting.
How to Get UTMs Onto HubSpot Deals
UTM properties on a contact are useful, but UTM properties visible on a deal are what you need to prove ROI. HubSpot deals don't automatically inherit contact properties, so you have two options:
- Report at the contact level. Build a custom contact report filtered by your UTM properties. This works for pipeline attribution even without moving data to the deal.
- Create mirrored deal properties. Create the same five UTM properties on deals (UTM Source, UTM Medium, and so on) and use a workflow to copy the contact's UTM properties to the associated deal when the deal is created.
To build the workflow: Workflows → Create workflow → Contact-based → Trigger: Deal is associated with contact → Action: Copy contact property value to deal property (for each UTM field).
What About Forms Built Outside HubSpot?
If you use third-party forms (Contact Form 7, Typeform, Gravity Forms, Webflow forms) that submit data to HubSpot via an integration, the setup is different. The hidden fields need to exist in the third-party form, and the form's HubSpot integration needs to map those fields to the correct custom properties.
- Zapier: add the UTM fields from your form tool as data in the "Create Contact" action, mapping each to the corresponding HubSpot property.
- Native integrations (Typeform → HubSpot, Webflow → HubSpot): look for field mapping in the integration settings. The UTM hidden fields in your form need explicit mappings, because they won't auto-match.
Common Gotchas
- Test in incognito. HubSpot remembers known contacts and may not populate the properties again if you test with your own email repeatedly. Use a fresh email for each test.
- Don't use "remember me" pre-fill. HubSpot's "save user data" feature can override hidden field values. Disable it on forms where UTM capture matters.
- Check your ad platform UTM conventions. Google Ads auto-tagging (
gclid) competes with UTMs. Make sure "Allow auto-tagging to override UTM" is disabled if you want your custom UTMs to take precedence in HubSpot.
Why Manual HubSpot Hidden-Field Setup Breaks Over Time (And How Trakt Handles It)
The setup above works, but it requires you to add hidden fields to every new form you create. Add a new landing page, forget the hidden fields, and those leads come in without UTM data. If you have more than a handful of forms, or your marketing team moves fast and forms get created regularly, manual setup doesn't scale.
How Trakt closes the gap
Trakt scans your site, detects forms, and injects UTM hidden fields across all of them, including new ones. When a form is updated or replaced, Trakt's injection updates too. Trakt also connects form submissions, UTM data, and deal outcomes in one view, without building manual workflows. See how Trakt handles forms.
Manual HubSpot Setup vs. Trakt, By Requirement
| Requirement | Manual (HubSpot) | Trakt |
|---|---|---|
| Hidden fields on each form | Added by hand to every form you want to track | Injected automatically into the forms it detects |
| New forms | Easy to forget, so leads arrive without UTM data | Covered automatically, including new forms |
| Updated or replaced forms | Fields have to be checked and re-added | Injection updates when a form is updated or replaced |
| UTMs next to deal outcomes | Mirrored deal properties and a copy workflow | Form submissions, UTM data, and deal outcomes in one view, no manual workflows |
| Testing the result | Same either way: open a UTM-tagged URL, submit the form, and check the contact | Same either way: open a UTM-tagged URL, submit the form, and check the contact |
Frequently Asked Questions
How do I pass UTM parameters to a HubSpot form?
Create a custom contact property for each UTM parameter, then add each one to the form as a hidden field. In the field settings, check "Make this field hidden," set the default value to "Prefill from query parameter," and enter the exact parameter name, such as utm_source. When a visitor arrives with that parameter in the URL, HubSpot fills the hidden field before the form is submitted.
Why doesn't HubSpot's Original Source show my UTM campaign?
Original Source uses its own logic: it categorizes contacts as "Paid Search," "Social Media," or "Direct Traffic" from referrer data and page metadata, and it doesn't read your UTM parameters. It's useful for broad channel reporting, but to see the specific campaign you need custom UTM properties populated by hidden form fields. Keep both for different levels of reporting.
Do HubSpot deals inherit UTM properties from contacts?
No, HubSpot deals don't automatically inherit contact properties. You can report at the contact level with a custom report filtered by your UTM properties, or create the same five UTM properties on deals and use a contact-based workflow to copy the values to the associated deal when it's created.
Why are my UTM properties blank in HubSpot after testing?
First check that each hidden field is mapped to the correct custom property and that "Prefill from query parameter" is enabled with the exact, case-sensitive parameter name. Then rule out the common gotchas: testing repeatedly with the same email, HubSpot's "save user data" feature overriding hidden field values, and Google Ads auto-tagging (gclid) overriding your UTMs.
How do I capture UTMs for forms built outside HubSpot?
Add the UTM hidden fields to the third-party form itself, then map them to your custom HubSpot properties in the integration. In Zapier, add each UTM field as data in the "Create Contact" action. In native integrations such as Typeform or Webflow, use the field mapping settings, because the hidden fields won't auto-match.
