Fire Google Analytics events on button clicks
I am trying to fire up Google Analytics events when people click on certain buttons.
A content (or CTA) widget, for instance, only lets me insert the href and the anchor. I don’t have any way to add an onclick() event.
Adding a custom class to a widget section (to capture in the Google Tag Manager data layer) wouldn’t allow me to track buttons individually if there are more than in in the widget (CTA, Slider, etc.).
How could I work around this?
Thanks for your help!
Answered on January 11, 2016.
Hi there,
Please see this dicussion: