I have below anchor tags in my site and I am tracking data in Google Analytics using GTM.
I have created a custom html Tag in GTM which sends user data to GA. This tag will fire when trigger with Click_ID matches 'Nav_Link1' or 'Nav_Link2'. Inside my GTM tag, I need to get corresponding href value which matches with id. If I click first link I need to capture, first links href value and same as for all the anchor tags.
How to achieve this in GTM?
<a id="Nav_Link1" href="/External/UserData">UserData</a>
<a id="Nav_Link2" href="/External/OwnerData">OwnerData</a>