Integrations / Custom HTML / JS
Custom HTML / JS logo
Website Builders

LeadLotus + Custom HTML / JS

Works with any HTML form on any website.

If your site has a <form> tag, LeadLotus works. The snippet captures every visitor's UTMs, referrer, and landing page, then auto-fills hidden inputs on submit — no plugin, framework, or platform required.

How to set it up

1
Drop the snippet in <head>
Add this single 15KB script before </head>. It starts capturing attribution data on the next page load.
<!-- LeadLotus Attribution Snippet -->
<script async
  src="https://www.leadlotus.com/snippet.js?key=YOUR_API_KEY"
  data-key="YOUR_API_KEY"
  data-endpoint="https://www.leadlotus.com/api/v1/ingest">
</script>
2
Add hidden inputs to any form
Use these exact names. LeadLotus finds the inputs by name and fills them just before submit.
<input type="hidden" name="leadlotus-channel" />
<input type="hidden" name="leadlotus-drilldown1" />
<input type="hidden" name="leadlotus-drilldown2" />
<input type="hidden" name="leadlotus-drilldown3" />
<input type="hidden" name="leadlotus-drilldown4" />
<input type="hidden" name="leadlotus-landing-url" />
<input type="hidden" name="leadlotus-first-visit" />
<input type="hidden" name="leadlotus-visits" />
3
Send the form anywhere
Submit to your own backend, a webhook, Zapier, an email service — wherever. The hidden values travel with the rest of the form data automatically.

Attribution fields

LeadLotus writes these hidden field values just before your form submits.

Field nameExample valueDescription
leadlotus-channelOrganic SearchTop-level channel (Organic Search, Paid Social, Direct, Referral, etc.)
leadlotus-drilldown1GoogleChannel-specific source (search engine, social network, or utm_source)
leadlotus-drilldown2spring_launchutm_campaign on paid traffic, referring host on organic
leadlotus-drilldown3pricing_keywordutm_term — keyword or ad term, when present
leadlotus-drilldown4hero_ctautm_content — ad variant or placement, when present
leadlotus-landing-url/pricingFirst landing page of the visitor
leadlotus-first-visit2026-04-24Date of the first visit (ISO)
leadlotus-visits3Total sessions before conversion