Support » Plugin: Yoast SEO » google java script in sitemap

  • Resolved 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']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

    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

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