Setting Up Events in Google Tag Manager with Parent/Child Attributes
<p>Pushing code out on my site only happens monthly and I wanted to add in event tags on certain buttons on the site using google tag manager. </p>

<p>Because the classes &amp; ID's are in the parents and not directly on the click attribute I was having trouble figuring out how to target the specific button. Right now every time I test it in different ways I can't seem to get it to work. I was reading this article to try to help me: <a href="http://www.periscopix.co.uk/blog/new-gtm-trigger-condition-matches-css-selector/" rel="nofollow">http://www.periscopix.co.uk/blog/new-gtm-trigger-condition-matches-css-selector/</a> </p>

<p>The piece of code I'm trying to target is users who click on the 'Apply' button. </p>

<pre><code>        &lt;div id="universal-actions" class="pull-right"&gt;
            &lt;ul class="nav nav-pills"&gt;
                &lt;li class="button-visit"&gt;&lt;a href="/visit/"&gt;Visit&lt;/a&gt;&lt;/li&gt;
                &lt;li class="button-apply"&gt;&lt;a href="/apply/"&gt;Apply&lt;/a&gt;&lt;/li&gt;
                &lt;li class="button-login"&gt;&lt;a href="/login/"&gt;Login&lt;/a&gt;&lt;/li&gt;
</code></pre>

<p>I tried a couple different variations of just targeting the ID &amp; the li class, and just the class and the click URL, just can't seem to get it right. Most recently I tried a CSS selector of: ul.nav nav-pills > li.button-apply</p>

<p>Thanks for any help! I'm new to google tag manager and am really having trouble with these parent attributes. </p>