Skip to main content
The LeadTrackr LeadBot is a lightweight contact widget that sits in the bottom corner of your website. Visitors can send a message, call you directly, or start a WhatsApp conversation — and every lead lands in your LeadTrackr project with full attribution (channel flow, gclid, wbraid, fbc, fbp, and GA4 client ID).
  • One script tag — a single self-contained file (±13 KB gzip), no dependencies
  • No styling conflicts — renders inside a Shadow DOM, so your site’s CSS and the LeadBot never interfere
  • Compatible with the LeadTrackr tag — shares the same lt_channelflow cookie and lead format, so the LeadBot and the GTM tag can run side by side
  • Multilingual — follows your page’s lang attribute (nl/en, falls back to English)
  • Fully themeable — every color can match your brand through configuration

Step 1: Find your project ID

  1. Go to app.leadtrackr.io/dashboard/projects
  2. Open the project you want to connect
  3. Your project ID is visible in the URL
    • Example: https://app.leadtrackr.io/projects/16 → project ID = 16

Step 2: Add the LeadBot to your website

  1. Go to Tags and click New
  2. Select Custom HTML as the tag type
  3. Paste the snippet below and fill in your details
  4. Set the trigger to All Pages
  5. Preview, then publish your container
Keep the configuration block above the script tag — the LeadBot reads it once on load.

Option B: Directly in your site

Paste the same snippet just before the closing </body> tag of your site template. This works on any platform (WordPress, Webflow, Shopify, custom builds).

Step 3: Test your setup

  1. Open your website — the launcher with your agent photo appears in the bottom-right corner
  2. Send a test message through the contact form and the WhatsApp flow
  3. Check your LeadTrackr project: both test leads appear with their attribution data
  4. Optional: open GTM preview mode and confirm the leadtrackr_leadbot_* events fire in the dataLayer

Configuration reference

All options go in window.ltLeadBotConfig:
When agentName is set, the LeadBot speaks in first person (“How can I help you?”). Without an agent it uses “we” instead.

Theme

Match the LeadBot to any brand by overriding colors:
The WhatsApp chat view deliberately keeps its authentic WhatsApp look regardless of your theme.

Language

The LeadBot reads the lang attribute of your page (<html lang="nl"> shows Dutch, <html lang="en"> shows English) and falls back to English for missing or unsupported languages. Every visible string can be overridden through the texts object.

Call tracking integration

If you use LeadTrackr call tracking (dynamic number insertion), the regular swap script cannot reach inside the LeadBot’s Shadow DOM. Set callTracking: true and the LeadBot reads the dynamic number from the call tracking cookie itself, for both the displayed number and the tel: link:
  • The number is read on every render, so it also works when the cookie is set after page load
  • Without a valid cookie the LeadBot falls back to the configured phone; without either, the call channel is hidden
  • Multiple swap groups: callTracking: { swapGroup: 1 }
With callTracking: true, a click on the call channel does not push a conversion event — call tracking measures the actual call, so a click conversion would double count.

dataLayer events

The LeadBot pushes three events, always flat — only event, channel, and user_data:
Use leadtrackr_leadbot_conversion as the trigger for your GA4, Google Ads, or Meta tags. The user_data object is ready for enhanced conversions and advanced matching.
Do not trigger a LeadTrackr lead tag on leadtrackr_leadbot_conversion events. The LeadBot already delivers every lead to your project — an extra tag would create duplicates.

How the WhatsApp flow works

  1. The visitor types a message in a WhatsApp-style chat
  2. The visitor enters the phone number they want to start the conversation with (full international country list)
  3. The lead is stored in your LeadTrackr project first
  4. WhatsApp opens in a new tab with the message prefilled — the visitor sends it there to start the conversation
You capture the lead and its attribution even if the visitor never sends the WhatsApp message.

Versions

The snippet above uses @1, which automatically serves the latest release. Updates propagate through the CDN within about 12 hours; returning visitors may hold a cached version for up to 7 days. If you prefer exact control, pin a specific version and update it manually:
Releases and source code live at github.com/leadtrackr/leadtrackr-leadbot.

Troubleshooting

The LeadBot does not appear. Check the browser console: [LeadTrackr LeadBot] data-project-id ontbreekt means no projectId was found. Make sure it is set in ltLeadBotConfig and the config block sits above the script tag. A channel is missing. The call channel only shows with a phone number (or callTracking enabled), and the WhatsApp channel only with a whatsapp number. You seem to load an old version. Open DevTools → Network, click lt-leadbot.min.js, and check the x-jsd-version response header. Hard refresh (Cmd/Ctrl+Shift+R) to bypass browser cache, or pin the latest version in the URL. Call tracking number is not swapped. Run this in the console on your site:
An empty result means call tracking is not active on that page. Also confirm callTracking: true is set in your configuration.

What’s next?

Set up Channel Flow Tracker

Track the full user journey with UTM parameters

Connect conversion destinations

Push qualified leads to Google Ads, GA4, and Meta