title: ReferenceError: ga is not defined on some browsers
body: <p>I've got a Laravel 5 website, using Google Universal Analytics. On my cart page, I send a GA event via Javascript. However this causes a "ReferenceError: ga is not defined" on some browsers (e.g. IE, Chrome on Android, Windows 7, Mac OS). On other browsers it works just fine (e.g. Chrome &amp; Firefox on Windows 10)</p>
  
  <p>Making GA load synchronously seems to fix the issue on IE (<a href="https://stackoverflow.com/questions/18146182/synchronous-universal-analytics">Synchronous Universal Analytics</a>) but I'm not sure if it will cover all browsers. In any case, is there a better way to solve this?</p>
  
  <pre><code>&lt;head&gt;
  &lt;script&gt;
  
          (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', '{{ getenv('GA') }}', 'auto');
          ga('set', 'userId', {{$ga_u_id}});
          ga('send', 'pageview');
          ga('require', 'ec');
      &lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>Then in Javascript (jQuery specifically) later in the body:</p>
  
  <pre><code>                    ga('send', 'event', 'checkout', 'cart', 'none', 50);
  </code></pre>
  
  <p>Thanks</p>