UTM Guide

How to capture UTM Parameters in Custom HTML Forms

Turn Custom HTML Forms responses into full attribution records ready for your marketing tools, and see what drives leads, not just form fills.
Attribution is broken

Custom HTML forms give you full control, but capturing reliable UTM parameters for attribution is still a persistent challenge for marketers. UTMs live in the URL, and unless you intentionally store them and pass them through on submit, they disappear the moment a visitor clicks to another page, returns later, or converts after a multi-step journey. In practice, UTM values show up on only a small fraction of form submissions, while most entries arrive with blank or incomplete campaign fields—making it hard to see which efforts are actually driving results.

Madlitics solves this by persisting first-touch attribution data on the first visit, then automatically filling your form’s hidden inputs at submit time—UTMs, referrers, landing page data, and click IDs included. Instead of maintaining brittle scripts and one-off form logic, you get clean, consistent attribution on every submission so you can confidently connect marketing activity to outcomes.

Issues with using Custom HTML Forms for marketing attribution and UTM tracking

Custom HTML forms give you full control, but most setups still miss attribution because nothing is capturing marketing context by default. If you don’t intentionally store UTMs, referrers, and click IDs before submit, your form entries usually arrive without the information you need to understand what drove the lead.

Attribution disappears across pages and sessions
With custom forms, you have to decide which fields to capture, create the inputs, and make sure the values are filled at the right time. If inputs aren’t present (or the name attributes don’t match what your backend expects), attribution fields silently fail — so submissions look clean, but the source data is missing.

No built-in attribution pattern
With custom forms, you have to decide which fields to capture, create the hidden inputs, and make sure the values are filled at the right time. If hidden inputs aren’t present (or the name attributes don’t match what your backend expects), attribution fields silently fail—so submissions look clean, but the source data is missing.

UTM-only capture misses organic and referral context
Even when UTMs are present, they only tell part of the story. A lot of your best traffic won’t be tagged at all—organic search, organic social, referrals, and direct. Without referrer-based classification, those leads get lumped into “unknown,” and you end up undercounting the channels that are actually driving results.

Click IDs get dropped before conversion
Paid traffic often depends on click IDs (gclid, msclkid, fbclid) for clean matching. But click IDs live in the URL, and they’re easy to lose in multi-page journeys, redirects, and return visits. If you don’t persist them, you can’t reliably tie leads back to paid efforts later.

A consistent, unbiased source of truth is hard to maintain
Most teams end up patching attribution downstream—spreadsheets, manual rules, or “best guess” reporting. Madlitics creates a consistent, first-party view of how visitors arrived before submitting, using the same definitions across channels. That gives you one reliable source of truth you can trust when making budget decisions.

How Madlitics fixes attribution for Custom HTML Forms

Madlitics adds a persistent attribution layer in front of your Custom HTML Forms so that every submission inherits clean, consistent tracking data — regardless of which page the user converts on.

When a visitor lands on your site, Madlitics captures first-touch information such as channel, source, campaign, medium, keyword or ad content (if available), and landing page details. That data is stored client-side and associated with the visitor’s session and subsequent sessions, so if they move from a campaign landing page to a blog article and then finally to a “Request Demo” Custom HTML Form, the original context is still available.

At submit time, Madlitics injects this normalized attribution data into hidden fields on your Custom HTML Form turning each response into a complete record you can send to your CRM, marketing automation platform, or data warehouse. This means your Custom HTML Forms becomes a reliable capture mechanism instead of a dead end for attribution.

Getting started with Madlitics and Custom HTML Forms

Follow these 4 steps to capture full attribution on every Custom HTML Form submission in under 10 minutes.

  1. Tag your campaigns consistently
    Add UTM parameters (source, medium, campaign, term, content) to every link across ads, emails, social posts, and collateral. This gives Madlitics clean data to work with from the first pageview.

    Example:
    ?utm_source=google&utm_medium=cpc&utm_campaign=customhtmlforms_guide&utm_term=utm+tracking&utm_content=ad_variation_a  
  2. Integrate Madlitics
    Sign up for a Madlitics account, grab your unique code snippet, and paste it into your site’s <head> (or deploy via GTM). Then add the Madlitics hidden inputs to your custom HTML form. Once those fields exist, Madlitics automatically fills them on every submission—site-wide—so you capture reliable attribution even when visitors browse around or return later.

    Installing Madlitics on a website
    Integrating Madlitics with Custom HTML Forms
  3. Capture attribution on every visit
    Madlitics instantly grabs UTMs, click IDs (gclid, fbclid, msclkid), channels, and landing pages from the first pageview, then stores them persistently in cookies across all navigation, pageviews, and sessions. Here's what gets captured (example from a Google ad → Custom HTML Forms guide):

    Channel: Paid Search
    Segment 1
    : google
    Segment 2
    : customhtmlforms_guide
    Segment 3
    : utm tracking
    Segment 4: ad_variation_a
    Gclid
    : CAAAAABq8ybUF7...
    Landing Page
    : www.acme.com/articles/custom-html-forms
    Landing Directory
    : /articles/  
  4. Submit enriched leads via Custom HTML Forms
    When users hit submit, your Custom HTML Form captures their details (name, email, phone) plus Madlitics' full attribution profile in hidden fields — no data loss even from multi-page journeys or embeds.

    Send everything directly via your native integrations to HubSpot, Salesforce, Pipedrive, or any CRM, or use Zapier to pipe enriched leads into spreadsheets, email tools, Stripe/Chargebee billing, or analytics for MMM and custom reporting.

Turning data into business decisions

Capturing attribution is just the start—the real value comes from reports that reveal what actually drives pipeline and revenue. With Madlitics enriching every Custom HTML form submission, you replace "Direct/Unknown" black holes with actionable insights that shift budgets, kill underperformers, and double down on winners.

Spot your top channels instantly
Build leads-by-channel breakdowns to see how Organic Search, Paid Search, Paid Social, and referrals stack up on Custom HTML form conversions. Spot if SEO is quietly crushing paid efforts, then reallocate budget from low performers to scale what's working.

Compare ad networks head-to-head
Drill into submissions by network or campaign to benchmark Google vs. Meta vs. LinkedIn performance. Uncover which platforms deliver the lowest CPLs or highest demo-to-customer rates, even for the same form across funnels.

Find campaigns that close (not just click)
Connect Custom HTML form data to your CRM and track customers + revenue by campaign, keyword, or landing page. Pinpoint which efforts generate cheap form fills but zero pipeline versus the ones quietly producing your highest LTV deals.

Prioritize high-ROI content and keywords
Group by landing page or directory (/blog vs. /features) to measure content performance, or slice revenue by keyword/gclid to bid smarter in ad platforms. Turn Custom HTML form responses into a mirror of your ad account breakdowns — but tied to actual leads and sales.

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.

Make Custom HTML Forms Your Attribution Engine

A Custom HTML Form is a powerful tool for creating engaging, high-converting forms that capture leads across your site, from demos to content upgrades. Its conversational design and embed flexibility make it a go-to for performance marketers chasing better response rates.

Pairing it with Madlitics unlocks even more potential by turning every submission into a full attribution record — persistent channel, campaign, keyword, click ID, and landing page data that flows straight to your CRM. No more "Direct/Unknown" gaps or manual stitching; you get clean insights on what truly drives pipeline and revenue.

Start today with a 4-step setup that takes minutes, then build reports that shift budgets from guesswork to proven winners. This integration makes your Custom HTML Forms a revenue attribution engine for your entire marketing stack.

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.