Setting up Hubspot Forms for Marketing Attribution and UTM Tracking


HubSpot's form builder makes it simple to create powerful lead capture forms that integrate seamlessly with your CRM and marketing workflows, while giving you full control over hidden fields and custom data collection. This means you can design professional forms that automatically capture Madlitics attribution data alongside every lead—revealing exactly which channels, campaigns, and landing pages drive your highest-value submissions.
In this guide, we'll show you how to connect Madlitics with HubSpot forms using hidden fields. Once configured, every form submission will include rich attribution details like channel, campaign, UTM segments, and landing page data, so you can track marketing performance directly in HubSpot reports and customer records.
💆 Heads-up: Make sure Madlitics is installed site-wide first (via script tag or tag manager). HubSpot forms need the Madlitics script running on the page to populate attribution data into hidden fields. Installing Madlitics on Framer ->
With Madlitics installed and running on your site, you're ready to build a form that captures both lead details and attribution data. In HubSpot, navigate to Marketing → Forms, then click Create form to start fresh, or select an existing form and click Edit.
Build your form however you like — add standard fields like Name, Email, Phone, or custom questions for your visitors. HubSpot's drag-and-drop editor makes this straightforward.
To enable Madlitics attribution tracking, you'll add seven Single-line text fields. These fields stay invisible to visitors but automatically populate with channel, campaign segments, landing page data, and more when the form submits. Get started by dragging a Single-line text field onto the form canvas.
Marketing → Forms → Create form → + Add → Fields → Single-line text





To ensure attribution data flows into HubSpot contacts alongside every lead, you'll add seven text fields connected to custom properties, that automatically capture details like channel, campaign, UTM segments, and landing page without visitors seeing or interacting with them.
Create a custom property: Select the single-line text field and it's Edit field panel, under Connected property, click the Create new property button. Set the Property label to the first Madlitics field, Channel and the Internal name to channel (no spaces or underscores). Click the Create property button to save — you'll see a "Property connected" confirmation.
channel



Continue customizing the current single-line text field in its Edit field panel → Field options and align with Madlitics values (below):
[channel]

Repeat this process for all seven Madlitics fields — Adding additional text fields, creating/connecting Hubspot properties, and updating field options to align with Madlitics values. Each field maps to a HubSpot custom property and pulls the corresponding attribution data automatically when Madlitics is running on the page.

For additional fields and values including clickIDs (gclid/fbclid) or extra parameters, see Madlitics field values pairs.
Marketing Channel Category
Categorizes the visit’s marketing channel based on multiple signals, including traffic type, referring domain, and known platforms.
Property label: Channel
Internal name: channel
Default value: [channel]
Hidden: yes
Segment 1
Captures the source of the traffic, identifying the specific platform, publisher, or partner that sent the visitor to your site; for paid traffic, this field records the utm_source, for organic traffic the platform, for referrals the referring domain, and for direct traffic no value is captured.
Property label: Segment1
Internal name: segment1
Default value: [segment1]
Hidden: yes
Segment 2
Captures the campaign-level details associated with the visit, identifying which campaign, promotion, or initiative led the visitor to your site; for paid traffic, this field records the utm_campaign, for organic traffic the referring domain, and for direct traffic no value is captured.
Property label: Segment2
Internal name: segment2
Default value: [segment2]
Hidden: yes
Segment 3
Captures the keyword, creative variation, or content-level detail that influenced the visit, such as a paid search term, specific ad, post type, or format; for paid traffic, this field records the utm_term, for organic traffic the full referring URL when available, and for direct traffic no value is captured.
Property label: Segment3
Internal name: segment3
Default value: [segment3]
Hidden: yes
Segment 4
Captures the audience, ad group, or offer associated with the visit, showing how the traffic was segmented within a campaign; for paid traffic, this field records the utm_content, and for organic and direct traffic no value is captured.
Property label: Segment4
Internal name: segment4
Default value: [segment4]
Hidden: yes
Landing Page
Captures the exact page where the visitor first entered your site, recording the original entry point of the session.
Property label: LP
Internal name: lp
Default value: [lp]
Hidden: yes
Landing Page Group
Captures the category or logical grouping of the landing page, allowing multiple related entry points to be analyzed under a shared identifier.
Property label: LPG
Internal name: lpg
Default value: [lpg]
Hidden: yes
With all Madlitics fields added and connected to custom properties, click Review and update in the top right to finalize your form. HubSpot forms now capture complete first-touch attribution data with every submission, flowing directly into contact records and reports.
Test the integration live: HubSpot form previews don't execute Madlitics scripts, so publish your form first. Embed it on a live page (via HubSpot page, external site, or CMS embed code), then visit that URL with UTM parameters (e.g., ?utm_source=google&utm_medium=cpc&utm_campaign=hubspot-test).
Submit the form as a visitor would. You should see values like channel: "Paid Search", segment1: "google", and landingpage: "/your-lp-url" alongside standard lead fields. HubSpot form submission showing Madlitics attribution data captured successfully—channel, UTM segments, and landing page details now flow into contact records.



https://yoursite.com/?utm_source=linkedin&utm_medium=paidsocial&utm_campaign=q1_promo

With Madlitics now integrated into your HubSpot forms, every lead submission automatically carries precise first-touch attribution data—channel, campaign, UTM details, and landing page — directly into contact records and reports. This eliminates guesswork around what drives pipeline, empowering your team to optimize marketing spend, prove ROI, and close the loop between campaigns and revenue right inside HubSpot.