Conversion tracking
What the Leadux widget sends to Google Tag Manager, GA4 and the Meta Pixel when it wins a lead, and how to count each lead exactly once.
When the assistant wins a lead, the widget fires a conversion event called Leadux into the analytics already on your website. Google Ads, GA4 and Meta can then count chat leads like any other conversion, and your campaigns can optimise for them. You don't need to set anything up in Leadux for this.
When the event fires
The Leadux event fires once, the first time a conversation becomes a lead. That happens when the visitor:
- shares an email address or phone number in the chat (a name alone isn’t enough),
- sends the contact form, or
- fills in the contact fields before following your online booking link.
Details the visitor adds later update the same lead, but don't fire the event again. The widget also remembers that it fired for the rest of the browser session (until the visitor closes the tab), so one visitor counts once even if they start a second conversation.
What the widget sends
At that moment the widget sends the event to whichever of these it finds on the page:
| Destination | Condition | What is sent |
|---|---|---|
| Google Tag Manager data layer | window.dataLayer exists |
dataLayer.push({ event: 'Leadux', leadux_conversation_id, leadux_event_id }) |
| Google tag (gtag.js) | window.gtag exists |
gtag('event', 'Leadux', { leadux_conversation_id, leadux_event_id, event_id }) |
| Meta Pixel | window.fbq exists |
fbq('trackCustom', 'Leadux', { conversation_id }, { eventID }) |
The event name is Leadux, with a capital L. Tag Manager triggers are case-sensitive.
leadux_conversation_ididentifies the conversation in Leadux.leadux_event_id(andevent_id,eventID) is a unique ID for this lead. The server-side events carry the same ID, so Meta can merge the browser and server event into one conversion. You can also pass it to Google Ads as the transaction ID.
Nothing reaches Google Ads directly. To count leads in Google Ads, add a conversion tag in Google Tag Manager that fires on the Leadux event. See Google Tag Manager.
Booking clicks
When a visitor opens one of your online booking links from the chat, the widget fires a separate event, once per conversation:
dataLayer.push({ event: 'leadux_booking_click', leadux_conversation_id, leadux_booking_location })gtag('event', 'leadux_booking_click', { leadux_conversation_id, leadux_booking_location })fbq('trackCustom', 'leadux_booking_click', { conversation_id, location })
leadux_booking_location is the name you gave the booking link, for example the name of a location. A booking click is not a lead. If the visitor filled in contact fields before the link opened, those details become a lead and fire their own Leadux event.
Avoid counting leads twice
The widget sends to every destination it finds. If you then add a tag for the same destination, you count each lead twice. The most common case:
- Your website loads the Google tag (gtag.js) directly, so the widget already sends
Leaduxto GA4. - You also add a GA4 event tag in Google Tag Manager on the
Leaduxtrigger. - GA4 now records two
Leaduxevents for every lead.
The same applies to the Meta Pixel: if the pixel is on the page, however it is loaded, the widget already sends the event to Meta.
Before you add any tag, check what already arrives:
- Leave a test lead on your website: open the chat and give a name and a test email address.
- In GA4, open Reports → Realtime and look for
Leaduxunder event names. - In Meta Events Manager, open your pixel and check Test events for
Leadux.
Add a tag only for the destinations where the event doesn't arrive. Delete the test lead in Leadux afterwards.
Note: The widget can only use the tags that are on the page when the lead is won. If your cookie banner blocks Google or Meta until the visitor agrees, no event reaches them for visitors who declined.
Related
Last updated . Questions? Write to support@leadux.com.