Track UTM Parameters in HubSpot CRM: A Practical Setup Guide
You can connect campaign tags to the leads they create by storing attribution data on the first visit, writing it into hidden form fields, and sending it to HubSpot with each submission. That makes it possible to report on leads, deals, and revenue by channel and campaign instead of relying only on website visits.
How the flow works
A useful setup has four parts: capture the visit, preserve it while the visitor browses, place it on the form submission, and report on it in HubSpot. The visitor does not need to see the attribution fields, and the sales team can still see the origin on each contact record.
Checklist before you start:
- Confirm which forms should carry attribution data.
- Confirm the HubSpot properties that will receive the values.
- Decide whether you need channel detail, campaign detail, landing-page detail, click IDs, or all four.
- Test one paid visit and one organic visit from landing page through form submission to contact record.
1. Install the snippet and add hidden fields
Add the attribution snippet to the website using the method supported by your platform. WordPress sites commonly use theme settings or a header/footer plugin, while hosted builders usually provide a custom-code or header/footer-scripts setting. A tag manager can also be used where supported.
Then add six hidden fields to each lead-capture form:
- Channel
- Channel Drilldown 1
- Channel Drilldown 2
- Channel Drilldown 3
- Landing Page
- Landing Page Group
Hidden fields are not shown to visitors. Their purpose is to carry attribution values into the CRM when the form is submitted. Most form builders provide a hidden-field type that can be added and configured without changing the visible form layout.
2. Preserve attribution across the visit
When a visitor arrives, the snippet reads the campaign tags in the URL and stores the attribution information in the browser. If the visitor moves to another page before submitting a form, the original values remain available. This matters because a person may land on a campaign page, browse other pages, and complete a contact form later.
For example, a visitor who clicks a paid-search ad for tax services and later submits a contact form could be recorded with a paid-search channel, the search platform, the campaign name, and the ad-group or keyword detail in the drilldown fields. The first landing page and its page group can be stored alongside those values.
3. Send the data to HubSpot and use it
On submission, the hidden-field values travel with the contact details into HubSpot. Once stored, they can support contact-level visibility, channel and campaign reports, workflow routing, and more relevant sales outreach.
Raw UTM capture alone has limits. It may miss visits without campaign tags, lose the original tags when the form is on a different page, and depend on a specific form builder. A broader attribution setup can also classify organic search, organic social, direct, and referral visits, capture click IDs such as GCLID, MSCLKID, and FBCLID, and record the landing page and page group.
Click IDs are especially useful when they can be returned to an advertising platform after a lead becomes a customer. That lets the platform optimize toward paying customers rather than only toward form submissions.
4. Reports to build first
Start with reports that answer clear budget questions:
- Leads by channel, to see where enquiries originate each month.
- Leads by advertising network, to compare performance across networks within a platform.
- Customers by campaign, to identify campaigns producing paying customers rather than only visits.
- Revenue by keyword, where keyword values are included in campaign tags, to guide bidding and content priorities.
A common failure distinction is between traffic and outcomes. A campaign can generate many visits but few qualified leads or customers. Reporting leads, deals, and revenue against the stored channel and campaign fields makes that difference visible.
Test before you trust the reports
Before relying on the data, submit test forms from different origins and check the resulting HubSpot records. Verify that paid visits retain their campaign detail after browsing, organic visits receive a channel classification, landing-page fields are populated, and click IDs appear where expected. Also confirm that the hidden fields do not alter the visible form experience.
For tool access and current commercial terms, use the owner-confirmed details: Attribution Analytics; {{OWNER_TRIAL_AND_PRICING}}.