CTA event tracking in Google Tag Manager

Jadon
Participant

I can track via GTM using using a "click text" trigger. But I have a page where the CTA text is "download" on all the buttons. If it was a normal hyperlink I could track it via the URL. But I cannot do this with a hubspot CTA. 

 

Is there a way of uniquely identifying the hubspot CTA's in Google Tag Manager that works to fire an event trigger?

 

I tried experimenting with "Click ID "Contains" and then with the ID number of the CTA. But no luck.

 

Any help much appreciated, driving me up the wall.

0 Upvotes
3 Replies 3
mike-ward
Key Advisor

Hi @Jadon ,

 

I just tried this and you can do it by using the Click Classes option. Set it to 'contains' and enter cta_button as the value. 

 

Screenshot 2020-04-30 at 18.13.24.png

 

All HS CTAs seem to have the class 'cta_button', so it should trigger for every HS CTA on the page. Is that what you're after? 

 

Cheers,

Mike

 

---

Did I answer your question? If your question is answered, please mark it as a solution. If you need more help, hit that big orange 'Reply' button!

 

 

Jadon
Participant

Hi thanks for the reply!

 

I had tried that and expected it to work! However GTM couldnt see any values inside it and same for click id, etc But I figured it out in the end. Whether its my GTM setup or GTM in general or a hubspot CTA issue but I had to change the trigger type to fire on "just clicks" opposed to all elements (Which should be correct!). 

 

And then I just changed the label of each tag to reflect the CTA, to fire over to GA.

Hope this helps if anyone else runs into this issue.

0 Upvotes
linusgrundstrom
Member

Hey Jadon! Could you share screenshots of your solution? I can't get this to work