<?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: Creating CTA button via embed code does not track clicks in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224860#M3756</link>
    <description>&lt;P&gt;Hello &lt;A class="mention" href="https://community.hubspot.com/u/isaac_takushi"&gt;@Isaac_Takushi&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Thanks for your reply! We decided to use the CTAs like that for these reasons:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Our marketing team can create the CTA (and control the link) without asking the dev team;&lt;/LI&gt;
&lt;LI&gt;Our marketing team can just give the dev team the link, and the system will do the rest;&lt;/LI&gt;
&lt;LI&gt;Due to the fact we load them dynamically, we thought that would be useful to abstract the CTA API;&lt;/LI&gt;
&lt;LI&gt;The image generated from Hubspot is low resolution and we don't really need it.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;That's strange, the fact your URL looks different than ours. We got this link from the embed code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;!--HubSpot Call-to-Action Code --&amp;gt;&amp;lt;span class="hs-cta-wrapper" id="hs-cta-wrapper-caccc178-4b51-40e6-9b18-6f1f53281a60"&amp;gt;&amp;lt;span class="hs-cta-node hs-cta-caccc178-4b51-40e6-9b18-6f1f53281a60" id="hs-cta-caccc178-4b51-40e6-9b18-6f1f53281a60"&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/2853558/caccc178-4b51-40e6-9b18-6f1f53281a60"  target="_blank" &amp;gt;&amp;lt;img class="hs-cta-img" id="hs-cta-img-caccc178-4b51-40e6-9b18-6f1f53281a60" style="border-width:0px;" src="https://no-cache.hubspot.com/cta/default/2853558/caccc178-4b51-40e6-9b18-6f1f53281a60.png"  alt="See all EducationLink features"/&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(2853558, 'caccc178-4b51-40e6-9b18-6f1f53281a60', {}); &amp;lt;/script&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;!-- end HubSpot Call-to-Action Code --&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;We haven't used any redirect or any changes were made to the link. We use the link Hubspot "gave us", so I'm not sure why the redirect is 301 or if it's not supposed to be like that. Indeed, the link currently does not have the parameters. But I figured that it should work by itself right? Because these links are used in emails, with no support for Javascript.&lt;/P&gt;
&lt;P&gt;We tried not to change anything, and load/execute the script as it would if we were embedding the script tags. That's why I think it's strange that the views work (probably the JS being executed) but the click tracking doesn't.&lt;/P&gt;
&lt;P&gt;Where did you get the link you sent to me from?&lt;/P&gt;
&lt;P&gt;Thank you for your help!&lt;/P&gt;</description>
    <pubDate>Wed, 05 Dec 2018 05:45:28 GMT</pubDate>
    <dc:creator>raphaelarias</dc:creator>
    <dc:date>2018-12-05T05:45:28Z</dc:date>
    <item>
      <title>Creating CTA button via embed code does not track clicks</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224858#M3754</link>
      <description>&lt;P&gt;In our Vue.js app, we've create a component, which we pass the CTA link, and this component will create the element and load the CTA scripts, includint the &lt;CODE&gt;hbspt.cta.load&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;We can see the views in our CTA analytics but we can't see the number of clicks. Is there anythine else we have to do?&lt;/P&gt;
&lt;P&gt;Below I have an example of our component:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;template lang="pug"&amp;gt;
a(:class="buttonClass",
  :href="hubspotCtaHref",
  :target="target",
  :title="title")

  i.el-icon.m-r-10(v-if="icon", :class="`el-${icon}`")
  span(v-if="!$slots.default", style="margin-left: 0")
    | {{ text }}
  slot
&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
export default {
  name: 'HubspotCtaButton',
  components: {
    Animation,
  },
  props: {
    text: {
      type: String,
      default: 'Save',
    },
   buttonClass: {
      type: String,
      default: '',
    },
    title: {
      type: String,
      default: '',
    },
    target: {
      type: String,
      default: '_blank',
    },
    icon: {
      type: String,
      default: '',
    },
    hubspotCtaHref: {
      type: String,
      required: true,
      default: '',
    },
    hubspotCtaOptions: {
      type: Object,
      default: () =&amp;gt; ({}),
    },
  },
  mounted() {
    // We get the params from the link (so it's easier for the user)
    // The CTA link should look like:
    // https://cta-redirect.hubspot.com/cta/redirect/2853558/caccc178-4b51-40e6-9b18-6f1f53281a60
    const fragments = this.hubspotCtaHref.split('/');
    $.getScript('https://js.hscta.net/cta/current.js', () =&amp;gt; {
      window.hbspt.cta.load(Number(fragments[5]), fragments[6], this.hubspotCtaOptions || {});
    });
  },
};
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 02 Dec 2018 14:42:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224858#M3754</guid>
      <dc:creator>raphaelarias</dc:creator>
      <dc:date>2018-12-02T14:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Creating CTA button via embed code does not track clicks</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224859#M3755</link>
      <description>&lt;P&gt;Hi, &lt;A class="mention" href="https://community.hubspot.com/u/raphael_arias"&gt;@Raphael_Arias&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;To be transparent, I have never heard of this being done before. Furthermore, I'm not completely certain that it's possible to fully replicate a HubSpot CTA's functionality in a custom Vue.js component.&lt;/P&gt;
&lt;P&gt;As I understand it and as David outlines in &lt;A href="https://integrate.hubspot.com/t/tracking-ctas-outside-of-hubspot/2867"&gt;this topic&lt;/A&gt;, CTA clicks are tracked through a redirect server. I believe this is what you're going for with:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;https://cta-redirect.hubspot.com/cta/redirect/2853558/caccc178-4b51-40e6-9b18-6f1f53281a60&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;While the URL above does lead to your landing page, I've noticed some key differences between your redirect's behavior and a "real" HubSpot CTA on one of my own landing pages:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Yours is a &lt;CODE&gt;meta&lt;/CODE&gt; redirect while an embedded HubSpot CTA uses a &lt;CODE&gt;301&lt;/CODE&gt; redirect.&lt;/LI&gt;
&lt;LI&gt;Your redirect URL is &lt;CODE&gt;https://cta-redirect.hubspot.com/cta/redirect/&lt;/CODE&gt; while a true HubSpot CTA goes through &lt;CODE&gt;https://cms2.hubspot.com/ctas/v2/public/cs/c/&lt;/CODE&gt;.&lt;/LI&gt;
&lt;LI&gt;Your redirect URL contains no query parameters while mine passes the following: &lt;CODE&gt;cta_guid&lt;/CODE&gt;, &lt;CODE&gt;placement_guid&lt;/CODE&gt;, &lt;CODE&gt;portal_id&lt;/CODE&gt;, &lt;CODE&gt;canon&lt;/CODE&gt;, &lt;CODE&gt;redirect_url&lt;/CODE&gt;, &lt;CODE&gt;click&lt;/CODE&gt;, &lt;CODE&gt;hsutk&lt;/CODE&gt;, &lt;CODE&gt;utm_referrer&lt;/CODE&gt;, &lt;CODE&gt;pageId&lt;/CODE&gt;, &lt;A href="https://knowledge.hubspot.com/articles/kcs_article/account/hubspot-cookie-security-and-privacy"&gt;&lt;CODE&gt;__hstc&lt;/CODE&gt;, &lt;CODE&gt;__hssc&lt;/CODE&gt;&lt;/A&gt;, and &lt;CODE&gt;__hsfp&lt;/CODE&gt;. (The parameter which really jumps out is &lt;CODE&gt;click&lt;/CODE&gt;, which may be how our CTAs count clicks.)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;How did you decide on using &lt;CODE&gt;https://cta-redirect.hubspot.com/cta/redirect&lt;/CODE&gt; as the redirect URL? (As opposed to, &lt;CODE&gt;https://cms2.hubspot.com/ctas/v2/public/cs/c/&lt;/CODE&gt;, for example.)&lt;/P&gt;
&lt;P&gt;Again, I can't guarantee that I'll be able to help you get everything working &lt;EM&gt;identically&lt;/EM&gt; to a native HubSpot CTA, but I'm happy to explore potential options!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 18:31:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224859#M3755</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2018-12-04T18:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Creating CTA button via embed code does not track clicks</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224860#M3756</link>
      <description>&lt;P&gt;Hello &lt;A class="mention" href="https://community.hubspot.com/u/isaac_takushi"&gt;@Isaac_Takushi&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Thanks for your reply! We decided to use the CTAs like that for these reasons:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Our marketing team can create the CTA (and control the link) without asking the dev team;&lt;/LI&gt;
&lt;LI&gt;Our marketing team can just give the dev team the link, and the system will do the rest;&lt;/LI&gt;
&lt;LI&gt;Due to the fact we load them dynamically, we thought that would be useful to abstract the CTA API;&lt;/LI&gt;
&lt;LI&gt;The image generated from Hubspot is low resolution and we don't really need it.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;That's strange, the fact your URL looks different than ours. We got this link from the embed code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;!--HubSpot Call-to-Action Code --&amp;gt;&amp;lt;span class="hs-cta-wrapper" id="hs-cta-wrapper-caccc178-4b51-40e6-9b18-6f1f53281a60"&amp;gt;&amp;lt;span class="hs-cta-node hs-cta-caccc178-4b51-40e6-9b18-6f1f53281a60" id="hs-cta-caccc178-4b51-40e6-9b18-6f1f53281a60"&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/2853558/caccc178-4b51-40e6-9b18-6f1f53281a60"  target="_blank" &amp;gt;&amp;lt;img class="hs-cta-img" id="hs-cta-img-caccc178-4b51-40e6-9b18-6f1f53281a60" style="border-width:0px;" src="https://no-cache.hubspot.com/cta/default/2853558/caccc178-4b51-40e6-9b18-6f1f53281a60.png"  alt="See all EducationLink features"/&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(2853558, 'caccc178-4b51-40e6-9b18-6f1f53281a60', {}); &amp;lt;/script&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;!-- end HubSpot Call-to-Action Code --&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;We haven't used any redirect or any changes were made to the link. We use the link Hubspot "gave us", so I'm not sure why the redirect is 301 or if it's not supposed to be like that. Indeed, the link currently does not have the parameters. But I figured that it should work by itself right? Because these links are used in emails, with no support for Javascript.&lt;/P&gt;
&lt;P&gt;We tried not to change anything, and load/execute the script as it would if we were embedding the script tags. That's why I think it's strange that the views work (probably the JS being executed) but the click tracking doesn't.&lt;/P&gt;
&lt;P&gt;Where did you get the link you sent to me from?&lt;/P&gt;
&lt;P&gt;Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 05:45:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224860#M3756</guid>
      <dc:creator>raphaelarias</dc:creator>
      <dc:date>2018-12-05T05:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating CTA button via embed code does not track clicks</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224861#M3757</link>
      <description>&lt;P&gt;&lt;A class="mention" href="https://community.hubspot.com/u/isaac_takushi"&gt;@Isaac_Takushi&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Would you have a clue what is happening? Any help is appreciated. &lt;IMG src="https://community.hubspot.com/legacyfs/online/emojis/apple/slight_smile.png?v=6" title=":slight_smile:" class="emoji" alt=":slight_smile:" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Dec 2018 04:19:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224861#M3757</guid>
      <dc:creator>raphaelarias</dc:creator>
      <dc:date>2018-12-09T04:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Creating CTA button via embed code does not track clicks</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224862#M3758</link>
      <description>&lt;P&gt;Hey, &lt;A class="mention" href="https://community.hubspot.com/u/raphael_arias"&gt;@Raphael_Arias&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Apologies for the delayed response while I checked with the product team which owns CTAs.&lt;/P&gt;
&lt;P&gt;Unfortunately, I won't be able to guide you any further toward your goal.&lt;/P&gt;
&lt;P&gt;While the lack of click tracking is due at least in part to the fact that you aren't passing a &lt;CODE&gt;click&lt;/CODE&gt; parameter and value to the click tracking domain &lt;CODE&gt;cms2.hubspot.com/ctas/v2&lt;/CODE&gt;, I haven't learned specific implementation steps. (To your previous question, though, I found that domain by testing a CTA embedded on my own website.)&lt;/P&gt;
&lt;P&gt;Here's the official word from the CTA team:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;"At the moment, the CTA tool has no open APIs and doesn't support embed code customization, let alone custom-built CTAs. While attempting to build a CTA isn't against our terms of service, if the customer decides they wish to customize it, it's up to them to figure out and is something [our team] would be very much against as it's likely to break at some stage."&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As you can see, my hands are a bit tied... I can't offer additional steps or condone building custom CTAs with Vue.js using the HubSpot scripts.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 14:53:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224862#M3758</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2018-12-10T14:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating CTA button via embed code does not track clicks</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224863#M3759</link>
      <description>&lt;P&gt;Hello &lt;A class="mention" href="https://community.hubspot.com/u/isaac_takushi"&gt;@Isaac_Takushi&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Thanks for your reply. I don't understand then why I have different URL structure in my embed code (generated by Hubspot).&lt;/P&gt;
&lt;P&gt;I have just tried embedding the code provided by Hubspot and it does not change the URL, does not send any parameter, nothing.&lt;/P&gt;
&lt;P&gt;Let's say I don't want to customise the CTA's API. Why my unchanged embed code of a CTA does not track clicks?&lt;BR /&gt;
&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;A class="lightbox" href="https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/1/11c96ffa520304520d911c36d7c17830e0733822.png" data-download-href="/legacyfs/online/uploads/default/11c96ffa520304520d911c36d7c17830e0733822" title="image.png" rel="nofollow noopener"&gt;&lt;IMG src="https://community.hubspot.com/legacyfs/online/uploads/default/optimized/2X/1/11c96ffa520304520d911c36d7c17830e0733822_1_689x233.png" alt="image" width="689" height="233" srcset="https://discourse-cdn-sjc1.com/hubspot/uploads/default/optimized/2X/1/11c96ffa520304520d911c36d7c17830e0733822_1_689x233.png, https://discourse-cdn-sjc1.com/hubspot/uploads/default/optimized/2X/1/11c96ffa520304520d911c36d7c17830e0733822_1_1033x349.png 1.5x, https://discourse-cdn-sjc1.com/hubspot/uploads/default/optimized/2X/1/11c96ffa520304520d911c36d7c17830e0733822_1_1378x466.png 2x" /&gt;&lt;DIV class="meta"&gt;
&lt;SPAN class="filename"&gt;image.png&lt;/SPAN&gt;&lt;SPAN class="informations"&gt;2474x836 204 KB&lt;/SPAN&gt;&lt;SPAN class="expand"&gt;&lt;/SPAN&gt;
&lt;/DIV&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;This is the request it triggered when I clicked on it in my website. Just the normal embed code. The URL is totally different than the one you showed me. I can see that when added to Hubspot emails, the URL is yet different (possibly like yours), but the embed code is this one.&lt;/P&gt;
&lt;P&gt;So my question would be, why the embed code does not track clicks?&lt;/P&gt;
&lt;P&gt;Could you help me with that?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 15:12:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224863#M3759</guid>
      <dc:creator>raphaelarias</dc:creator>
      <dc:date>2018-12-10T15:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating CTA button via embed code does not track clicks</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224864#M3760</link>
      <description>&lt;P&gt;P.S.: I basically followed this guide: &lt;A href="https://knowledge.hubspot.com/cta-user-guide-v2/how-to-add-a-call-to-action-cta-to-a-non-hubspot-page" rel="nofollow noopener"&gt;https://knowledge.hubspot.com/cta-user-guide-v2/how-to-add-a-call-to-action-cta-to-a-non-hubspot-page&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Note that this guide's URL is the same as mine.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 15:15:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224864#M3760</guid>
      <dc:creator>raphaelarias</dc:creator>
      <dc:date>2018-12-10T15:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating CTA button via embed code does not track clicks</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224865#M3761</link>
      <description>&lt;P&gt;P.S. I changed the title to better reflect what we are trying to achieve. &lt;IMG src="https://community.hubspot.com/legacyfs/online/emojis/apple/slight_smile.png?v=6" title=":slight_smile:" class="emoji" alt=":slight_smile:" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 15:18:59 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224865#M3761</guid>
      <dc:creator>raphaelarias</dc:creator>
      <dc:date>2018-12-10T15:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating CTA button via embed code does not track clicks</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224866#M3762</link>
      <description>&lt;P&gt;Done, fixed!&lt;/P&gt;
&lt;P&gt;For future reference:&lt;/P&gt;
&lt;P&gt;Hubspot provides a "temp" URL in case the script does not run, this URL will redirect the user to the final URL, but will not track the click (!?), probably due to back end limitation due to the lack of more information. Don't know.&lt;/P&gt;
&lt;P&gt;When added to the page, the script may not be executed, that's what threw me off in the beginning.&lt;BR /&gt;
Furthermore, the script needs the wrapping tags with the same tags and ids.&lt;/P&gt;
&lt;P&gt;So, here's my final component, working like a charm:&lt;/P&gt;
&lt;P&gt;Evidence (note the URL has changed to the script):&lt;BR /&gt;
&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;A class="lightbox" href="https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/d/dfb5861a4b66101f257c61fdcda1e3c3905f5c1a.png" data-download-href="/legacyfs/online/uploads/default/dfb5861a4b66101f257c61fdcda1e3c3905f5c1a" title="image.png" rel="nofollow noopener"&gt;&lt;IMG src="https://community.hubspot.com/legacyfs/online/uploads/default/optimized/2X/d/dfb5861a4b66101f257c61fdcda1e3c3905f5c1a_1_690x139.png" alt="image" width="690" height="139" srcset="https://discourse-cdn-sjc1.com/hubspot/uploads/default/optimized/2X/d/dfb5861a4b66101f257c61fdcda1e3c3905f5c1a_1_690x139.png, https://discourse-cdn-sjc1.com/hubspot/uploads/default/optimized/2X/d/dfb5861a4b66101f257c61fdcda1e3c3905f5c1a_1_1035x208.png 1.5x, https://discourse-cdn-sjc1.com/hubspot/uploads/default/optimized/2X/d/dfb5861a4b66101f257c61fdcda1e3c3905f5c1a_1_1380x278.png 2x" /&gt;&lt;DIV class="meta"&gt;
&lt;SPAN class="filename"&gt;image.png&lt;/SPAN&gt;&lt;SPAN class="informations"&gt;1938x392 100 KB&lt;/SPAN&gt;&lt;SPAN class="expand"&gt;&lt;/SPAN&gt;
&lt;/DIV&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;!-- Cta button --&amp;gt;

&amp;lt;template lang="pug"&amp;gt;
span.hs-cta-wrapper(:id="`hs-cta-wrapper-${urlComponents[6]}`")
  span.hs-cta-node(:class="`hs-cta-${urlComponents[6]}`",
                  :id="`hs-cta-${urlComponents[6]}`")
    a(:class="buttonClass",
      :href="hubspotCtaHref",
      :target="target",
      :title="title")

      i.el-icon.m-r-10(v-if="icon", :class="`el-${icon}`")
      span(v-if="!$slots.default", style="margin-left: 0")
        | {{ text }}
      slot
&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
export default {
  name: 'HubspotCtaButton',
  props: {
    text: {
      type: String,
      default: 'Save',
    },
    buttonClass: {
      type: String,
      default: '',
    },
    title: {
      type: String,
      default: '',
    },
    target: {
      type: String,
      default: '_blank',
    },
    icon: {
      type: String,
      default: '',
    },
    hubspotCtaHref: {
      type: String,
      required: true,
      default: '',
    },
    hubspotCtaOptions: {
      type: Object,
      default: () =&amp;gt; ({}),
    },
  },
  data() {
    return {
      urlComponents: this.hubspotCtaHref.split('/'),
    };
  },
  mounted() {
    // We get the params from the link (so it's easier for the user)
    // The CTA link should look like:
    // https://cta-redirect.hubspot.com/cta/redirect/2853558/caccc178-4b51-40e6-9b18-6f1f53281a60

    // If CTA load code is already present we don't need to add the script again
    if (window.hbspt &amp;amp;&amp;amp; window.hbspt.cta &amp;amp;&amp;amp; window.hbspt.cta.load) {
      this.loadCta();

      return;
    }

    $.getScript('https://js.hscta.net/cta/current.js', () =&amp;gt; {
      this.loadCta();
    });
  },
  methods: {
    loadCta() {
      // Add Hubspot special parameters (it will end up changing the URL);
      window.hbspt.cta.load(Number(this.urlComponents[5]), this.urlComponents[6], this.hubspotCtaOptions || {});
    },
  },
};
&amp;lt;/script&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;P.S.: Hubspot's CTA script is very intrusive in the sense it will replace all classes and text from the DOM. I haven't tested the use of icon or slots with the link (so not sure if this part of the component is working).&lt;/P&gt;
&lt;P&gt;P.S.: It's a shame that the CTA product team, didn't want to help.&lt;/P&gt;
&lt;P&gt;&lt;A class="mention" href="https://community.hubspot.com/u/isaac_takushi"&gt;@Isaac_Takushi&lt;/A&gt; Thank you very much for your support!&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 16:18:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224866#M3762</guid>
      <dc:creator>raphaelarias</dc:creator>
      <dc:date>2018-12-10T16:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating CTA button via embed code does not track clicks</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224867#M3763</link>
      <description>&lt;P&gt;This is so impressive, &lt;A class="mention" href="https://community.hubspot.com/u/raphael_arias"&gt;@Raphael_Arias&lt;/A&gt;! Yeah, apologies I couldn't be of more assistance, but I'm thrilled to hear you got this up and running!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 14:50:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Creating-CTA-button-via-embed-code-does-not-track-clicks/m-p/224867#M3763</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2018-12-11T14:50:34Z</dc:date>
    </item>
  </channel>
</rss>

