WordPress.org

Support

Support » Plugins and Hacks » [Resolved] google java script in sitemap

[Resolved] google java script in sitemap

  • tiberakis
    Member

    @tiberakis

    I got this java script, that I inserted in my pages in order to have them indexed by google, at the beginning of my sitemap_index.hml:

    <script type="text/javascript">
    
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UZ-123456789-1']);
      _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>

    This results in having an error message:

    error on line 14 at column 6: XML declaration allowed only at the start of the document

    What is worst, Google analytic doesn’t recognize the file.
    I eliminated the script from each page and article, but it is still present in the sitemape_index and I am not able to change that.
    How can I regenerate the sitemap? Help please.
    My site is velespiegate.it.

    http://wordpress.org/extend/plugins/wordpress-seo/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] google java script in sitemap’ is closed to new replies.