HubSpot Chat: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 16: | Line 16: | ||
</script> | </script> | ||
</pre> | </pre> | ||
*Note: may need to be put in DOM ready so it loads after the chat | |||
Latest revision as of 13:40, 31 August 2022
Tracking In Tag Manager
<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>
- Note: may need to be put in DOM ready so it loads after the chat