Archived topic
Google Tag Manager and variable Click Classes
3 replies · Started by Craig on May 6, 2022
Hi
I am trying to use Google Tag Manager to track the clicks made on the menu items. I have set this up and all is good except that when I look in the Variables section of the Link Click summary, the class is "". When I inspect the page the class for the menu items is menu-item. Without the class being populated with the class I am unable to track the event of clicking on menu items.
Why does this class not get pulled through to GTM
Thanks
Craig
Hi there,
that i assume is how the GTM variable is being tracked. The first thing to check is what is the clickable item ?
The menu-item class is on the li not <a> - so is google collecting the click on the link ?
I also found a good article here, where a user had a similar issue, and they shared their method of click tracking:
https://stackoverflow.com/questions/44172357/gtm-cannot-track-click-on-menu-elements
Thanks David
I assume something worked :) (?)
Glad to be of help