Title: google java script in sitemap
Last modified: August 20, 2016

---

# google java script in sitemap

 *  Resolved [tiberakis](https://wordpress.org/support/users/tiberakis/)
 * (@tiberakis)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/google-java-script-in-sitemap/)
 * 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://velespiegate.it).
 * [http://wordpress.org/extend/plugins/wordpress-seo/](http://wordpress.org/extend/plugins/wordpress-seo/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [tiberakis](https://wordpress.org/support/users/tiberakis/)
 * (@tiberakis)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/google-java-script-in-sitemap/#post-3241022)
 * The code was in the index.php file.

Viewing 1 replies (of 1 total)

The topic ‘google java script in sitemap’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [sitemap](https://wordpress.org/support/topic-tag/sitemap/)

 * 1 reply
 * 1 participant
 * Last reply from: [tiberakis](https://wordpress.org/support/users/tiberakis/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/google-java-script-in-sitemap/#post-3241022)
 * Status: resolved