• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Google Analytics code different?


Well-known member
I've added my GA account via my ACP and it's tracking but the code that's automatically inserted is different to the one to be manually inserted from my GA admin page.

XF automatically inserts:
   var _gaq = [['_setAccount', 'UA-XXXXXX-1'], ['_trackPageview']];
  !function(d, t)
  var g = d.createElement(t),
  s = d.getElementsByTagName(t)[0];  g.async = true;
  g.src = ('https:' == d.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  s.parentNode.insertBefore(g, s);
  (document, 'script');
Whereas the code that GA says to insert is:

<script type="text/javascript">

 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-XXXXXX-1']);

 (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);

Is this difference significant at all?