title: Two separate script tags for Google Analytics?
body: <p>Does anyone know why Google Analytics requires two separate script tags?</p>
  
  <p>Specifically, their instructions advise users to embed the following snippet of code into a web page for tracking purposes:</p>
  
  <pre><code>&lt;!-- Google Analytics --&gt;
  &lt;script type="text/javascript"&gt;
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  try {
  var pageTracker = _gat._getTracker("UA-8720817-1");
  pageTracker._trackPageview();
  } catch(err) {}&lt;/script&gt;
  </code></pre>
  
  <p>Why couldn't users use only one script block like this:</p>
  
  <pre><code>&lt;!-- Google Analytics --&gt;
  &lt;script type="text/javascript"&gt;
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  try {
  var pageTracker = _gat._getTracker("UA-8720817-1");
  pageTracker._trackPageview();
  } catch(err) {}&lt;/script&gt;
  </code></pre>