title: Send GA Events using onClick event
body: <p>I am trying to send an event to Google Analytics when clicking on a specific button. </p>
  
  <p>this is my button ID: <code>(#data_243342)</code></p>
  
  <p>This is my <code>GA</code> script to push on clicking on the above button.</p>
  
  <pre><code>onclick="dataLayer.push({"event": "eventGA","eventCategory" : "data1","eventAction" : "data-1-click","eventLabel" : "yes"})"
  </code></pre>
  
  <p>How can i pass this in a <a href="/questions/tagged/jquery" class="post-tag" title="show questions tagged &#39;jquery&#39;" rel="tag">jquery</a>or <a href="/questions/tagged/javascript" class="post-tag" title="show questions tagged &#39;javascript&#39;" rel="tag">javascript</a>? </p>