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_channelflowcookie and lead format, so the LeadBot and the GTM tag can run side by side - Multilingual — follows your page’s
langattribute (nl/en, falls back to English) - Fully themeable — every color can match your brand through configuration
Step 1: Find your project ID
- Go to app.leadtrackr.io/dashboard/projects
- Open the project you want to connect
- Your project ID is visible in the URL
- Example:
https://app.leadtrackr.io/projects/16→ project ID =16
- Example:
Step 2: Add the LeadBot to your website
Option A: Google Tag Manager (recommended)
- Go to Tags and click New
- Select Custom HTML as the tag type
- Paste the snippet below and fill in your details
- Set the trigger to All Pages
- 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
- Open your website — the launcher with your agent photo appears in the bottom-right corner
- Send a test message through the contact form and the WhatsApp flow
- Check your LeadTrackr project: both test leads appear with their attribution data
- Optional: open GTM preview mode and confirm the
leadtrackr_leadbot_*events fire in the dataLayer
Configuration reference
All options go inwindow.ltLeadBotConfig:
Theme
Match the LeadBot to any brand by overriding colors:Language
The LeadBot reads thelang 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. SetcallTracking: 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 — onlyevent, channel, and user_data:
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.
How the WhatsApp flow works
- The visitor types a message in a WhatsApp-style chat
- The visitor enters the phone number they want to start the conversation with (full international country list)
- The lead is stored in your LeadTrackr project first
- WhatsApp opens in a new tab with the message prefilled — the visitor sends it there to start the conversation
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:
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:
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