title: Click Element with CSS selector is not working in Google Tag Manager
body: <p>How do I detect a click on the following element using &quot;Click Element&quot; variable in Google Tag manager:</p>
  <pre><code>&lt;a href=&quot;https://amazon.in/product-id&quot; target=&quot;_blank&quot; class=&quot;amazon-btn&quot;&gt;
      &lt;div&gt;
          &lt;span&gt;BUY NOW AT&lt;/span&gt;
          &lt;div class=&quot;amz-logo&quot;&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/a&gt;
  </code></pre>
  <p>I have created the following trigger:</p>
  <pre><code>Click - All Elements -&gt; Some Clicks -&gt; Click Element -&gt; matches CSS selector -&gt; *.amazon-btn*
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ipsLy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ipsLy.png" alt="enter image description here" /></a></p>
  <p>This doesn't trigger on clicking the element.</p>
  <p>The following is the click element in the debug window:</p>
  <pre><code>'HTMLDivElement: html &gt; body &gt; section.content.looking-sec &gt; div.container &gt; div.row &gt; div.col-md-6.looking-cont &gt; div.btn.btn-custom.btn-top.hide-small &gt; a.amazon-btn &gt; div'
  </code></pre>
  <p><a href="https://i.stack.imgur.com/LNfpM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LNfpM.png" alt="enter image description here" /></a></p>
  <p>I even tried, <code>Click Element -&gt; contains -&gt; amazon-btn</code> . That doesn't work either.</p>