title: Tracking link clicks with google analytics?
body: <p>I'm a complete beginner with Google Analytics, and I need to know how to set it up so that it can track the number of clicks a link on my website gets?</p>
  
  <p>For example I have a link:</p>
  
  <pre><code>&lt;a href="https://google.com"&gt;link&lt;/a&gt;
  </code></pre>
  
  <p>I know I'm supposed to put an <code>onClick</code> event on there somewhere but I don't have any idea how it links to Google Analytics?</p>
  
  <p>Is this the correct Onclick code:</p>
  
  <pre><code>onClick="_gaq.push(['_trackEvent', 'Link', 'Click', 'Banner Advert1']);"
  </code></pre>