title: Google Tag Manager Click Classes Event not working
body: <p>I am working with a page that contains an iFrame using a system which seems written by aliens. The system was written many years ago in <code>dotNet</code> framework.</p>
  
  <p>I am trying to track a click event via a tag but I have noticed that when clicking the element in the iFrame, the console shows 2 elements being clicked and <code>Tag Manager</code> shows 2 click events. The first element shown from the click is an element hidden at the top of the page, the second click is the element I clicked.</p>
  
  <p>The <code>HTML</code> is: </p>
  
  <pre><code>&lt;input type="button" name="BOOK NOW" value="Book Now" class="platinum-book-button btn btn-primary"&gt;
  </code></pre>
  
  <p>In <code>Tag Manager</code> I have set up a trigger as follows:</p>
  
  <pre><code>Trigger Type: Click All Elements
  Trigger Fires: Some Clicks
  Condition: Click Classes - matches CSS Selector - .platinum-book-button .btn .btn-primary
  </code></pre>
  
  <p>I then add in the console (as `CTRL - Click does not stop page changing):</p>
  
  <pre><code>document.addEventListener('click', function (event) { 
      event.preventDefault(); 
      console.log(event.target); 
  }, false);
  </code></pre>
  
  <p>and console shows:</p>
  
  <pre><code>&lt;input type="submit" name="ctl00$plcBody$BookingFormGrid$ctl04" value="BOOK NOW" onclick="$('form').attr('action', 'DetailsEntry.aspx?bfid=126b48d6-e3b9-4e57-8be6-067da3425467&amp;amp;bfpid=c125f99a-093c-402a-8855-436e7d233d74&amp;amp;bfrtid=bf8acbd4-78a1-4391-9972-3366c5405ce3&amp;amp;arr=2019-07-07&amp;amp;nts=5&amp;amp;a=1&amp;amp;c=0');WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&amp;quot;ctl00$plcBody$BookingFormGrid$ctl04&amp;quot;, &amp;quot;&amp;quot;, true, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;, false, false))" class="btn btn-primary bnow"&gt;
  
  &lt;input type="button" name="BOOK NOW" value="Book Now" class="platinum-book-button btn btn-primary"&gt;
  </code></pre>
  
  <p>The first element is hidden at the top of the page and not the element I have clicked. The trigger does not fire as the click classes condition is not met.</p>
  
  <p>What have I missed?</p>