INTEGRATION GUIDE

Set up Leadlotus in minutes

One snippet. Hidden form fields. Full attribution in your dashboard. Works with every major platform and framework.

< 15KB
Snippet size
Gzipped, no dependencies
~5 min
Setup time
Any platform, any framework
15+ signals
Data captured
UTMs, referrer, sessions, intent
How it works
From first visit to full attribution
1
Snippet loads
Silent, instant, every page

The moment your page loads, the 15KB snippet silently reads the URL for UTM parameters, checks the document referrer, and classifies the traffic channel using a 10-rule engine — running entirely in the visitor's browser. No round-trips, no delay.

Reads utm_source, utm_medium, utm_campaign, utm_content, utm_term
Detects gclid / fbclid / msclkid for paid click IDs
Classifies into 9 channels: Organic Search, Paid Search, Paid Social, Email, Display, Affiliates, Referral, Direct, Other
Stores everything in localStorage under leadlotus_data — persists 365 days
Respects Do Not Track and fires nothing on first load
// URL on landing
?utm_source=google
&utm_medium=cpc
&utm_campaign=q2-brand
// Stored in localStorage
channel: "Paid Search"
drilldown1: "google"
landing: "/pricing"
firstVisit: "2026-04-13"
Step 1 of 4 — auto-advancing
Pick your platform
Step-by-step instructions for every major setup.
Plain HTML Easiest
Any static site with a standard HTML <form> tag. Works on GitHub Pages, plain HTML sites, any server-rendered page.
1
Paste the snippet before </body>
Add your unique Leadlotus snippet. It captures UTMs, referrer, and session data on every page load.
html
attr">class="cm"><!-- Leadlotus snippet — paste before attr">class="tag"></body> -->
attr">class="tag"><script attr">src="https:"attr">class="cm">//cdn.leadlotus.io/v1/ls.min.js"
  data-api-key="YOUR_API_KEY" async defer>attr">class="tag"></script>
2
Add hidden fields to your form
Leadlotus finds these fields automatically and fills them with attribution data on form submit.
html
attr">class="tag"><form attr">action="/submit" attr">method="POST">
  attr">class="tag"><input attr">type="text" attr">name="email" attr">placeholder="Work email" />

  attr">class="cm"><!-- Leadlotus hidden fields -->
  attr">class="tag"><input attr">type="hidden" attr">name="leadlotus-channel" />
  attr">class="tag"><input attr">type="hidden" attr">name="leadlotus-drilldown1" />
  attr">class="tag"><input attr">type="hidden" attr">name="leadlotus-drilldown2" />
  attr">class="tag"><input attr">type="hidden" attr">name="leadlotus-landing" />
  attr">class="tag"><input attr">type="hidden" attr">name="leadlotus-firstvisit" />

  attr">class="tag"><button attr">type="submit">Get startedattr">class="tag"></button>
attr">class="tag"></form>
3
Verify in your dashboard
Submit a test form and check the Leads tab — your lead should appear within seconds with channel data.
Tip: After integrating, submit a test form and check your Leads dashboard. Attribution data should appear within 3–5 seconds. If it doesn't, check that your API key matches and the snippet loaded (look for ls.min.js in your browser Network tab).
What Leadlotus captures
Every field explained — and where it ends up in your dashboard.
leadlotus-channel
Channel
e.g. "Organic Search"
Top-level traffic classification from our rules engine
leadlotus-drilldown1
Drill-Down 1
e.g. "google"
UTM source or referrer domain — e.g. google, linkedin, newsletter
leadlotus-drilldown2
Drill-Down 2
e.g. "cpc"
UTM medium — e.g. cpc, email, organic
leadlotus-drilldown3
Drill-Down 3
e.g. "q1-brand-campaign"
UTM campaign name
leadlotus-drilldown4
Drill-Down 4
e.g. "homepage-hero"
UTM content or term
leadlotus-landing
First Landing URL
e.g. "/pricing?utm_source=google"
Full URL of the first page the visitor landed on
leadlotus-firstVisit
First Visit Date
e.g. "2026-04-13"
ISO date of the very first visit (stored for 365 days)
leadlotus-conversionDays
Days to Convert
e.g. "12"
Days between first visit and form submission
leadlotus-visits
Visit Count
e.g. "4"
Total page-view sessions before conversion
leadlotus-device
Device Type
e.g. "desktop"
mobile, tablet, or desktop — inferred from user-agent
Privacy & compliance
Respects Do Not Track browser signal
No cross-site tracking — fires only on your domain
Data stored in visitor's own localStorage (not cookies)
GDPR-friendly: no PII stored client-side without consent
Only fires to our ingest API on actual form submit
Snippet is < 15KB — does not include any domain lists
All data deleted on request via dashboard or API
Classification rules run server-side — never exposed in bundle