<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HubSpot Chat &amp;amp; Google Analytics Event Tracking in Reporting &amp; Analytics</title>
    <link>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/649597#M3417</link>
    <description>&lt;P&gt;Thanks for sharing,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/105311"&gt;@Djones&lt;/a&gt;!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2022 19:15:10 GMT</pubDate>
    <dc:creator>kvlschaefer</dc:creator>
    <dc:date>2022-06-14T19:15:10Z</dc:date>
    <item>
      <title>HubSpot Chat &amp; Google Analytics Event Tracking</title>
      <link>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/370205#M1913</link>
      <description>&lt;P&gt;I've used both snippets below to push a GA event whenever a conversation is started, but neither seem to work. Can anyone tell me what I'm doing wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;//Option A
&amp;lt;script type="text/javascript"&amp;gt;
   window.HubSpotConversations.on('conversationStarted', payload =&amp;gt; { ga('send', 'event', 'Beacon', 'chat-started', 'Hubspot'); });
&amp;lt;/script&amp;gt;

//Option B
&amp;lt;script type="text/javascript"&amp;gt;
window.HubSpotConversations.on('conversationStarted', function(payload){ ga('send', 'event', 'Beacon', 'chat-started', 'Hubspot'); });
&amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 22:43:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/370205#M1913</guid>
      <dc:creator>jamesthrasher</dc:creator>
      <dc:date>2020-09-14T22:43:52Z</dc:date>
    </item>
    <item>
      <title>Betreff: HubSpot Chat &amp; Google Analytics Event Tracking</title>
      <link>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/370279#M1914</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/674"&gt;@jamesthrasher&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out.&lt;/P&gt;
&lt;P&gt;I want to tag in some subject matter experts to see if they can assist with this.&lt;/P&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/2599"&gt;@derekcavaliero&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259"&gt;@Mike_Eastwood&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/65830"&gt;@MikeCormack&lt;/a&gt;, would you be able to share your thoughts with&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/674"&gt;@jamesthrasher&lt;/a&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Jess&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 09:06:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/370279#M1914</guid>
      <dc:creator>JessicaH</dc:creator>
      <dc:date>2020-09-15T09:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Chat &amp; Google Analytics Event Tracking</title>
      <link>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/371784#M1925</link>
      <description>&lt;P&gt;Sorry for the delayed reaction&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/674"&gt;@jamesthrasher&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you see any errors in your browser's inspector when the page loads?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you able to share (by direct message) a link to the page you're testing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or ,did you work it out already?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 16:35:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/371784#M1925</guid>
      <dc:creator>Mike_Eastwood</dc:creator>
      <dc:date>2020-09-18T16:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Chat &amp; Google Analytics Event Tracking</title>
      <link>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/371863#M1929</link>
      <description>&lt;P&gt;Looks to me like the HubSpot Javascript is loading after your Javascript fires.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, James added the On Load Event Listener so the Javascript fired after everything loaded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;script type="text/javascript"&amp;gt;
window.addEventListener("load", function(){
   window.HubSpotConversations.on('conversationStarted', payload =&amp;gt; { ga('send', 'event', 'Beacon', 'chat-started', 'Hubspot'); });
});
&amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;Notice the line:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;window.addEventListener("load", function(){&lt;/LI-CODE&gt;
&lt;P&gt;and it's closed with&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;});&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have fun&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 21:16:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/371863#M1929</guid>
      <dc:creator>Mike_Eastwood</dc:creator>
      <dc:date>2020-09-18T21:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Chat &amp; Google Analytics Event Tracking</title>
      <link>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/371895#M1931</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to tag the chat with tag manager but when I add your script I get and error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hay un error en la línea 3, carácter 58: This language feature is only supported for ECMASCRIPT6 mode or better: arrow function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;---&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Do you know how to solve it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Sat, 19 Sep 2020 07:08:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/371895#M1931</guid>
      <dc:creator>Rortega</dc:creator>
      <dc:date>2020-09-19T07:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Chat &amp; Google Analytics Event Tracking</title>
      <link>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/447641#M2582</link>
      <description>&lt;P&gt;I got the same issue. Did you ever find a fix?&lt;BR /&gt;The closest related issues i can find is here but their fix does not work on the above code.&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/48922855/javascript-compiler-error-in-google-tag-manager-this-language-feature-is-only-s" target="_blank"&gt;https://stackoverflow.com/questions/48922855/javascript-compiler-error-in-google-tag-manager-this-language-feature-is-only-s&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 16:55:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/447641#M2582</guid>
      <dc:creator>AORourke</dc:creator>
      <dc:date>2021-06-15T16:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Chat &amp; Google Analytics Event Tracking</title>
      <link>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/455295#M2606</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/199114"&gt;@AORourke&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/145942"&gt;@Rortega&lt;/a&gt;&amp;nbsp;you can't use arrow functions (and other ECMA6 features) in JS that you use in GTM.&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259"&gt;@Mike_Eastwood&lt;/a&gt;'s code was to put on your site to send an event straight to GA. To add it in GTM instead, change Mike's code to remove the arrow function, and also you would have to change the ga() call as that wouldn't work in GTM. Maybe make it a custom HTML tag that pushes a custom event to the dataLayer that you can then use as a trigger for to fire a GTM event that will send event data to GA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;&amp;lt;script type="text/javascript"&amp;gt;
  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
		});
	});
  });
&amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 14:24:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/455295#M2606</guid>
      <dc:creator>piersg</dc:creator>
      <dc:date>2021-07-06T14:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Chat &amp; Google Analytics Event Tracking</title>
      <link>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/455299#M2607</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 13:56:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/455299#M2607</guid>
      <dc:creator>AORourke</dc:creator>
      <dc:date>2021-07-06T13:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Chat &amp; Google Analytics Event Tracking</title>
      <link>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/608926#M3191</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we also ran into some issues regarding the chat widget and tracking our conversions.&lt;/P&gt;&lt;P&gt;Our problem was, that we were using a CookieManager to fulfill German/EU DSGVO...&lt;BR /&gt;We found a solution where we first checked for the CookieConsent and later added the eventListeners for the widget, when ready. We wrote everything down in a small article:&lt;BR /&gt;&lt;BR /&gt;English:&lt;BR /&gt;&lt;A href="https://www.exwe.de/en/news/web-development/googleanalytics-hubspot-chat-tracking-with-cookiemanager/" target="_blank" rel="noopener"&gt;https://www.exwe.de/en/news/web-development/googleanalytics-hubspot-chat-tracking-with-cookiemanager/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Deutsch:&lt;BR /&gt;&lt;A href="https://www.exwe.de/de/news/web-entwicklung/googleanalytics-hubspot-chat-tracking-mit-cookiemanager/" target="_blank" rel="noopener"&gt;https://www.exwe.de/de/news/web-entwicklung/googleanalytics-hubspot-chat-tracking-mit-cookiemanager/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The main trick is to check the status:&lt;/P&gt;&lt;PRE&gt;              if (window.HubSpotConversations) {
                console.log('hubspot chat already running'); 
                onConversationsAPIReady();
              } else {
                console.log('hubspot chat awaiting'); 
                window.hsConversationsOnReady = [onConversationsAPIReady];
              } &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 08:50:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/608926#M3191</guid>
      <dc:creator>EXWE-GmbH</dc:creator>
      <dc:date>2022-04-06T08:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Chat &amp; Google Analytics Event Tracking</title>
      <link>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/649000#M3410</link>
      <description>&lt;P&gt;Hoping this helps someone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;I wrote an article here that breaks down how I &lt;A href="https://medium.com/@dillonjones/track-hubspot-chats-in-google-analytics-4-simple-steps-4d799e6469c4" target="_blank" rel="noopener"&gt;track Hubspot chats as GA events&amp;nbsp;&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 00:08:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/649000#M3410</guid>
      <dc:creator>Djones</dc:creator>
      <dc:date>2022-06-14T00:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Chat &amp; Google Analytics Event Tracking</title>
      <link>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/649597#M3417</link>
      <description>&lt;P&gt;Thanks for sharing,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/105311"&gt;@Djones&lt;/a&gt;!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 19:15:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Reporting-Analytics/HubSpot-Chat-amp-Google-Analytics-Event-Tracking/m-p/649597#M3417</guid>
      <dc:creator>kvlschaefer</dc:creator>
      <dc:date>2022-06-14T19:15:10Z</dc:date>
    </item>
  </channel>
</rss>

