Mobile app version of vmapp.org
Login or Join
Jennifer507

: What is a 'auto event variable' While creating User-Defined Variables in GTM, one comes across with type of 'Auto-Event Variable'. I am not entirely sure what it does, and how can it be utilized.

@Jennifer507

Posted in: #Analytics #GoogleAnalytics #GoogleTagManager

While creating User-Defined Variables in GTM, one comes across with type of 'Auto-Event Variable'.

I am not entirely sure what it does, and how can it be utilized.

Also if I set it to element class then how is it different from say a 'click class' variable?

Please find the image of the variable attached.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Jennifer507

1 Comments

Sorted by latest first Latest Oldest Best

 

@Megan663

There are probably some good resources that you can tap into for an explanation of what an auto-event variable (AEV) is (for example www.simoahava.com/analytics/auto-event-tracking-google-tag-manager). The way an AEV is described in that article is that it is


[variable] that can be used to refer to, for example, the DOM element where a click occurred.


The key phrase here is "where a click occurred". My own definition would be:


a variable that corresponds to the last element that was last interacted with.


If you want set up a trigger for a particular tag based on the element that was last clicked, and there are attributes of that element that you need for your trigger that might not, for some reason, be available through the Click or Link Click listener, then you would use an AEV. It gives you the ability to get a data-attribute, a class, ID, etc.

Element class can refer to the broader set of HTML elements that have a particular class, and Click class refers to the latest element that was interacted with (or clicked). By setting a trigger to include an AEV where it has an Element class of some value, it will fire the tag whenever ANY element with the particular element class is clicked. Now that I'm typing it out, it's a bit more confusing. I'll likely come back to this to revise it, but I hope it helps a bit.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme