Set up HubSpot pages to capture UTM parameters and marketing attribution.

Configure hidden attribution fields in HubSpot forms, add your form to a HubSpot-hosted page, and verify the data reaches your contact records.
Attribution is broken

This guide walks you through configuring HubSpot forms on HubSpot-hosted websites and landing pages to receive Madlitics attribution data.

You’ll connect seven hidden form fields to contact properties, add the form to your page, and check that a submission includes the visitor’s original channel, campaign segments, and landing page data.

Before you begin, install Madlitics on your HubSpot-hosted website so it can capture attribution and populate the configured fields.

Use a new or existing HubSpot form

With Madlitics installed and running on HubSpot, you're ready to build a form that captures both lead details and attribution data.

Step 1: 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

‍

Marketing → Forms

Create a new form or use an existing one

‍

Select Form Editor

‍

Start with a blank form or use a template

‍

+ Add → Fields → Single-line text

Create/connect new properties

Step 2: Connect each attribution field to a single-line text contact property so its submitted value is stored on the contact record.

Select the field and open its Edit field panel. Under Connected property, create the corresponding contact property or select it if it already exists.

For the first field, use Channel as the property label and channel as its internal name. Repeat for the remaining properties using the table below.

‍

Edit field options → Connected Property → Click 'Create new Property'

‍

Align 'Property label' and 'Internal name' with Madlitics field values (below).
Click 'Create Property' to connect.

‍

Madlitics HubSpot connected property values
Madlitics Field HubSpot Property Label HubSpot Internal Name
Channel Channel channel
Segment1 Segment1 segment1
Segment2 Segment2 segment2
Segment3 Segment3 segment3
Segment 4 Segment4 segment4
Landing Page LP lp
Landing Page Group LPG lpg

‍

HubSpot property is connected 🟢

‍

‍

Madlitics field values for HubSpot

Step 2b: Continue customizing the current single-line text field in its Edit field panel → Field options and align with Madlitics values. Enter [channel] in Default value and turn on Hidden field.

  • Default value: [channel]‍
  • Hidden Field: Toggle ON (hides from visitors)

Repeat for all seven attribution fields using the corresponding default values in the table below.

‍

Align 'Default value' with Madlitics field values, and toggle Hidden field.

‍

Madlitics field values
Madlitics Field Default Value Hidden
Channel [channel] Yes
Segment 1 [segment1] Yes
Segment 2 [segment2] Yes
Segment 3 [segment3] Yes
Segment 4 [segment4] Yes
Landing Page [lp] Yes
Landing Page Group [lpg] Yes

‍

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.

‍

Repeat the process of adding field, and aligning properties and field options to Madlitics field values — seven total fields will be added.

‍

‍

Madlitics field values

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 utm_term value for campaign-tagged visits. Use it for the keyword, ad group, audience, or other detail you include in that parameter. It does not automatically reveal a visitor’s organic Google search query.
Property label: Segment3
Internal name: segment3
Default value: [segment3]
Hidden: yes

Segment 4
Captures the utm_content value for campaign-tagged visits. Use it to distinguish creative variations, ads, or individual links within a campaign.
Property label: Segment4
Internal name: segment4
Default value: [segment4]
Hidden: yes

Landing Page
Captures the original page where the visitor entered your website. This can differ from the page where they later submit the form.
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

Madlitics must be running on your published HubSpot-hosted page to populate these attribution fields. Creating contact properties and adding hidden fields does not capture attribution by itself. Install Madlitics in Hubspot -> 

Publish your form on a HubSpot-hosted page

Step 3: Publish your completed form. Use Embed with HubSpot and Open CMS if those options appear, or open the destination website page or landing page directly in HubSpot’s page editor.

Add a Form module where you want the form to appear, or select an existing Form module. Choose your configured form from the form dropdown.

Check its placement and submission settings, then publish or update the page. The published page must also load your Madlitics snippet so it can populate the hidden attribution fields.

‍

Use the Embed with HubSpot option, to place the form directly on a HubSpot‑hosted page or landing page, select 'Open CMS'

‍

Drag the Form module into the page section where the form should live

‍

Choose your lead form, from the dropdown

‍

Click Update or Publish to make the page live

View captured attribution in HubSpot

When a visitor submits your configured form, Madlitics passes their original channel, campaign segments, and landing page data into HubSpot alongside their contact information.

View these values in the form submission and connected contact properties. Add Channel, Segment1–4, LP, and LPG to your contact record layout so your team can see the marketing context behind each lead.

‍

Review form submission details to make sure attribution data is flowing as expected.

‍

Tailor how the attribution data appears for your team, CRM → Contacts

‍

Preview a contact record, and edit the record or property cards.

‍

Include your Madlitics attribution fields, Channel, Segment 1–4, LP, and LPG

‍

Save your Contact properties, once all the fields have been added

‍

Every lead submission will include complete attribution data directly inside the contact record
Stacked bar chart showing lead generation by marketing channel over time, comparing sources like Paid Search, Paid Social, Organic Search, Direct, and Email. Helps visualize which channels drive the most traffic.
Line chart displaying lead-to-customer conversion rates by channel, comparing Google Ads, Facebook Ads, LinkedIn Ads, Organic Search, and Email. Shows how different sources drive qualified leads over time.
Line chart showing revenue performance by marketing campaign, comparing Google Ads, Facebook Ads, and LinkedIn Ads. Helps identify top-performing and underperforming campaigns.

Related articles

Your configured HubSpot form can now pass original channel, campaign, and landing page attribution into connected contact properties.

Repeat the field configuration for any additional forms you want to enrich, and make sure Madlitics runs on the HubSpot-hosted pages where visitors arrive and submit.

Frequently Asked Questions

Answers to common questions about setting up tracking with Madlitics and HubSpot-hosted sites