Attribution Foundation
Complete HubSpot attribution property stack — UTM parameters, referrer URLs, click IDs, and analytics identifiers.
Complete HubSpot attribution property stack — UTM parameters, referrer URLs, click IDs, and analytics identifiers. Covers every value that utm-cookie-map captures from the browser and injects into forms. This is a more comprehensive set of values than what's found in our UTM Tracking Bundle, focused more squarely on ad tracking. If you just need the basics, go with UTM Tracking instead.
This bundle implements the data capture layer of the NetSpinnr inbound spec: the cookie-to-hidden-field pipeline that ensures attribution data survives navigation and lands on the contact record at form submission. The MQL Engine bundle handles downstream processing (qualification, routing, enrichment).
Deploy this bundle first, then install utm-cookie-map on your site. Property internal names match the script's default field mappings out of the box — no reconfiguration needed.
What's included:
- First-touch and most-recent UTM fields (source, medium, campaign, content, term)
- First Referrer and Most Recent Referrer
- GA Client ID (parsed from _ga cookie)
- Segment Anonymous ID (ajs_anonymous_id)
- Google Click ID (gclid / _gcl_aw)
- LinkedIn Click ID (li_fat_id)
- Meta Click ID and Meta Pixel ID (_fbc, _fbp)
- Bing Click ID (msclkid)
- Five workflows that stamp first-touch UTM values (never overwritten once set)
- [Attribution] Hidden Field Set — drop onto any HubSpot form to capture all of the above on submission
Why capture ad click IDs?
Each ad platform assigns a unique identifier to every click — GCLID for Google, li_fat_id for LinkedIn, _fbc for Meta, msclkid for Bing. Capturing these at form submission is what makes offline conversion tracking possible: when a contact later hits a meaningful milestone (MQL, opportunity created, closed-won), you can send that event back to the originating platform tagged to the specific click that drove it.
HubSpot has native offline conversion integrations for Google and LinkedIn, but they're limited to lifecycle stage changes. Storing the click IDs yourself gives you full flexibility — you can trigger conversion events from any workflow, on any condition, via webhook to the platform's Conversion API or via periodic CSV upload.
The First UTM fields follow the dual-timestamp pattern applied to text values: capture the state once on first touch, then never overwrite it. The Most Recent UTM fields record the current state. Both together give you first-touch and last-touch attribution on the Contact object, which you can then pass along to Deals when Contacts are associated to them.
What's included — 25 templates
First UTM Campaign
Preserved first-touch UTM campaign value — written once when utm_campaign is first set and never overwritten. Use for first-touch attribution and channel cohort reporting.
First UTM Content
Preserved first-touch UTM content value — written once when utm_content is first set and never overwritten. Use for first-touch ad creative attribution.
First UTM Medium
Preserved first-touch UTM medium value — written once when utm_medium is first set and never overwritten. Use for first-touch channel attribution.
First UTM Source
Preserved first-touch UTM source value — written once when utm_source is first set and never overwritten. Primary field for first-touch channel reporting and MQL source groupings.
First UTM Term
Preserved first-touch UTM term value — written once when utm_term is first set and never overwritten. Use for first-touch paid search keyword attribution.
Most Recent UTM Campaign
The campaign value from the most recent UTM-tagged form submission. Overwrites on each new form submission; use First UTM Campaign for first-touch preservation.
Most Recent UTM Content
The content value from the most recent UTM-tagged form submission. Overwrites on each new form submission; use First UTM Content for first-touch preservation.
Most Recent UTM Medium
The medium value from the most recent UTM-tagged form submission. Overwrites on each new form submission; use First UTM Medium for first-touch preservation.
Most Recent UTM Source
The source value from the most recent UTM-tagged form submission. Overwrites on each new form submission; use First UTM Source for first-touch preservation.
Most Recent UTM Term
The term value from the most recent UTM-tagged form submission. Overwrites on each new form submission; use First UTM Term for first-touch preservation.
First Referrer
First referrer URL captured from initial visitor tracking. Preserves the original referring site at first touch.
Most Recent Referrer
Most recent referrer URL from visitor tracking. Updated on each session, complementing First Referrer for multi-touch referral analysis.
GA Client ID
Anonymous identifier assigned by GA4 to each browser session. Capturing it on form submission enables offline conversion tracking via the GA4 Measurement Protocol — you can fire lifecycle stage changes or pipeline events back to GA4 as conversion signals, which Google Ads surfaces as imported conversions. Note: a single person can have multiple GA Client IDs across browsers and devices.
Segment Anonymous ID
Anonymous identifier assigned by Segment to each browser session before a contact identifies themselves. Capturing it on form submission lets you stitch pre-identification activity — pages viewed, events fired — to the identified contact record in Segment.
Google Click ID
The Google Ads click ID (gclid) passed via URL parameter when a contact clicks a Google ad. Used for conversion import and attribution back to Google Ads.
LinkedIn Click ID
The LinkedIn ad click ID (li_fat_id) passed via URL parameter when a contact clicks a LinkedIn ad. Used for conversion tracking back to LinkedIn Campaign Manager.
Facebook Click ID
The Facebook Click ID (fbclid) passed via URL parameter when a contact clicks a Facebook ad. Used for conversion matching back to Meta Ads.
Facebook Pixel ID
The Facebook Pixel ID associated with the contact's browser session. Used for audience matching and conversion tracking in Meta Ads.
Microsoft Click ID
Auto-tagged MSCLKID click ID passed via URL when a contact clicks a Microsoft ad. Used for conversion attribution.
[UTM] Stamp First Campaign
Stamps the first UTM campaign value on a contact when utm_campaign is first set. Preserves first-touch campaign attribution; never overwrites once stamped.
[UTM] Stamp First Content
Stamps the first UTM content value on a contact when utm_content is first set. Preserves first-touch content attribution; never overwrites once stamped.
[UTM] Stamp First Medium
Stamps the first UTM medium value on a contact when utm_medium is first set. Preserves first-touch medium attribution; never overwrites once stamped.
[UTM] Stamp First Source
Stamps the first UTM source value on a contact when utm_source is first set. Preserves first-touch source attribution; never overwrites once stamped.
[UTM] Stamp First Term
Stamps the first UTM term value on a contact when utm_term is first set. Preserves first-touch keyword attribution; never overwrites once stamped.
[Attribution] Hidden Fields
Full attribution hidden field set — UTM parameters, referrer, click IDs (Google, LinkedIn, Facebook, Microsoft), Segment anonymous ID, and GA Client ID. Pairs with utm-cookie-map (https://github.com/jcksegal-ns/utm-cookie-map) and the Attribution Foundation bundle. Use [UTM] Hidden Fields instead if you only need UTM parameters.
Request access to add this bundle to your account and deploy it to any HubSpot portal.
Request access →Already have an account? Log in
Published by
From reporting and attribution to custom integrations and platform administration we help you get more out of your technology and drive business growth.
netspinnr.com