title: ga send event in google analytics.js
body: <p>I'm using Google analytics.js (so not the 'old' ga.js) and in some links I have for example:</p>
  
  <pre><code>&lt;a href="www.example.com" onclick="ga('send', 'event', 'outbound link', 'position: header');"&gt;Link&lt;/a&gt;
  </code></pre>
  
  <p>The onclick code is dynamically generated by php depending on what page you are. Now I can't test it yet since my account hasn't been converted into the new analytics.js, but I was wondering what I should put in the code in the <code>&lt;head&gt;</code> section of my page.</p>
  
  <p>The docs states I should put</p>
  
  <pre><code>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  
  ga('create', 'UA-XXXX-Y', 'auto');  // Creates a tracker.
  ga('send', 'pageview');             // Sends a pageview.
  </code></pre>
  
  <p>But do I need to add <code>ga('send', 'event')</code> below that? Isn't really clear from the docs...</p>