Digital Marketing

Capturing marketing data in Hubspot with Madlitics

Fix 26% Wasted Spend – Track Channels, UTMs, Landing Pages for 365 Days & End "Direct/Unknown" Leads
Attribution is broken

Madlitics helps marketing teams fix data gaps in HubSpot by ensuring accurate source tracking for every lead. HubSpot's native tools often misclassify visitors as "Direct" or "Unknown", leading to wasted budgets - up to 26% of marketing spend. Madlitics solves this by tracking UTM parameters, traffic sources, and landing page details using a simple JavaScript snippet. This data is stored for 365 days and auto-fills hidden fields in HubSpot forms, preserving attribution across sessions.

Key benefits:

  • Tracks 7 critical data points, including channels, campaigns, keywords, and landing pages.
  • Improves lead quality by 30–50% and boosts ROI by 15–20%.
  • Maintains attribution even when visitors return after days or months.

Setup steps:

  1. Add the Madlitics JavaScript snippet to your site (or use Google Tag Manager).
  2. Create 7 hidden fields in your HubSpot forms to capture detailed data.
  3. Test the integration using UTM-tagged URLs to ensure accurate tracking.

Madlitics organizes and normalizes marketing data directly in HubSpot, helping you identify top-performing campaigns, reallocate budgets effectively, and cut wasteful spending. With better attribution, you can focus on the channels that drive real results and improve your marketing strategy.

How to Set Up Madlitics with HubSpot

Linking Madlitics with HubSpot can help improve the accuracy of your marketing data and boost your campaign performance. The setup process includes three main steps: installing the code snippet, adding hidden fields to your HubSpot forms, and testing the integration. Here's how to get everything up and running.

Installing the Madlitics Code Snippet

Start by logging into your Madlitics account and copying your unique Madlitics customer code snippet. This snippet needs to be added to the <head> section of every page that contains your HubSpot forms. For those using Google Tag Manager, you can deploy the snippet through GTM for centralized tracking, which makes managing it across multiple pages much simpler. Once added, the snippet stores attribution data in first-party cookies. This ensures that even if a visitor browses other pages before submitting a form, their original source information remains intact.

Adding Fields to HubSpot Forms

Next, go to the HubSpot form builder and create seven new fields. Set each one to "Hidden" so visitors won’t see them. Each field needs to be configured with a specific Field Label and Default Value, such as labeling one field channel with a default value of [channel]. Repeat this for the following fields: segment1, segment2, segment3, segment4, lp (landing page), and lpg (landing page group). These fields are designed to automatically collect vital marketing data, including the visitor's channel, traffic source, campaign details, keywords, ad content, and the URL of the page they first landed on. Associate these fields with Hubspot properties to store them withing HubSpot Contacts.

Field Label

Default Value

What It Captures

channel

[channel]

Marketing channel (e.g., Paid Search, Organic Social)

segment1

[segment1]

Traffic source (e.g., Google, LinkedIn)

segment2

[segment2]

Campaign name

segment3

[segment3]

Keyword or ad group

segment4

[segment4]

Creative variation

lp

[lp]

Original landing page URL

lpg

[lpg]

Landing page category

Testing Your Integration

Once your form is live and the Madlitics snippet is active, it’s time to test the integration. Open a private browser window and visit your website using a test URL with UTM parameters. For example: yoursite.com/?utm_source=test_google&utm_medium=cpc&utm_campaign=spring_promo. Navigate through a few pages and then submit the form. Afterward, check HubSpot to confirm that all seven fields are capturing the correct data. For instance, the channel field should display "Paid Search", segment1 might show "test_google", and lp should reflect the entry URL. If any fields are empty, double-check your field labels to ensure they are accurate - small typos can disrupt the connection.

What Madlitics Does for Marketing Data Collection

Once integrated, Madlitics captures visitor data and organizes it directly within HubSpot, giving you a clear view of where your traffic originates.

Tracking All Traffic Sources

Madlitics tracks every channel that drives visitors to your site - not just paid campaigns. This includes organic search, organic social, referrals, and direct traffic. For UTM-tagged links, such as those from ads or emails, the system records the details. Even visitors without UTM codes are automatically categorized. For example, if someone clicks a LinkedIn post without tracking codes, Madlitics logs it as "Organic Social" with "LinkedIn" as the source.

The platform also captures paid search click IDs like gclid, fbclid, and msclkid. These identifiers, often lost when users navigate multiple pages before converting, are stored in first-party cookies. This ensures they remain available when a visitor submits a form.

This ongoing tracking ensures attribution is maintained throughout the customer journey.

Maintaining Attribution Throughout the Customer Journey

Madlitics doesn’t just track the first interaction - it ensures attribution data is preserved for up to 365 days by default. For instance, if someone finds your site through a Google ad but submits a form months later, Madlitics still attributes their visit to Paid Search. Using a first-touch attribution model, the system ensures that the original source is recorded for every form submission, avoiding the dreaded "Direct/Unknown" classification.

Landing Page Data and Automatic Organization

In addition to channel and campaign tracking, Madlitics collects detailed landing page data to give you a fuller picture of visitor behavior. It captures the entry URL (lp) and organizes it into logical categories (lpg). For example, if someone lands on "yoursite.com/blog/marketing-tips", the lp field logs the full URL, while the lpg field categorizes it as /blog/ for cleaner reporting.

Before the data reaches HubSpot, Madlitics normalizes it. This includes cleaning up inconsistent UTM formatting, removing duplicate parameters, and standardizing channel names. Instead of separate entries like "paid search", "Paid Search", or "paidsearch", all data is grouped under a single, consistent label.

"By capturing landing page data alongside UTM parameters, Madlitics shows you which blog posts, case studies, or pricing pages drive the most revenue, helping you scale content that works." — Madlitics

Practical Applications: Using Madlitics and HubSpot Together

Once your Madlitics integration is up and running, you can tap into enriched data within HubSpot to sharpen your marketing strategies. By combining the strengths of Madlitics and HubSpot, you can improve lead tracking, reallocate your marketing budget more effectively, and eliminate wasteful spending.

Getting Accurate Lead Source Data

Madlitics syncs detailed traffic source data directly with HubSpot, ensuring leads are tagged with precise origins like Paid Search, Organic Social, LinkedIn, or Google Ads. For instance, when a lead comes from a tagged Google Ads campaign, HubSpot workflows automatically map this data to custom properties. This kind of accurate tagging can improve lead quality scoring by 30–50%, giving sales teams a clear view of which campaigns are driving results. With this clarity, your team can craft smarter, more targeted campaign strategies.

Adjusting Campaign Strategy with Attribution Data

Accurate lead source data is just the beginning. Use detailed attribution reports to refine your campaign mix. For example, a SaaS company discovered that LinkedIn ads generated 40% more qualified leads compared to email newsletters, with a conversion rate of 15% versus 8% for email. Acting on this insight, they shifted $10,000 of their monthly budget from email to LinkedIn ads, boosting their monthly lead generation from 400 to 500. HubSpot dashboards make it easy to compare ROI across channels, so you can allocate your budget to the platforms delivering the best results.

Cutting Wasted Marketing Budget

Attribution data can also pinpoint channels that aren't pulling their weight. By aggregating channel data in HubSpot, Madlitics helps you quickly identify underperformers. For instance, one marketing team analyzed data from 8,000 monthly visitors and found that paid social had a conversion rate of less than 2%, while SEO delivered a much stronger 12%. This 20% gap from their target led them to cut $15,000 per month from PPC campaigns and redirect it toward organic content and email - channels that were already performing well. The result? A 25% increase in overall leads and a jump in ROI from 2.5x to 5x. Regularly reviewing attribution reports can help you spot these inefficiencies early, allowing you to focus on the channels that truly drive revenue.

Getting the Most from Marketing Data with Madlitics and HubSpot

Integrating Madlitics with HubSpot can completely change the way you handle marketing data. Madlitics automatically fills in key attribution fields for every lead record, ensuring you know exactly which ad, blog post, or campaign brought someone to your site - even if they browse multiple pages before converting. This data sticks around across sessions, giving you a clear picture of your lead’s journey.

Madlitics doesn’t just stop at capturing data - it takes things further with automation. By standardizing UTM parameters and best practices, it eliminates data fragmentation, making your reports faster to generate and more reliable. Consider this: poor data quality is responsible for more than 30% of lost sales, yet only 3% of organizations meet basic data quality standards. By addressing these issues at the source, Madlitics helps you trust your data and act on it quickly.

"It's the first solution my team actually uses every day because the data shows up where they already work. No training, no new dashboards." - Sam R., Growth Lead, Tech Startup

This enriched data is perfect for personalizing lead nurturing. With HubSpot workflows, you can trigger actions based on the specific ad creative or landing page that first engaged a lead. You’ll also be able to compare platforms to find the best-performing ones - whether that’s the lowest cost-per-lead or the highest conversion rates. Since 93% of marketers say personalization boosts lead generation or purchase rates, accurate attribution becomes a critical part of running smarter campaigns. This approach ties directly into the campaign refinement strategies we’ve discussed, giving you the confidence to make better marketing decisions.

Ready to see it in action? Try Madlitics with a 14-day free trial - no credit card required. You’ll immediately gain a full view of your top-performing leads, helping you focus your budget where it matters most for measurable growth.

Madlitics multi-channel attribution visualization, showing marketing platforms like TikTok, Instagram, Google, and Facebook. The graphic highlights how different sources contribute to high-performing marketing channels.
1. Add UTM parameters to all inbound links
Any marketing effort that drives traffic — whether it’s a paid ad, an email campaign, or an organic post — should have properly structured URLs that clearly define the visitor’s origin. Setting it up is a straightforward process that starts with ensuring all inbound links include UTM parameters.

A LinkedIn campaign, for example, might link to:
https://yoursite.com/?utm_source=linkedin&utm_medium=paidsocial&utm_campaign=q1_promo
Screenshot of a form builder interface with a highlighted 'Hidden Input' field. Accompanied by text explaining how to install and set up Madlitics by adding hidden fields to capture marketing attribution data.
2. Add hidden fields
Once you’ve added UTM tracking to your inbound links, the next step is to install Madlitics on your site and update your Framer Forms to include hidden fields that will store attribution data when a visitor submits a form automatically. Hidden fields to include:
• Channel (e.g., Paid Search, Organic Social, Direct)
• Segment 1 (Platform name: Google, LinkedIn, Twitter)
• Segment 2 (Campaign name)
• Segment 3 (Ad group, offer name, or post type)
• Segment 4 (Creative type or ad variation)
• Landing page/group (Tracking & first-touch attribution)
CRM interface showing a detailed view of captured attribution data, including marketing channels, segments, and landing pages. A business profile of a lead is displayed, highlighting how Madlitics enriches lead data for sales and marketing teams.
3. Utilize attribution data
With the setup complete, every form submission in Framer now carries full attribution data, ensuring accurate insights into where leads originate. Pass this data to your CRM, analytics tools, or marketing automation platforms to track performance, refine campaigns, and optimize marketing efforts with precision.

Related articles to get you started with Madlitics

Frequently asked questions

Answers to your top questions about our UTM parameters
Put attribution data to work
Sync, analyze, and automate — turn insights into action.
Automation icon indicating hands-free marketing attribution and data flow.
Sync with your CRM
Pass UTM parameters into Salesforce, HubSpot, or ActiveCampaign so your sales team knows exactly where every lead came from — no more guessing.
Analytics report icon, indicating data insights and reporting.
Built smarter reports
Use Google Sheets, Looker Studio, or Airtable to create data-driven reports that reveal which campaigns drive real revenue — helping you make informed budget decisions.
Impact measurement icon, symbolizing marketing effectiveness.
Track revenue impact
Sync UTM data with Stripe, PayPal, or Chargebee to see which campaigns generate paying customers, not just leads — so you can scale what works.
Personalization icon, representing customization features.
Personalize email campaigns
Trigger personalized email flows in Klaviyo, Mailchimp, or ConvertKit based on a lead’s original source — ensuring the right message reaches the right audience.
Visualizing your marketing impact
See how attribution data translates into actionable insights.
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.
Leads by channel
See how different marketing channels contribute to lead generation over time. Understand which ones drive the most traffic and whether your marketing mix is balanced. Shift your budget toward the highest-performing channels to maximize results.
Stacked bar chart illustrating lead volume across different marketing campaigns, including Black Friday, Retargeted, Spring Promo, Referral, and SEO. Highlights trends in campaign effectiveness.
Leads by campaign
Track inbound leads across all campaigns, whether or not they have UTM parameters. Ensure every lead is categorized correctly, including Organic and Referral traffic. Use this insight to refine messaging, targeting, and budget allocation for better performance.
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.
Conversion rate by channel
See which channels convert leads into paying customers. Some bring buyers, while others generate unqualified leads. Focus your budget on what drives revenue.
Line chart showing revenue performance by marketing campaign, comparing Google Ads, Facebook Ads, and LinkedIn Ads. Helps identify top-performing and underperforming campaigns.
Revenue by campaign
Focus your budget on campaigns that drive revenue, not just leads. Identify top performers and optimize underperforming efforts to maximize profitability.
Everything you need for reliable lead attribution
Accurate, persistent, and automated tracking — so your campaigns perform at their best.
Performance icon symbolizing marketing campaign effectiveness and results tracking.
Outperforms basic UTM tracking
Madlitics captures, categorizes, and persists attribution data across sessions, giving you a complete, structured view of what’s working in your marketing. Say goodbye to losing attribution when users navigate your site, struggling with formatting inconsistencies, and ingored non-UTM traffic.
Capture icon indicating data collection from various marketing channels and sources.
Capture all traffic
Madlitics categorizes all inbound leads — whether they have UTM parameters or not — so every conversion is accounted for, and you won't miss out on Organic Search, Organic Social, and Referral traffic.
Routing icon representing the flow of marketing data and attribution pathways.
Attribution across pages and sessions
A LinkedIn ad click should be attributed correctly—even if the visitor signs up on a different page later. If someone clicks an ad, browses multiple pages, then submits a form later, Madlitics persists attribution data across sessions, ensuring your reports reflect true performance.
List icon representing structured marketing data, reports, or campaign breakdowns.
Cleaner, more reliable data
Duplicate UTMs and inconsistent formatting break reports and mislead teams. Madlitics cleans and organizes attribution data before sending it to your CRM, giving you accurate insights.
Target icon symbolizing precise audience targeting and marketing campaign focus
See which content converts
Attribution isn’t just about where visitors came from—it’s about what convinced them to convert. By capturing landing page data alongside UTM parameters, Madlitics shows you which blog posts, case studies, or pricing pages drive the most revenue, helping you scale content that works.
Action icon representing campaign execution, optimization, and engagement.
Transform form submissions into actionable insights
Madlitics connects marketing touchpoints to lead generation, ensuring every form submission is fully attributed — optimize ad spend by identifying high-ROI channels, refine messaging based on what content drives engagement, make data-driven decisions with clean, structured reports, and more.