CTA Javascript & Modals



I want to create a modal that contains a form inside of it. The only thing is that I want a CTA when clicked to be able to open the modal and access the form inside. This is for tracking purposes on who is clicking the CTA. Now the thing is that I can’t do any of this with the CTA because by default it will not work.

I want to know how to access the Javascript files for the CTA in order to have the CTA to open a Modal when clicked on and have a form I built in Hubspot to be able to inside this modal for leads to fill out


Did you ever work out a solution? I'm interested in doing the same thing.


Hi @ra9r,

CTA tracking requires the destination URL to have a number of query parameters appended to it, so it's not the best way to track clicks to open a modal. I'd recommend using your own button and custom events, or potentially another analytics service.