<?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: Trigger javascript function from CTA click? in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Trigger-javascript-function-from-CTA-click/m-p/1231902#M44692</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/824832"&gt;@OJ_ONT&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="126" data-end="232"&gt;HubSpot’s CTAs don’t work in this case because they run inside an iframe — even when using the CTA JS API.&lt;/P&gt;
&lt;P data-start="234" data-end="373"&gt;In this situation, I think you can create a custom CTA (built with HTML instead of the HubSpot CTA tool) and use custom events to track it.&lt;/P&gt;
&lt;P data-start="234" data-end="373"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="375" data-end="438"&gt;This CTA can be built using CMS Hub, making it 100% functional.&lt;/P&gt;
&lt;P data-start="440" data-end="455"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="440" data-end="455"&gt;Does this help?&lt;/P&gt;</description>
    <pubDate>Mon, 08 Dec 2025 11:47:15 GMT</pubDate>
    <dc:creator>Brenner</dc:creator>
    <dc:date>2025-12-08T11:47:15Z</dc:date>
    <item>
      <title>Trigger javascript function from CTA click?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Trigger-javascript-function-from-CTA-click/m-p/1227275#M44688</link>
      <description>&lt;P&gt;Our website uses Mavenoid as a chat/forms pop-up tool*.&lt;BR /&gt;To trigger the opening of Mavenoid I need to call:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;mavenoid.push({ event: 'assistant-open' })&lt;/LI-CODE&gt;&lt;P&gt;So far I haven't been able to find a way to use CTAs to open Mavenoid reliably.&lt;BR /&gt;I thought I might be able to hijack the click on a text/button CTA embed to open mavenoid.&lt;BR /&gt;I tried a few different CTA types and using the CTA JS API to listen to the click and then cancel the CTA action. I managed to use the click event, on url CTA buttons, but couldn't stop the page reloading or changing (even if I configure the CTA URL the same as the page the CTA is on).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone managed to achieve this?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;*We do this because we need to pull in sales team scheduling data from our corporate address book. HubSpot meting links won't work for us at our scale.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Nov 2025 21:53:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Trigger-javascript-function-from-CTA-click/m-p/1227275#M44688</guid>
      <dc:creator>OJ_ONT</dc:creator>
      <dc:date>2025-11-22T21:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger javascript function from CTA click?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Trigger-javascript-function-from-CTA-click/m-p/1231902#M44692</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/824832"&gt;@OJ_ONT&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="126" data-end="232"&gt;HubSpot’s CTAs don’t work in this case because they run inside an iframe — even when using the CTA JS API.&lt;/P&gt;
&lt;P data-start="234" data-end="373"&gt;In this situation, I think you can create a custom CTA (built with HTML instead of the HubSpot CTA tool) and use custom events to track it.&lt;/P&gt;
&lt;P data-start="234" data-end="373"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="375" data-end="438"&gt;This CTA can be built using CMS Hub, making it 100% functional.&lt;/P&gt;
&lt;P data-start="440" data-end="455"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="440" data-end="455"&gt;Does this help?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2025 11:47:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Trigger-javascript-function-from-CTA-click/m-p/1231902#M44692</guid>
      <dc:creator>Brenner</dc:creator>
      <dc:date>2025-12-08T11:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger javascript function from CTA click?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Trigger-javascript-function-from-CTA-click/m-p/1236287#M44810</link>
      <description>&lt;P&gt;Yes, that makes sense to use custom events. It's a shame that we would be abandoning CTAs to acheive this, as it means we will have data spread across multiple data models / reports.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Dec 2025 17:03:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Trigger-javascript-function-from-CTA-click/m-p/1236287#M44810</guid>
      <dc:creator>OJ_ONT</dc:creator>
      <dc:date>2025-12-22T17:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger javascript function from CTA click?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Trigger-javascript-function-from-CTA-click/m-p/1236388#M44812</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/824832"&gt;@OJ_ONT&lt;/a&gt;&lt;/SPAN&gt; thanks so much for confirming the solution &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/122698"&gt;@Brenner&lt;/a&gt; suggested is helpful for this scenario. This will help future members coming with the same goal ! If you would like to see this feature live within the default HubSpot CTAs tool, I highly recommend to request this feature in our I&lt;A href="https://community.hubspot.com/t5/HubSpot-Ideas/idb-p/HubSpot_Ideas" target="_blank"&gt;deas Forum&lt;/A&gt;&lt;SPAN style="background-color:#ffffff;color:#33475b;"&gt; by submitting or voting a similar idea. &lt;/SPAN&gt;The Product teams are constantly monitoring this forum to prioritize features that will enhance the platform so I highly encourage your contributions&lt;span class="lia-unicode-emoji" title=":rocket:"&gt;🚀&lt;/span&gt; - Josefina, Community Moderator&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Dec 2025 23:46:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Trigger-javascript-function-from-CTA-click/m-p/1236388#M44812</guid>
      <dc:creator>JOB3</dc:creator>
      <dc:date>2025-12-22T23:46:11Z</dc:date>
    </item>
  </channel>
</rss>

