title: ga or _gaq.push for Google Analytics event tracking?
body: <p>I would like to track an <code>onclick</code> of a button on a page on a site, after a condition is passed checking if a cookie is present.</p>
  
  <p>Very simple but which syntax would work best?</p>
  
  <p>I have researched the <code>ga</code> and <code>gaq_push</code> prefix of the GA event tracking syntax and (forgive me if I'm wrong) but they seem pretty similar?</p>
  
  <p><strong><code>_gaq.push</code></strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  jQuery(document).ready(function () {
      if (jQuery.cookie('entry_winagrand_cookie') !== null) {
          jQuery('notregisterbtn').on('click', function () {
              _gaq.push(['_trackEvent', 'QR_Win_A_Grand', 'Clicked through to Register']);
          });
      }
  });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong><code>ga</code></strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  jQuery(document).ready(function () {
       if (jQuery.cookie('entry_winagrand_cookie') !== null) {
           jQuery('notregisterbtn').on('click', function () {
               ga('send', 'event', 'button', 'click', 'QR_Win_A_Grand', 'Clicked_through_to_register');
           });
       }
  });
  &lt;/script&gt;
  </code></pre>