HubSpot Chat: Difference between revisions
Jump to navigation
Jump to search
Created blank page |
No edit summary |
||
| Line 1: | Line 1: | ||
== Tracking In Tag Manager == | |||
LiveChat has an API for tracking.<br /> | |||
https://developers.livechat.com/docs/extending-chat-widget/<br /> | |||
this has NOT been tested yet!<br /> | |||
<pre> | |||
<script type="text/javascript"> | |||
window.addEventListener("load", function(){ | |||
window.HubSpotConversations.on('conversationStarted', function(payload){ | |||
// ga('send', 'event', 'Beacon', 'chat-started', 'Hubspot'); | |||
window.dataLayer.push({ | |||
'event': 'hubspot-chat-started', | |||
'hs-chat-id': payload.conversation.conversationId | |||
}); | |||
}); | |||
}); | |||
</script> | |||
</pre> | |||
Revision as of 13:22, 31 August 2022
Tracking In Tag Manager
LiveChat has an API for tracking.
https://developers.livechat.com/docs/extending-chat-widget/
this has NOT been tested yet!
<script type="text/javascript">
window.addEventListener("load", function(){
window.HubSpotConversations.on('conversationStarted', function(payload){
// ga('send', 'event', 'Beacon', 'chat-started', 'Hubspot');
window.dataLayer.push({
'event': 'hubspot-chat-started',
'hs-chat-id': payload.conversation.conversationId
});
});
});
</script>