CTA Javascript & Modals

SOLVE
Kevin_Shrestha
Member

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

1 Accepted solution

Accepted Solutions
Derek_Gervais
Solution
HubSpot Employee

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.

View solution in original post

3 Replies 3
ra9r
Participant

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

Derek_Gervais
Solution
HubSpot Employee

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.

View solution in original post

eteich
Member | Partner

Yeah, this is only a solution if you are on Marketing Hub Enterprise which costs around 40k a year.  It is a real shame that you don't offer custom event tracking for all account levels.