Support

Install Madlitics on a Website

How to add the Madlitics install snippet to a website (custom, react, ruby, etc.)
Start capturing attribution →
Attribution is broken
Automation icon indicating hands-free marketing attribution and data flow.
Analytics report icon, indicating data insights and reporting.
Impact measurement icon, symbolizing marketing effectiveness.
Personalization icon, representing customization features.

Not every site is built on a platform like Webflow, Framer, or WordPress. Many teams use custom codebases — whether that’s a simple HTML site or a full React or Rails app. The good news is that Madlitics works the same way across all of them: you just need to place the snippet in the right spot inside your site’s <head> tag.

In this guide, we’ll start by creating your Madlitics account and grabbing your unique installation snippet. Then we’ll show you how to drop it into your code so it loads across every page as soon as the browser renders it.

Prerequisite: Before you can install Madlitics, you’ll need to create a Madlitics account. Registration unlocks your dashboard, and copy the code snippet that powers attribution. This step only takes a minute and ensures you have everything ready before moving on to the platform-specific setup.

Step 1. Create your Madlitics account
Sign up for a free trial on the Madlitics website to get started. Creating an account unlocks your dashboard, where you’ll manage your sites, view analytics, and access the code snippet you’ll need to install.

Start by signing up for a free Madlitics trial to begin capturing attribution data.

Fill out the registration form to create your account and unlock your dashboard

Step 2: Access your installation snippet
Once you’ve registered and logged in, you’ll land in your dashboard’s Get Started section. Here, you’ll find your unique Madlitics installation snippet, which is required to enable tracking on your site.

Locate your unique installation snippet in the dashboard under Get Started › Step 1 › 'Copy', Madlitics install snippet.

Step 3: Add the Madlitics install snippet to the <head> of every page
Open your project in a code editor like VS Code, Sublime Text, or Notepad++. In your file (or your app’s base template), find the <head> section. Paste your Madlitics snippet just before the closing </head> tag so it is part of every page. This allows Madlitics to track parameters across any pages your customers visit.

This sample shows where to place the Madlitics snippet in a custom HTML file. It should be inserted just before the closing </head> tag to ensure it loads across your site.


✅ Important: The Madlitics snippet must be added to every page of your site, either manually or through a shared layout template. This ensures that every visitor interaction, from the first pageview to final form submission, is captured accurately for full-funnel attribution. Without full-page coverage, attribution data may be incomplete or lost between visits.

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.
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.
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.
Graph showing new customer growth from TikTok, Instagram, Snapchat, and Google over time, with social media icons surrounding the chart and a callout for social revenue impact.

Verify and test installation
After pasting in your snippet, save your HTML file and open it in a browser (Chrome, Firefox, Safari, etc.). Right-click and choose Inspect, or press Cmd + Option + I (Mac) or Ctrl + Shift + I (Windows). In the Elements tab, scroll up to the <head> section and make sure your Madlitics snippet is there. If you see it in place, you’re good to go!

Best Practices
• Always place critical scripts in the <head>, especially if they’re responsible for capturing page views or initializing other scripts.
• Avoid duplicate snippets—make sure the script is included only once on each page.
• Test locally and live—some scripts only function when served over a live domain.

Next: Configuring your forms to capture marketing attribution:

• Configure Hubspot forms
• Configure Tally
• Configure Active Campaign
• Configure Typeforms
• Configure Jotform
• Configure Zoho Forms
• Configure Formstack

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.
Stacked bar chart illustrating lead volume across different marketing campaigns, including Black Friday, Retargeted, Spring Promo, Referral, and SEO. Highlights trends in campaign effectiveness.
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.

By adding the snippet directly into your codebase, Madlitics will run site-wide—capturing attribution data for every visitor. Whether you’re working with a static HTML site or a framework like React, Vue, or Rails, the approach is the same: drop the snippet in your <head>, publish or deploy your site, and let Madlitics handle the attribution.

If you run into any issues or need help verifying your setup, our team is here to assist. Reach out to support and we’ll help you get everything working smoothly.

Related articles to get you started with Madlitics

Frequently asked questions

Answers to your top questions about our UTM parameters
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.