title: Google Analytics Event Tracking on Button
body: <p>I'm attemptng to use Google Analytics event tracking on a landing page.  I've got the code in two places on the page, attached to two elements, tracking the clicks on those elements.</p>
  
  <p>In one spot - a pop-out lightbox video - the tracking works perfectly.  It picks up in GA instantly.  </p>
  
  <p>However, with the other spot on the page (the more important one), I can't seem to get it to pickup in GA.  The code is implemented in the exact same way, and using the Google Analytics debuggers in Chrome, both seem to be firing off the exact same information on click.</p>
  
  <p>In one instance, the code is in  and in the other in the  element.</p>
  
  <p>I've attached the two snippets of code below.</p>
  
  <p>Any help at all would be really appreciated.</p>
  
  <p><strong>WORKING CODE:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;a class="button" href="http://player.vimeo.com/video/134791294?autoplay=1" target="_blank" id="fancybox-video2" data-fancybox-type="iframe" class="fancybox.iframe" onclick="ga('send','event','played-video','clicked-play','button');"&gt;Watch the video&lt;/a&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>INCORRECT CODE:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button type="submit" onclick="ga('send','event','Signed-Up','clicked-button','Free-Trial-14-Days');"&gt;Get Started&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>