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

XF 1.1 Can't Verify my site on Webmaster Tools?

Discussion in 'Troubleshooting and Problems' started by fEaRz, Jul 30, 2013.

  1. fEaRz

    fEaRz Member

    I can't verify my site with the original Google_Analytics xenforo template 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

    <xen:if is="{$xenOptions.googleAnalyticsWebPropertyId}">
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', '{$xenOptions.googleAnalyticsWebPropertyId}']);
      (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);
  2. fEaRz

    fEaRz Member

  3. Brogan

    Brogan XenForo Moderator Staff Member

    You will likely need to contact Google to ascertain why it is being rejected as the default template seems to work for everyone else.
  4. Parminder Singh Chahal

    Parminder Singh Chahal Active Member

    The best way of doing this is by creating a DNS record at your registrar.

Share This Page