Reporting & Analytics

Jadon
Participant

CTA event tracking in Google Tag Manager

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.

5 Replies 5
raejada
Participant

CTA event tracking in Google Tag Manager

For me this only worked using the Form Text element. Example:Google-Tag-Manager.png

But this may differ depending on your page.

Best way to pinpoint the method that will work for you is to use the Google Tag Manager "Preview" feature. Then look in the Tag Assistant window on the left hand side for the Click event.

Tag-Assistant-Not-connected-.png

 

 

 

 

 

 

 

 

 

 

Once that is selected, view the Variables tab to see what triggers you have available in your instance. For me this was the Form Text variable as the easiest way to identify that specific CTA. Provided you use different call to action words for each CTA this will work. 

0 Upvotes
hammermarketing
Participant

CTA event tracking in Google Tag Manager

@Jadon Your follow up helped me a ton.

Instead of the trigger set to "Click - All Elements", I changed it to "Click - Just Links" - that did the trick in picking up the click class.
Thank you.

mike-ward
Key Advisor

CTA event tracking in Google Tag Manager

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

CTA event tracking in Google Tag Manager

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

CTA event tracking in Google Tag Manager

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