How do I detect a click on the following element using "Click Element" variable in Google Tag manager:
<a href="https://amazon.in/product-id" target="_blank" class="amazon-btn">
<div>
<span>BUY NOW AT</span>
<div class="amz-logo"></div>
</div>
</a>
I have created the following trigger:
Click - All Elements -> Some Clicks -> Click Element -> matches CSS selector -> *.amazon-btn*
This doesn't trigger on clicking the element.
The following is the click element in the debug window:
'HTMLDivElement: html > body > section.content.looking-sec > div.container > div.row > div.col-md-6.looking-cont > div.btn.btn-custom.btn-top.hide-small > a.amazon-btn > div'
I even tried, Click Element -> contains -> amazon-btn . That doesn't work either.



*.amazon-btn*would make any sense to begin with. Did you try just.amazon-btn? If that does not work either, then we probably going to need a better problem description to begin with..amazon-btndoesn't work either.