Skip to main content

Web Tracking

Tools โ†’ Web Tracking (also accessible from Forms โ†’ Tracking) manages tracking snippets that you embed on your website. Once installed, LeadHub records which pages a lead has visited โ€” visible on the lead's detail page under the Activity timeline.


How Web Tracking Worksโ€‹

  1. You create a tracking snippet and get a JavaScript code.
  2. You embed the code on your website (all pages, or specific pages).
  3. When a known lead visits your site, LeadHub records the page URL and timestamp.
  4. The visit appears on the lead's Activity tab: "Visited /pricing at 14:32".

Tracking is cookieless and identity-based โ€” it only records visits for leads already in LeadHub (matched by email or a known session token from a form submission).


Creating a Tracking Snippetโ€‹

  1. Go to Tools โ†’ Web Tracking.

  2. Click New Tracking Snippet.

  3. Fill in:

    FieldDescription
    NameInternal label (e.g. "Main Website")
    DomainsComma-separated list of domains this snippet is valid for (e.g. yourdomain.com, www.yourdomain.com)
  4. Save โ€” a unique JavaScript snippet is generated.


Installing the Snippetโ€‹

Copy the snippet and paste it into the <head> of your website โ€” on every page you want to track:

<script>
(function(w,d,s,t){
w.LeadHubTrack=t;
var n=d.createElement(s);
n.async=1;
n.src='https://yourdomain.com/tracker.js?tid=YOUR_TOKEN';
d.head.appendChild(n);
})(window,document,'script','lht');
</script>

CMS-specific instructions:

  • WordPress: Paste into the theme's header.php or use a plugin like Insert Headers and Footers
  • Shopify: Paste into theme.liquid before </head>
  • Webflow: Site Settings โ†’ Custom Code โ†’ Head Code
  • Squarespace: Settings โ†’ Advanced โ†’ Code Injection โ†’ Header

Viewing Tracking Dataโ€‹

Go to any lead's detail view โ†’ Activity tab. Page views appear as events:

  • "Visited /pricing"
  • "Visited /contact"
  • "Visited /blog/post-title"

The Lead Detail โ†’ Page Views tab shows a full list of all recorded visits for that lead with timestamps.


Notesโ€‹

  • Tracking only works for identified leads (those who submitted a form). Anonymous visitors are not tracked.
  • No cookies are set โ€” tracking uses the form session token to identify returning visitors.
  • GDPR: Page view data is stored as part of the lead record and is included in data exports. Include web tracking disclosure in your privacy policy.