Support

Integrating Madlitics with Framer forms

How to add Madlitics to your Framer forms and collect customer lead data.

Framer makes it easy to design and publish sleek, responsive websites without touching code, while still giving you the flexibility to add powerful custom scripts. That means you can create visually stunning pages and still integrate tools like Madlitics to track exactly where your leads are coming from.

In this guide, we’ll show you how to connect Madlitics with your Framer forms by adding a small code snippet. Once set up, every form submission will include attribution data—like channel, campaign, and landing page—so you’ll know which marketing efforts are working and where to double down.

💆 Heads-up: Make sure Madlitics is installed on the site where this form lives (ie. Framer). The form alone won’t capture attribution data — Madlitics needs to be running on the page to pass lead data into your submissions. Installing Madlitics on Framer ->  

Step 1: Create a new code component in Framer

Unlike other platforms where you add hidden fields directly to a form, Framer uses code components to handle custom functionality. To begin, open the Assets tab in the left sidebar, scroll down to the Code section, and create a new code file. This file will hold the Madlitics fields that capture attribution data whenever your forms are submitted.

Once you’ve named your new file, Framer will automatically generate a code component you can edit. Think of this as the foundation where Madlitics will live inside your Framer project.

From the Assets panel, open the Code section and select New Code File.

Give your code file a name, select New Component, and click Create (this example names our code ''.

Step 2: Edit the code to add Madlitics fields

Now that your new code component is created, it’s time to customize it for Madlitics. Open the file you just made in the Assets › Code section. You’ll see Framer has added a default function as a placeholder. Go ahead and remove that boilerplate so you’re starting with a clean slate.

Next, replace it with the Madlitics form fields. This code block contains the seven Madlitics fields that capture attribution data whenever someone submits your form. Configure additional Madlitics field value pairs for deeper customization and richer insights.

Open your new code file—Framer starts you with a default function as a placeholder. Replace the export default function with Madlitics form code .

Remove the boilerplate and replace it with the Madlitics fields component.

export default function MadliticsFields() {
  const style = { display: "none" }
  return (
    <div style={style}>
      <input type="hidden" name="channel" value="[channel]" />
      <input type="hidden" name="segment1" value="[segment1]" />
      <input type="hidden" name="segment2" value="[segment2]" />
      <input type="hidden" name="segment3" value="[segment3]" />
      <input type="hidden" name="segment4" value="[segment4]" />
      <input type="hidden" name="lp" value="[lp]" />
      <input type="hidden" name="lpg" value="[lpg]" />
    </div>
  )
}

Step 3: Add the Madlitics form fields

With the code ready, it’s time to connect it to your form. In the Framer canvas, start by dragging a Form element onto the page. Add your usual fields like Name and Email so visitors can fill them out.

Next, open the Assets tab, and under Components you’ll now see the MadliticsFields component you created in Step 2. Drag this component into your form and position it just above the Submit button. You won’t see anything appear visually on the page—the fields are hidden—but this ensures that every submission passes attribution data into your form entries.

Once it’s in place, check the Layers panel to confirm that the Madlitics component sits neatly inside your form structure.

Add a Form element to your page and include your standard lead fields

Locate the your code component (ex. MadliticsFields) under Assets.

Drag the component into your form and position it just below the Submit button.

Confirm in the Layers panel that MadliticsFields is inside your form.

Step 4: Publish and test your form

Once your Madlitics component is in place, it’s time to push your changes live. Framer scripts, like Madlitics, won’t run inside the preview window—you’ll need to publish your site to see them in action.

Click Publish in the top right, then open the live URL of your page. Fill out the form as if you were a visitor and submit it. From there, check your form submissions inside Framer to confirm everything worked. You should now see attribution details—like channel, segments, and landing page—captured alongside the lead information.

That’s your signal that Madlitics is fully integrated and tracking is up and running.

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.

Framer gives you the freedom to design stunning, fully custom websites—and its form tools make it simple to connect rich marketing data behind the scenes. By integrating Madlitics with your Framer forms, attribution data is automatically captured at submission and passed along with each lead, giving your team clear, first-party insights inside your CRM and analytics tools.

If you have any questions or need help getting set up, our team is ready to support you. Reach out, and we’ll walk you through it.

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.