Track Tawk.to Chats
Tawk.to is a free live chat application that lets you monitor and chat with visitors on your website. You can track Tawk.to chat conversations in WhatConverts by adding a small snippet of code to your existing Tawk.to widget script. This ensures that every time a chat session concludes, a lead is automatically generated in your dashboard.
Note: If you haven't added your WhatConverts tracking script to your website, add your tracking script. If you are using the WhatConverts WordPress Plugin, you will want to deactivate the plugin and place your WhatConverts Tracking Code above your Tawk.to tracking code.
Set Up Tawk.to Chat Tracking
To capture lead data from Tawk.to, you must modify your widget script to trigger a notification to WhatConverts when a chat ends.
Step 1: Locate Your Tawk.to Script
Locate the Tawk.to tracking code on your website. It should look similar to the example below:
<script type="text/javascript">
var Tawk_API = Tawk_API || {},
Tawk_LoadStart = new Date();
(function() {
var s1 = document.createElement("script"),
s0 = document.getElementsByTagName("script")[0];
s1.async = true;
s1.src = 'https://embed.tawk.to/YOUR_ID/default';
s1.charset = 'UTF-8';
s1.setAttribute('crossorigin', '*');
s0.parentNode.insertBefore(s1, s0);
})();
</script>
Step 2: Add the Tracking Snippet
Paste the following code into your Tawk.to tracking code, immediately before the closing </script> tag:
Tawk_API.onChatEnded = function() {
wc_chat_ypbib("Chat", "New Chat Session");
};
Your finalized Tawk.to widget code should now look like this:
<script type="text/javascript">
var Tawk_API = Tawk_API || {},
Tawk_LoadStart = new Date();
(function() {
var s1 = document.createElement("script"),
s0 = document.getElementsByTagName("script")[0];
s1.async = true;
s1.src = 'https://embed.tawk.to/YOUR_ID/default';
s1.charset = 'UTF-8';
s1.setAttribute('crossorigin', '*');
s0.parentNode.insertBefore(s1, s0);
})();
Tawk_API.onChatEnded = function() {
wc_chat_ypbib("Chat", "New Chat Session");
};
</script>
Tip: If you want to track the lead as soon as the chat begins rather than when it ends, you can change Tawk_API.onChatEnded to Tawk_API.onChatStarted. Note that this may trigger leads for visitors who do not respond to your chat initiation.
Related Topics
Get a FREE presentation of WhatConverts
One of our marketing experts will give you a full presentation of how WhatConverts can help you grow your business.
Schedule a Demo