APIs & Integrations

yudhi_hamzah
メンバー

Hubspot Livechat on Google Tag Manager

解決

Hi,

I have been trying to track Hubspot Livechat on Google Tag Manager (GTM). More specifically people who are coming from Google Ads then click the Livechat.

Is there any way to do that? I asked Hubspot Support, but apparently there is no way to do that from Hubspot.

Thank you in advance.

3件の承認済みベストアンサー
IsaacTakushi
解決策
HubSpot Employee
HubSpot Employee

Hubspot Livechat on Google Tag Manager

解決

Hi, @Pier.

 

Since this discussion was last active, we released a Conversations Live Chat Widget API. The features include these widget events, which you could use to trigger a Google Tag Manager event.

 

For example, the following script would listen for the start of a chat and trigger a GTM event named hs_chat_started.

 

 

window.HubSpotConversations.on('conversationStarted', payload => {
  dataLayer.push({'event': 'hs_chat_started'});
});

 

 

Isaac Takushi

Associate Certification Manager

元の投稿で解決策を見る

stuartbrameld
解決策
参加者

Hubspot Livechat on Google Tag Manager

解決

@gabrielxyzmkt got it working yesterday, here you go 🙂

 

<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>

元の投稿で解決策を見る

Djones
解決策
参加者

Hubspot Livechat on Google Tag Manager

解決

I wrote a step by step guide with screenshots on how I track Hubspot live chat with Google Tag Manager

元の投稿で解決策を見る

50件の返信
Djones
解決策
参加者

Hubspot Livechat on Google Tag Manager

解決

I wrote a step by step guide with screenshots on how I track Hubspot live chat with Google Tag Manager

AlexHutson
投稿者 | Solutions Partner
投稿者 | Solutions Partner

Hubspot Livechat on Google Tag Manager

解決

Hi Dillon,

 

Thanks for the great guide! 🙂

 

Would you be able to provide an updated version to use with GTM and GA4 please?

 

That would be soooo helpful!

 

Thanks,

 

Alex

kmhwebtech
メンバー

Hubspot Livechat on Google Tag Manager

解決

Hi, do you have updated steps for GA4? seems there some difference specially on step 4. Thanks btw for this. Big help.ga4 hubspot chat engagement.png

acgorecki
参加者

Hubspot Livechat on Google Tag Manager

解決
Updated. Thanks for catching that!
0 いいね!
KKJ9
メンバー

Hubspot Livechat on Google Tag Manager

解決

Hi, Do you have any guide to connect live chat with GTM & GA4

0 いいね!
acgorecki
参加者

Hubspot Livechat on Google Tag Manager

解決
I've created a GTM recipe that lets you track Hubspot Livechat in GA4. You
can find it on our website:
https://intigress.com/blog/digital-marketing/track-hubspot-live-chat

If you have any questions, please feel free to reach out.
0 いいね!
KKJ9
メンバー

Hubspot Livechat on Google Tag Manager

解決

Thank you so much for the update 🙂

0 いいね!
Jaycee_Lewis
コミュニティーマネージャー
コミュニティーマネージャー

Hubspot Livechat on Google Tag Manager

解決

Hey, @Djones 👋 Thanks for sharing your guide! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 いいね!
MariZanchetta
投稿者

Hubspot Livechat on Google Tag Manager

解決

Hi, I wanted to share that I have used the API recipe from @acgorecki  (link is his comment) and added it into GTM, and it works!! Thank you very much for this @acgorecki , I am now able to track conversations that have started as a goal in GA.

0 いいね!
acgorecki
参加者

Hubspot Livechat on Google Tag Manager

解決

@MariZanchetta, I'm glad you found it helpful and were able to get it to work for you.

0 いいね!
ogranadino
参加者

Hubspot Livechat on Google Tag Manager

解決

Hi @IsaacTakushi I have same issue. I neet to count a conversion in google ads when the lead completes some chat bot questions. 

Can I do that using the snippet event or a webhook event in the bot flow to load the google conversion code?

 

Best,

 

0 いいね!
AMandel
参加者

Hubspot Livechat on Google Tag Manager

解決

I have the same question
If anybody can share step by step template on how the did it

MariZanchetta
投稿者

Hubspot Livechat on Google Tag Manager

解決

Same as @DDemagistris here, @IsaacTakushi . How can I track Hubspot chats that came from paid campaigns and organic search? I need to measure this.

DDemagistris
参加者

Hubspot Livechat on Google Tag Manager

解決

@IsaacTakushi can you help me with this? My end goal is to count a Hubspot chat as a conversion in google ads and google analytics. 

IsaacTakushi
HubSpot Employee
HubSpot Employee

Hubspot Livechat on Google Tag Manager

解決

Thanks for the update, @yudhi.hamzah,

In that case, I don't know of a way to track clicks which open the live chat widget. hubspot-messages-iframe-container is one of the few div elements outside the iframe.

I certainly see value in tracking custom interactions with the live chat tool, however. I recommend upvoting and commenting on this HubSpot Community Idea and any other topics which match your use case to help them become realities.

This information is sent directly to our Product team and helps prioritize feature requests that have the greatest impact on our customers. I’ve already upvoted the idea and will also do my part and pass your feedback along through internal channels.

Isaac Takushi

Associate Certification Manager
0 いいね!
Pier
参加者

Hubspot Livechat on Google Tag Manager

解決

Hi @IsaacTakushi

 

I would like to know if there are updates on a way to track the chat with Google Tag Manager. Unfortunately, the only solution indicated does not work.

 

Thanks.

Pier

 

0 いいね!
IsaacTakushi
解決策
HubSpot Employee
HubSpot Employee

Hubspot Livechat on Google Tag Manager

解決

Hi, @Pier.

 

Since this discussion was last active, we released a Conversations Live Chat Widget API. The features include these widget events, which you could use to trigger a Google Tag Manager event.

 

For example, the following script would listen for the start of a chat and trigger a GTM event named hs_chat_started.

 

 

window.HubSpotConversations.on('conversationStarted', payload => {
  dataLayer.push({'event': 'hs_chat_started'});
});

 

 

Isaac Takushi

Associate Certification Manager
acgorecki
参加者

Hubspot Livechat on Google Tag Manager

解決

In case you find it helpful, I created a Google Tag Manager (GTM) recipe to track the Hubspot Live Chat Conversation API events in Google Analytics 4 and Universal Analytics. Check it out.

AMandel
参加者

Hubspot Livechat on Google Tag Manager

解決

Can you please specify how this works in google tag manager?

0 いいね!
Severin
メンバー

Hubspot Livechat on Google Tag Manager

解決

Hi, @IsaacTakushi 

 

What would the event script be if we wanted to track the email submission of a chat engagement in GTM? 

 

Thanks,

 

Severin

0 いいね!