The TailorTalk chat widget and WhatsApp widget send their clicks and messages to the Google and Meta tags already on your website. You don't need to add any extra scripts. Each time a visitor clicks the widget or sends a message, the event goes to your Google tag or Google Tag Manager and to your Meta Pixel. You can then mark these events as conversions in Google Ads and Meta campaigns.
| Event | Widget | When it fires | How often |
|---|---|---|---|
tailortalk_widget_click | Chat and WhatsApp | A visitor clicks the widget button. | Every click |
tailortalk_message_sent | Chat | A visitor sends a message in the chat. | Every message |
tailortalk_message_sent | A visitor is taken to WhatsApp to start the chat. | Every time | |
whatsapp_click | A visitor starts a WhatsApp chat. Sent to Meta as the standard Contact event. | Once per visitor session |
Every event includes these parameters:
| Parameter | Description |
|---|---|
widget | chat or whatsapp |
agent_id | Your TailorTalk agent ID |
first_message | Only on tailortalk_message_sent. true for the visitor's first message in the session, false after that. |
Which event should be my conversion?
whatsapp_click (in Meta, the Contact event). It counts each visitor once per session, so repeat clicks don't inflate your conversions.tailortalk_message_sent where first_message is true. It counts a visitor once, when they start a conversation.| Your website has | What TailorTalk sends |
|---|---|
| Google Tag Manager | Each event is pushed to the dataLayer under its event name. |
| Google tag (GA4 or Google Ads), without Google Tag Manager | gtag('event', ...) with the event name. |
| Meta Pixel | fbq('trackCustom', ...) with the event name. whatsapp_click is sent as fbq('track', 'Contact'). |
If your site has both Google Tag Manager and the Google tag, the events go to Google Tag Manager only, so GA4 never counts the same click twice.
whatsapp_click) appears there, which can take up to 24 hours.whatsapp_click (or tailortalk_message_sent).first_message equals true if you only want to count a visitor's first message. To use first_message in a trigger condition, first create a Data Layer Variable for it.To fire a Google Ads conversion directly when a visitor starts a WhatsApp chat, add your conversion ID and label to the WhatsApp widget code:
window.TailorTalkWhatsApp.init({
// ...your existing settings
googleAdsConversion: "AW-123456789/AbCdEfGhIj"
});
You can find the conversion ID and label in Google Ads under Goals → Conversions → your conversion action → Tag setup → Use Google tag. This works when the Google tag is on your site without Google Tag Manager.
tailortalk_message_sent event (add the rule first_message equals true to count first messages only), then choose it in your campaign.dataLayer.Clicks made while you preview the widget in the TailorTalk dashboard are never reported.
Each event is also dispatched on the page window under the same name, so any other tool can listen for it:
window.addEventListener("tailortalk_message_sent", function (event) {
console.log(event.detail); // { widget: "chat", agent_id: "...", first_message: true }
});
To stop the widget from sending events to your tags, add conversionTracking: false to the widget code:
TailorTalk.init({
// ...your existing settings
conversionTracking: false
});
For the WhatsApp widget, add the same setting to window.TailorTalkWhatsApp.init({ ... }).