<?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: CTA and Google analytics event tracking in Marketing Integrations</title>
    <link>https://community.hubspot.com/t5/Marketing-Integrations/CTA-and-Google-analytics-event-tracking/m-p/291668#M1739</link>
    <description>&lt;P&gt;I've finally found the solution!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;!--HubSpot Call-to-Action Code --&amp;gt;
&amp;lt;span class="hs-cta-wrapper" id="hs-cta-wrapper-ID"&amp;gt;
&amp;lt;span class="hs-cta-node hs-cta-ID" id="hs-cta-ID"&amp;gt;
&amp;lt;!--[if lte IE 8]&amp;gt;
&amp;lt;div id="hs-cta-ie-element"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;![endif]--&amp;gt;
&amp;lt;a href="https://cta-redirect.hubspot.com/cta/redirect/hs-account-ID/hs-CTA-ID"  target="_blank"&amp;gt;&amp;lt;img class="hs-cta-img" id="hs-cta-img-ID" style="border-width:0px;" height="164" width="300" src="https://no-cache.hubspot.com/cta/default/hs-account-ID/hs-img-ID.png"  alt=""/&amp;gt;&amp;lt;/a&amp;gt;
&amp;lt;/span&amp;gt;
&amp;lt;script charset="utf-8" src="https://js.hscta.net/cta/current.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt; hbspt.cta.load(#hs-account-id, '#hs-cta-id', $(document).ready(function() {
    $('#hs-cta-id').click(function() {
        ga(‘send’, ‘event’, ‘category’, ‘action’, ‘label’, value);
    });
}); &amp;lt;/script&amp;gt;
&amp;lt;/span&amp;gt;
&amp;lt;!-- end HubSpot Call-to-Action Code --&amp;gt;&lt;/PRE&gt;&lt;P&gt;Now I can see the event in Google Analytics !&lt;/P&gt;</description>
    <pubDate>Tue, 17 Sep 2019 14:31:25 GMT</pubDate>
    <dc:creator>lincé</dc:creator>
    <dc:date>2019-09-17T14:31:25Z</dc:date>
    <item>
      <title>CTA and Google analytics event tracking</title>
      <link>https://community.hubspot.com/t5/Marketing-Integrations/CTA-and-Google-analytics-event-tracking/m-p/291247#M1734</link>
      <description>&lt;DIV class="lia-message-body lia-component-body-simple"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've seen a message about this problem, but I haven't understood the solution.&lt;/P&gt;&lt;P&gt;So I try to find help with this new message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've found the solution for the GA event tracking on embedded forms but this is not working for my CTA.&lt;/P&gt;&lt;P&gt;For embedded forms in another web site, I've used this solution which works perfectly in GA :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;!--[if lte IE 8]&amp;gt;
&amp;lt;script charset="utf-8" src="//js.hsforms.net/forms/v2-legacy.js"&amp;gt; &amp;lt;/script&amp;gt;
&amp;lt;![endif]--&amp;gt;
&amp;lt;script charset="utf-8" src="//js.hsforms.net/forms/v2.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;hbspt.forms.create({
	portalId: "portalId",
	formId: "#formId" ,
        onFormSubmit: function($form){
	ga('send', 'event', 'category', 'action', 'label');
},
});&amp;lt;/script&amp;gt;
&amp;lt;style scoped="scoped" type="text/css"&amp;gt;.hbspt-form, .hs-form .stacked {display: -webkit-flex;}
.hs-form-required {display:none;}
.hs-button {background-color:#3498db;border:none;padding:5px 10px;color:#fff;float;left;}&amp;lt;/style&amp;gt;&lt;/PRE&gt;&lt;P&gt;But for a CTA, isn't it possible to add the GA tracking code directly in the hubspot script as I did it for the form ?&lt;/P&gt;&lt;P&gt;I've tryed this code wich doesn't work at all (GA doesn't detect any event when I or anybody else click on the CTA) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;!--HubSpot Call-to-Action Code --&amp;gt;&lt;BR /&gt;&amp;lt;span class="hs-cta-wrapper" id="hs-cta-wrapper-ID"&amp;gt;&lt;BR /&gt;&amp;lt;span class="hs-cta-node hs-cta-ID" id="hs-cta-ID"&amp;gt;&lt;BR /&gt;&amp;lt;!--[if lte IE 8]&amp;gt;&lt;BR /&gt;&amp;lt;div id="hs-cta-ie-element"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;![endif]--&amp;gt;&lt;BR /&gt;&amp;lt;a href="https://cta-redirect.hubspot.com/cta/redirect/ID/ID"  target="_blank" onClick="ga('send', 'event', 'pdf', 'download', 'label');" &amp;gt;&amp;lt;img class="hs-cta-img" id="hs-cta-img-ID" style="border-width:0px;" height="164" width="300" src="https://no-cache.hubspot.com/cta/default/ID/ID.png"  alt=""/&amp;gt;&amp;lt;/a&amp;gt;&lt;BR /&gt;&amp;lt;/span&amp;gt;&lt;BR /&gt;&amp;lt;script charset="utf-8" src="https://js.hscta.net/cta/current.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script type="text/javascript"&amp;gt; hbspt.cta.load(ID, 'CTA ID', {}); &amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/span&amp;gt;&lt;BR /&gt;&amp;lt;!-- end HubSpot Call-to-Action Code --&amp;gt;&lt;/PRE&gt;&lt;P&gt;What can I do else to track event with GA ?&lt;/P&gt;&lt;P&gt;I've seen a solution with a jQuery but didn't understand where and how to add it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 13 Sep 2019 15:04:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Marketing-Integrations/CTA-and-Google-analytics-event-tracking/m-p/291247#M1734</guid>
      <dc:creator>lincé</dc:creator>
      <dc:date>2019-09-13T15:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: CTA and Google analytics event tracking</title>
      <link>https://community.hubspot.com/t5/Marketing-Integrations/CTA-and-Google-analytics-event-tracking/m-p/291668#M1739</link>
      <description>&lt;P&gt;I've finally found the solution!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;!--HubSpot Call-to-Action Code --&amp;gt;
&amp;lt;span class="hs-cta-wrapper" id="hs-cta-wrapper-ID"&amp;gt;
&amp;lt;span class="hs-cta-node hs-cta-ID" id="hs-cta-ID"&amp;gt;
&amp;lt;!--[if lte IE 8]&amp;gt;
&amp;lt;div id="hs-cta-ie-element"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;![endif]--&amp;gt;
&amp;lt;a href="https://cta-redirect.hubspot.com/cta/redirect/hs-account-ID/hs-CTA-ID"  target="_blank"&amp;gt;&amp;lt;img class="hs-cta-img" id="hs-cta-img-ID" style="border-width:0px;" height="164" width="300" src="https://no-cache.hubspot.com/cta/default/hs-account-ID/hs-img-ID.png"  alt=""/&amp;gt;&amp;lt;/a&amp;gt;
&amp;lt;/span&amp;gt;
&amp;lt;script charset="utf-8" src="https://js.hscta.net/cta/current.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt; hbspt.cta.load(#hs-account-id, '#hs-cta-id', $(document).ready(function() {
    $('#hs-cta-id').click(function() {
        ga(‘send’, ‘event’, ‘category’, ‘action’, ‘label’, value);
    });
}); &amp;lt;/script&amp;gt;
&amp;lt;/span&amp;gt;
&amp;lt;!-- end HubSpot Call-to-Action Code --&amp;gt;&lt;/PRE&gt;&lt;P&gt;Now I can see the event in Google Analytics !&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 14:31:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Marketing-Integrations/CTA-and-Google-analytics-event-tracking/m-p/291668#M1739</guid>
      <dc:creator>lincé</dc:creator>
      <dc:date>2019-09-17T14:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: CTA and Google analytics event tracking</title>
      <link>https://community.hubspot.com/t5/Marketing-Integrations/CTA-and-Google-analytics-event-tracking/m-p/370603#M2443</link>
      <description>&lt;P&gt;&lt;BR /&gt;We have just created a HubSpot APP called Analytics Amplifier that will also help you do this + push offline events to Google Analytics when they happen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check it out here:&lt;BR /&gt;&lt;A href="https://ecosystem.hubspot.com/marketplace/apps/marketing/analytics-data/google-analytics-amplifier-222008" target="_blank"&gt;https://ecosystem.hubspot.com/marketplace/apps/marketing/analytics-data/google-analytics-amplifier-222008&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 21:56:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Marketing-Integrations/CTA-and-Google-analytics-event-tracking/m-p/370603#M2443</guid>
      <dc:creator>ralphioooo</dc:creator>
      <dc:date>2020-09-15T21:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: CTA and Google analytics event tracking</title>
      <link>https://community.hubspot.com/t5/Marketing-Integrations/CTA-and-Google-analytics-event-tracking/m-p/372448#M2457</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;I've noticed that GA doesn't detect the latest CTA I've integrated on an external page. I've used the same method than before wich was working well but now when we click on the CTA, no event is detected by GA.&lt;/P&gt;&lt;P&gt;And hubspot doesn't seem to detect the CTA is used in an external web page, not even seen or clicked.&lt;/P&gt;&lt;P&gt;Thnks for you help.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 08:47:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Marketing-Integrations/CTA-and-Google-analytics-event-tracking/m-p/372448#M2457</guid>
      <dc:creator>lincé</dc:creator>
      <dc:date>2020-09-22T08:47:45Z</dc:date>
    </item>
  </channel>
</rss>

