Programatically Controlling CTA Buttons

Hi, I’m working with a client to integrate a CTA into their third party website. I was just wondering if there was any scope for the beta CTA feature to have additional options around triggering? Currently the only access to my knowledge is to add the “hs-cta-trigger-button” class to an element and then the hubspot script takes over. We’d actually like to programatically control when the CTA does and doesn’t trigger, but this doesn’t seem efficiently possible given the current solution.
Could you advise if there are any plans to expand the library or its options? I’m currently integrating the CTA’s in a React website, is there the possibility a React library for the CTA’s is being developed?

To give a brief summary, we have a react component we’d like to have trigger the CTA only the first time it’s clicked. If we add the relevant classes, then remove them after the first click, the CTA is still triggered as the element is modified by the Hubspot script.

Hello @JSmith02 thank you for posting in our Community!

I want to invite to this conversation our top experts @Jnix284 @danmoyle @TomM2 any suggestions for the @JSmith02 CTA matter?

Thank you,

Pam

Hey @JSmith02 the simple answer is no. The new CTA tool is still in beta and quite early in development.

It is what it is at the moment and requires the ID to be added into the element you want to trigger the CTA.

The team are busy fleshing out this product and I’m sure this is a feature that would be hugely beneficial to customers.

I’d definitely advise posting this on the ideas forum as a feature request to help identify this as a required feature!

@JSmith02 if you add to the ideas forum, please share the link back here and we’ll be happy to upvote!

As @TomM2 said, with this being in Beta the capabilities are still quite limited and now is a great time to get the feedback to the Product Team about what you’d like to be able to do with the tools.

Hi everyone, thanks for the replies! I am very aware it’s a beta feature and was just hoping to share this encase anyone had either found an efficient work-around or encase it did prompt discussions around future development.

Being quite new to hubspot I hadn’t seen the ideas forum but have added a post there now, as requested, here’s a link to it for anyone who would like to upvote.

https://community.hubspot.com/t5/HubSpot-Ideas/Programatically-Controlling-CTA-Buttons/idi-p/821736#M149188

Awesome @JSmith02 , happy to upvote!

Adding support in the Idea as well, @JSmith02. Thanks for the tag @PamCotton!