Browse docs

Setup

Install the tracker

Drop a single <script> tag on your site. No config, no build step. Works on one domain or many.

The snippet

Every workspace gets its own install snippet. Grab yours from /install. It looks like this:

HTML
<script
  src="https://www.tryleadlens.com/track.js"
  data-key="ll_pub_xxxxxxxxxxxx"
  defer
></script>

Paste it inside <head> on every page you want to track. For most sites that means dropping it into the global template once and you're done.

What the tracker does

The tracker identifies a visitor when one of these is true:

  • They arrived via a tracked link (/l/<slug> on the LeadLens domain).
  • Their URL contains ?utm_lead=<email> — the merge-tag pattern used by campaign links. No redirect happens; the tracker exchanges the email server-side for a signed session token.
  • The visitor was already identified in a prior session on the same browser (the token cookie carries it forward).

If none of those match, the tracker either stays silent or — if you've turned on anonymous tracking — starts an anonymous session keyed off a random per-browser id.

Recording runs until they close the tab or the session hits its 60-minute hard cap.

The script is about 6 KB, loads with defer, and never blocks your page.

Configuring the lead parameter

The default param name is utm_lead. To use a different name (e.g. you already burn utm_email for something else), add a data-lead-param attribute:

HTML
<script
  src="https://www.tryleadlens.com/track.js"
  data-key="ll_pub_xxxxxxxxxxxx"
  data-lead-param="utm_email"
  defer
></script>

Now ?utm_email=jane@acme.com identifies the visitor just like ?utm_lead= would.

Platform notes

  1. WordPress

    Use a header-script plugin (WPCode, Insert Headers and Footers, anything similar) and paste the snippet into the Header section. Save, reload.

  2. Webflow

    Project settings → Custom code → Head code. Paste the snippet and publish.

  3. Shopify

    Online Store → Themes → Edit code → theme.liquid. Paste before </head> and save.

  4. Squarespace

    Settings → Advanced → Code injection → Header. Paste, save.

  5. Framer

    Site settings → General → Custom code → Start of <head> tag. Paste, publish.

  6. Plain HTML / static site

    Paste the snippet directly into the <head> of every page, or into your shared header template.