Adding Code Snippet to CSS of an Element

So I am using a Button Element and I am trying to integrate a CTA - Call To Action with Hubspot

They give me a piece of Code Snippet to enable the CTA on an external page

Since I want to add this CTA to a specific button, I assume I want to add this piece of Code Snippet to the Button’s Customize Element CSS section, correct?

Here is the code, it seems I am missing a couple of programming key strokes, what else exactly do I need to add to activate it? Adding a { or / etc.

hs-cta-trigger-button hs-cta-trigger-button-176767400284

Hey John,

Thanks for reaching out!

Would you mind sharing the instructions for integrating the CTA with Hubspot? In that way, we can check how to integrate it to our button element.

Thank you.

Ok so here are the directions from Hubspot:

Here is where I’m trying to put it, but I think I’m missing some coding key strokes:

Hello John,

As per your screenshot, it seems that you need to add the given class to the Button element class, I would suggest you go to the Button element —>customize —>Class and add the given class there.

Hope it helps
Thanks

Ah ok, I did add the code there in the Class section like you suggested, but it doesn’t seem to be working?

Am I missing any keystrokes for this code:

hs-cta-trigger-button hs-cta-trigger-button-176767400284

I’ve added login info for you to get in there to check it out if you can.

This is a big part of my launch this week/tomorrow, so I hope we can get it working and this pop-up to work.

Thank you!

Hey John,

I suspect that this trigger class hs-cta-trigger-button hs-cta-trigger-button-176767400284 lacks some script/html code. You need to check the Hubspot CTA again. Also, I tried to search your pages but I cannot locate the button, would you mind sharing the page URL you are working on?

Thank you.

I actually did get it to work, but it seems that Call To Action Pop-ups may get blocked by browsers, so I just created a new post and embedded the Form into it to make sure it’s as smooth as possible for everyone.

Thanks for the help!

Hey John,

That’s great and you’re most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.