fEaRz
Member
I can't verify my site with the original Google_Analytics xenforo template code ->
I changed it and now Google Webmaster verify without problems (any tips?)
This code is ok? (I got it on analytics website) Thanks
Code:
<xen:if is="{$xenOptions.googleAnalyticsWebPropertyId}"><script>
var _gaq = [['_setAccount', '{$xenOptions.googleAnalyticsWebPropertyId}'], ['_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');
</script><xen:comment><!--Adapted from http://mathiasbynens.be/notes/async-analytics-snippet--></xen:comment></xen:if>
I changed it and now Google Webmaster verify without problems (any tips?)
This code is ok? (I got it on analytics website) Thanks
Code:
<xen:if is="{$xenOptions.googleAnalyticsWebPropertyId}">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{$xenOptions.googleAnalyticsWebPropertyId}']);
_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);
})();
</script>
</xen:if>