integrating CTA form popup on button click in external websites

Hi, i am trying to integate a cta form popup to my website, and i can’t find a way to do that.
when creating the CTA form and choosing the open on. button click targetting option, i choose to see the snippet and it only gives me html attributes to put on my button.
```

hs-cta-trigger-button hs-cta-trigger-button-[formNumber]

```
the attributes do not work on their own, and i can’t find how to make the do. it seems i am missing some general script that i add to my html webpage to link with the attributes that i got

@MKadhemMansou - do you have the HubSpot tracking code installed on your external site pages? This enables a wole range of HubSpot engagement features.

Steve

this is the snippet of code that you are mentioning :

<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/NUMBER.js"></script>

if so, i do have it in my code base. it’s not helping. in fact i only have the tracking node and the attributes on the button that is supposed to trigger the form to appear.

You may also have to have the related web site pages included in your CTA targeting criteria. In fact I would use this as a good test to make sure the tracking code is enabling the CTA functionality without a button press.

Steve

Thanks, i was under the impression that the snippet is an attribute but rather it was a class to add to a button. it worked on a simple example.
The real issue i was having is with buttons created using js, in a single age app using the likes of react and vueJs, those buttons are not recognized and they don’t have the event listner for the click event.
I tried reloading the tracking script by appending it again to the html, but that didn’t work and the buttons stayed without the event listener.