Bring Marketing Channel Attribution into HubSpot
HubSpot can hold a lot of contact detail, but the channel and campaign that produced a lead often arrive without that context.
This guide explains a form-based approach: hidden fields on your lead forms are filled with attribution data and submitted alongside the visitor's details, so the contact record in HubSpot includes where the lead came from.
How the attribution flow works
The setup has four stages. First, add hidden fields to your lead forms so there is somewhere for attribution data to travel. Second, a script monitors which marketing channel a visitor arrived from and writes that information into the hidden fields. Third, when the visitor submits the form, the values are passed into HubSpot along with the rest of the submission. Fourth, you use the stored values to report on which channels, campaigns, and ads are producing leads, customers, and revenue.
What data the hidden fields can carry
Two families of data are described. Channel data identifies the source type — for example Paid Search, Paid Social, or Organic Search — and, where available, deeper detail such as campaign, ad group, and keyword for paid search. Landing-page data identifies the first page a lead saw on your site, plus a category for that page. For instance, a first page at a blog URL would be recorded as the full URL and as the category Blog.
Which form types can carry the data
The requirement is the same across form types: the form must accept hidden fields. HubSpot forms qualify directly. Third-party form tools qualify if they let you add hidden fields and pass submissions into HubSpot. Custom forms qualify if a developer can add the hidden fields to the form markup. If a form cannot hold hidden fields, the attribution values have nowhere to go before submission.
A quick compatibility check
Before configuring anything, confirm four things. (1) The form is one of the supported types: HubSpot, a third-party tool that passes leads into HubSpot, or a custom form. (2) You can add hidden fields to that form. (3) The hidden fields will be submitted with the lead rather than stripped by the form tool. (4) The receiving HubSpot properties exist so the submitted values land on the contact record. If any answer is no, the data path is incomplete.
Field map: what each hidden field represents
Channel — the source type, such as Paid Search, Paid Social, or Organic Search. Channel detail — for paid search, the campaign, ad group, and keyword. Campaign name — the named campaign associated with the visit. Ad name — the specific ad, where available. First landing page — the full URL of the first page the lead saw. Page category — a label for that page, such as Blog. These are the values the hidden fields are designed to carry into HubSpot.
Worked example: a blog landing page
Suppose a visitor's first page is a blog article about licensing music. The landing-page field would hold the full URL of that article. The page-category field would hold Blog. In reporting, you can group by category to see how blog entries perform as a whole, or inspect the full URL to see which specific article brought the lead in. The same logic applies to channel: group by channel for a high-level view, or drill into campaign and ad name for detail.
Two different failure modes
If the hidden fields are absent from the form, no attribution data can be submitted at all — the form simply has no place to put it. If the hidden fields are present but empty on submission, the form path exists but the values were not written before submit. The first is a setup gap on the form; the second is a population gap between the visitor's session and the form. Checking which one you have narrows the fix considerably.
Turning stored values into reports
Once the values are on contact records, build reports that group by channel, campaign, or ad to see which sources produce leads, customers, and revenue. Because the data is stored per contact, the reporting follows the contact through the pipeline rather than stopping at the first form submission.
Frequently asked questions
Which form types can send attribution data into HubSpot?
HubSpot forms, third-party form tools that pass leads into HubSpot, and custom forms — provided each can accept hidden fields. The hidden fields are the mechanism that carries the attribution values into the submission.
What attribution data can the hidden fields carry?
Channel (for example Paid Search, Paid Social, or Organic Search), channel detail such as campaign, ad group, and keyword for paid search, campaign name, ad name, the first landing page URL, and the landing-page category.
What happens if a form cannot have hidden fields?
There is nowhere for the attribution values to be written before submission, so the data cannot travel with the lead into HubSpot. A form that accepts hidden fields is the prerequisite.