Hubspot Livechat on Google Tag Manager

@gabrielxyzmkt got it working yesterday, here you go :slightly_smiling_face:

<script type="text/javascript">
 function onConversationsAPIReady() {
 //console.log("HubSpot Conversations API Available");
 window.HubSpotConversations.on( 'conversationStarted', function( payload ) {
 //console.log("HubSpot Conversation Started");
 window.dataLayer.push({
 'event': 'hubspot-conversation-started',
 'hs-conversation-id': payload.conversation.conversationId
 })
 });
 }
 /*
 If external API methods are already available, use them.
 */
 if (window.HubSpotConversations) {
 onConversationsAPIReady();
 } else {
 /*
 Otherwise, callbacks can be added to the hsConversationsOnReady on the window object.
 These callbacks will be called once the external API has been initialized.
 */
 window.hsConversationsOnReady = [onConversationsAPIReady];
 }
 </script>