title: Asynchronous Google Analytics not logging in IE
body: <p>The code I have in place is tracking visits from Chrome, Safari, Firefox, Opera Mini, but not IE.  I believe the problem to be a matter or loading order, scope, or possibly the code placement.  I am currently using the following:</p>
  
  <p>In my <code>example.html</code>:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://www.google-analytics.com/ga.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="example.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>In my <code>example.js</code>:</p>
  
  <pre><code>var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-########-1']);
  _gaq.push(['_trackPageview']);
  </code></pre>
  
  <p>Where UA numbers have been changed to protect the innocent :).</p>
  
  <p>First option:<br/>
  - Remove the <code>ga.js</code> from the <code>html</code> file<br/>
  - Add the script injection code to the <code>example.js</code> file below the <code>_gaq.push</code> calls:</p>
  
  <pre><code>(function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  </code></pre>
  
  <p>Has anyone had any success with putting the tracking code inside a javascript file?  Or do I have to move all the tracking code to the <code>html</code> file using <a href="http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html" rel="nofollow noreferrer">the snippet</a> from Google.</p>