title: dynamically embedded google analytics from widget
body: <pre><code>var script2 = document.createElement( 'script' );
  script2.value = "var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-xxxxxx-1']);_gaq.push(['_setDomainName', 'http://www.widget.devserver2012.com']);_gaq.push(['_setAllowLinker', true]); _gaq.push(['_trackPageview']);(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);})()";
  
  $('head').prepend(script2);
  </code></pre>
  
  <p>I am using this code to embed Google Analytics in the document head from a javascript widget, users will be embedding on their page.  But is Google Analytics is not receiving data.</p>