<?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: Popup in Google Tag Manager as CTA Hubspot in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Popup-in-Google-Tag-Manager-as-CTA-Hubspot/m-p/715593#M31221</link>
    <description>&lt;P&gt;Hi Anton,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your reply, but it is probably not the solution to my problem.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I want to use the hubspot CTA code and add it in Google Tag Manger.&lt;BR /&gt;I want to add this via GTM because I do not have access to the code of this page and this is the only option.&lt;BR /&gt;This is how (via javascript) adds a popup at the moment.&lt;BR /&gt;And in a similar way, I wanted to do it by adding the 'split' CTA code: &lt;A href="https://prnt.sc/lEv7Pzl0PryV" target="_blank"&gt;https://prnt.sc/lEv7Pzl0PryV&lt;/A&gt;&lt;BR /&gt;Works, but unfortunately statistics are not counted: &lt;A href="https://prnt.sc/_9AiN5pA7cA8" target="_blank"&gt;https://prnt.sc/_9AiN5pA7cA8&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Adding the code blocks you indicated is rather impossible in GTM - errors appear and the tag does not fire at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspect, therefore, that such 'splitting' the CTA code and adding it in parts via js does not work and hubspot does not ensure correctness and support for such an operation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hanna&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 09:07:36 GMT</pubDate>
    <dc:creator>HPrzygoda</dc:creator>
    <dc:date>2022-11-08T09:07:36Z</dc:date>
    <item>
      <title>Popup in Google Tag Manager as CTA Hubspot</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Popup-in-Google-Tag-Manager-as-CTA-Hubspot/m-p/715568#M31218</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wanted to use CTA Hubspot in an external tool - Google Tag Manager (GTM) to count views and clicks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I prepared a CTA as a graphic a&lt;/SPAN&gt;&lt;SPAN&gt;nd then the CTA code was 'rewritten' and added in GTM:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://prnt.sc/lEv7Pzl0PryV" target="_blank" rel="noopener"&gt;https://prnt.sc/lEv7Pzl0PryV&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The popup works - shows on the website:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://www.sodexo.pl/lojalnosc-i-motywacja-w-biznesie/wsparcie-" target="_blank" rel="noopener"&gt;https://www.sodexo.pl/lojalnosc-i-motywacja-w-biznesie/wsparcie-&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;Sprzedaż-poznaj-4-legalne-sposoby/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;all its elements (elements from the CTA code) are loaded:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://prnt.sc/rtDrWilMRtYH" target="_blank" rel="noopener"&gt;https://prnt.sc/rtDrWilMRtYH&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;But unfortunately, nothing counts in the statistics in HS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is it possible to solve?&lt;BR /&gt;If so, in what way?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 06:54:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Popup-in-Google-Tag-Manager-as-CTA-Hubspot/m-p/715568#M31218</guid>
      <dc:creator>HPrzygoda</dc:creator>
      <dc:date>2022-11-08T06:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Popup in Google Tag Manager as CTA Hubspot</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Popup-in-Google-Tag-Manager-as-CTA-Hubspot/m-p/715579#M31220</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/471462"&gt;@HPrzygoda&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;unless you really need the CTA (function) I would go with a custom button module.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The most basic custom button module contains:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Link function&lt;/LI&gt;
&lt;LI&gt;text function (name: Button label; not rich-text)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;and looks like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set href = module.link_field.url.href %}
{% if module.link_field.url.type is equalto "EMAIL_ADDRESS" %}
	{% set href = "mailto:" + href %}
{% endif %}
&amp;lt;a href="{{ href }}" {% if module.link_field.open_in_new_tab %}target="_blank"{% endif %}{% if module.link_field.rel %}rel="{{ module.link_field.rel }}"{% endif %}&amp;gt;
 {{ module.button_label }}
&amp;lt;/a&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can expend it to your needs. Since you want to add GTM parameters/tags to it you can add another text field called "Google tag"(feel free to rename it) like it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set href = module.link_field.url.href %}
{% if module.link_field.url.type is equalto "EMAIL_ADDRESS" %}
	{% set href = "mailto:" + href %}
{% endif %}
&amp;lt;a href="{{ href }}" {% if module.link_field.open_in_new_tab %}target="_blank"{% endif %}{% if module.link_field.rel %}rel="{{ module.link_field.rel }}"{% endif %} id="{{ module.google_tag }}"&amp;gt;
 {{ module.button_label }}
&amp;lt;/a&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you want to add CSS classes you have several ways. My recommendations are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;choice fields with the css class(es) as values&lt;/LI&gt;
&lt;LI&gt;text fields&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://developers.hubspot.com/docs/cms/hubl/if-statements" target="_blank" rel="noopener"&gt;booleans&lt;/A&gt; (if you want to trigger a single class)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;the code for choice and text fields looks like this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set href = module.link_field.url.href %}
{% if module.link_field.url.type is equalto "EMAIL_ADDRESS" %}
	{% set href = "mailto:" + href %}
{% endif %}
&amp;lt;a href="{{ href }}" {% if module.link_field.open_in_new_tab %}target="_blank"{% endif %}{% if module.link_field.rel %}rel="{{ module.link_field.rel }}"{% endif %} id="{{ module.google_tag }}" class="{{ module.css_class }}"&amp;gt;
 {{ module.button_label }}
&amp;lt;/a&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for booleans like this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set href = module.link_field.url.href %}
{% if module.link_field.url.type is equalto "EMAIL_ADDRESS" %}
	{% set href = "mailto:" + href %}
{% endif %}
&amp;lt;a href="{{ href }}" {% if module.link_field.open_in_new_tab %}target="_blank"{% endif %}{% if module.link_field.rel %}rel="{{ module.link_field.rel }}"{% endif %} id="{{ module.google_tag }}" class="btn {% if module.secondary_button %}secondary{% endif %}"&amp;gt;
 {{ module.button_label }}
&amp;lt;/a&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are almost no limitations how many options you'd like to add.&amp;nbsp;&lt;BR /&gt;If you don't have experience in custom module development - take a look how/where to start &lt;A href="https://developers.hubspot.com/docs/cms/building-blocks/modules/files" target="_blank" rel="noopener"&gt;here in the docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope this helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 07:57:38 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Popup-in-Google-Tag-Manager-as-CTA-Hubspot/m-p/715579#M31220</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2022-11-08T07:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Popup in Google Tag Manager as CTA Hubspot</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Popup-in-Google-Tag-Manager-as-CTA-Hubspot/m-p/715593#M31221</link>
      <description>&lt;P&gt;Hi Anton,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your reply, but it is probably not the solution to my problem.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I want to use the hubspot CTA code and add it in Google Tag Manger.&lt;BR /&gt;I want to add this via GTM because I do not have access to the code of this page and this is the only option.&lt;BR /&gt;This is how (via javascript) adds a popup at the moment.&lt;BR /&gt;And in a similar way, I wanted to do it by adding the 'split' CTA code: &lt;A href="https://prnt.sc/lEv7Pzl0PryV" target="_blank"&gt;https://prnt.sc/lEv7Pzl0PryV&lt;/A&gt;&lt;BR /&gt;Works, but unfortunately statistics are not counted: &lt;A href="https://prnt.sc/_9AiN5pA7cA8" target="_blank"&gt;https://prnt.sc/_9AiN5pA7cA8&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Adding the code blocks you indicated is rather impossible in GTM - errors appear and the tag does not fire at all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspect, therefore, that such 'splitting' the CTA code and adding it in parts via js does not work and hubspot does not ensure correctness and support for such an operation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hanna&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 09:07:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Popup-in-Google-Tag-Manager-as-CTA-Hubspot/m-p/715593#M31221</guid>
      <dc:creator>HPrzygoda</dc:creator>
      <dc:date>2022-11-08T09:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Popup in Google Tag Manager as CTA Hubspot</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Popup-in-Google-Tag-Manager-as-CTA-Hubspot/m-p/715860#M31240</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/471462"&gt;@HPrzygoda&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;no problem - to get it right: You're placing the id from the img(CTA) to the GTM, right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so - is the GTM script loaded in the header or footer? I only can assume that if the GTM is loaded after the CTA script it might not get the code but maybe I'm completly off.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if your GTM code is - for some reason - in the footer area, try moving it to the header area&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 17:29:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Popup-in-Google-Tag-Manager-as-CTA-Hubspot/m-p/715860#M31240</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2022-11-08T17:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Popup in Google Tag Manager as CTA Hubspot</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Popup-in-Google-Tag-Manager-as-CTA-Hubspot/m-p/716155#M31251</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Popup / CTA is not added to the header or footer - only in the body.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm giving the correct URL because I noticed that I pasted the wrong link at the top:&lt;BR /&gt;&lt;A href="https://www.sodexo.pl/lojalnosc-i-motywacja-w-biznesie/wsparcie-" target="_blank"&gt;https://www.sodexo.pl/lojalnosc-i-motywacja-w-biznesie/wsparcie-&lt;/A&gt; Sprzedaż-poznaj-4-legalne-sposoby/&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a CTA code:&lt;BR /&gt;&amp;lt;! - HubSpot Call-to-Action Code -&amp;gt; &amp;lt;span class = "hs-cta-wrapper" id = "hs-cta-wrapper-5e8e2239-f821-492b-85c1-5b4643fbff33"&amp;gt; &amp;lt;span class = " hs-cta-node hs-cta-5e8e2239-f821-492b-85c1-5b4643fbff33 "id =" hs-cta-5e8e2239-f821-492b-85c1-5b4643fbff33 "&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 = "&lt;A href="https://cta-redirect.hubspot.com/cta/redirect/7768293/5e8e2239-f821" target="_blank"&gt;https://cta-redirect.hubspot.com/cta/redirect/7768293/5e8e2239-f821&lt;/A&gt; -492b-85c1-5b4643fbff33 "target =" _ blank "rel =" noopener "&amp;gt; &amp;lt;img class =" hs-cta-img "id =" hs-cta-img-5e8e2239-f821-492b-85c1-5b4643fbff33 "style = "border-width: 0px;" height = "1200" width = "1200" src="&lt;A href="https://no-cache.hubspot.com/cta/default/7768293/5e8e2239-f821-492b-85c1-5b4643fbff33.png" target="_blank"&gt;https://no-cache.hubspot.com/cta/default/7768293/5e8e2239-f821-492b-85c1-5b4643fbff33.png&lt;/A&gt;" alt = "Download our guide" /&amp;gt; &amp;lt;/a&amp;gt; &amp;lt;/span&amp;gt; &amp;lt;script charset = "utf-8" src="&lt;A href="https://js.hscta.net/cta/current.js" target="_blank"&gt;https://js.hscta.net/cta/current.js&lt;/A&gt;"&amp;gt; &amp;lt;/script&amp;gt; &amp;lt;script type = "text / javascript "&amp;gt; hbspt.cta.load (7768293, '5e8e2239-f821-492b-85c1-5b4643fbff33', {" useNewLoader ":" true "," region ":" na1 "}); &amp;lt;/script&amp;gt; &amp;lt;/span&amp;gt; &amp;lt;! - end HubSpot Call-to-Action Code -&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this code is 'broken down' into elements and added individually with JS:&lt;BR /&gt;&lt;A href="https://prnt.sc/lEv7Pzl0PryV" target="_blank"&gt;https://prnt.sc/lEv7Pzl0PryV&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But looking at what you write, I have to add one more thing - I don't know if it is important:&lt;BR /&gt;the trigger in GTM that fires this tag (with the coded CTA as above) is to scroll to 60% of the article / this page - then it appears: &lt;A href="https://prnt.sc/ZLFx4NaOTQ9J" target="_blank"&gt;https://prnt.sc/ZLFx4NaOTQ9J&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(There's another one that fires on an exit attempt - but that's not what I'm doing at the moment).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps the problem is this trigger (scroll 60%)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hanna&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2022 07:25:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Popup-in-Google-Tag-Manager-as-CTA-Hubspot/m-p/716155#M31251</guid>
      <dc:creator>HPrzygoda</dc:creator>
      <dc:date>2022-11-09T07:25:17Z</dc:date>
    </item>
  </channel>
</rss>

