I would like to create a trigger in tagmanager that fires when either of the two elements present in are clicked.
Here's the source code to get a better understanding
<div class="col-lg-3 col-md-4">
<a class="loan_for_travel" href="/loan-for-travel">
<div><img class="img_travel_loan" src="https://images.pexels.com/photos/3760067/pexels-photo-3760067.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2"></div>
<div>
<p class="Travel"><span>Travel</span></p>
</div>
</a>
</div>
I would like the trigger to get fired when either of the following things happen
I tried to fetch the parent class using a javascript but it returned null.
Both element are wrapped by the a
tag. Why not just track the a
?
Or is there any specific requirement