Title: google analytics java script in all pages
Last modified: August 20, 2016

---

# google analytics java script in all pages

 *  [tiberakis](https://wordpress.org/support/users/tiberakis/)
 * (@tiberakis)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/google-analytics-java-script-in-all-pages/)
 * I recently followed the instructions for installing my google analytics code 
   in some page:
 *     ```
       <script type="text/javascript">
   
         var _gaq = _gaq || [];
         _gaq.push(['_setAccount', 'UA-36765049-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>
       ```
   
 * As I got some problems with sitemaps, I removed that code from each page. Surprisingly
   the removed code is still present in the **source code** of each page, and it
   still gives me problems with sitemaps.
    How can I remove that code? I am really
   becoming mad about that problem. Thank you in advance. My site is: [velespiegate.it](http://velespiegate.it)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Christine Rondeau](https://wordpress.org/support/users/crondeau/)
 * (@crondeau)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/google-analytics-java-script-in-all-pages/#post-3245285)
 * Check your header.php template in your theme directory.
    That’s where the GA 
   code normally gets inserted.
 *  Thread Starter [tiberakis](https://wordpress.org/support/users/tiberakis/)
 * (@tiberakis)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/google-analytics-java-script-in-all-pages/#post-3245303)
 * Thank you Christine,
    but I don’t find the code in the header.php of my theme.
   If I activate another theme, the code is still there. With firefox “view generated
   source” I get: `<html class=" js rgba backgroundsize borderradius boxshadow textshadow
   opacity cssgradients csstransitions generatedcontent" dir="ltr" lang="it-IT">
   <head><script src="http://www.google-analytics.com/ga.js" async="" type="text/
   javascript"></script><script type="text/javascript">` When I use “inspect element”
   on the google analytics java script, it seems to match the rules of a “user agent
   stylesheet”, but I can’t find a similar stylesheet.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘google analytics java script in all pages’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [tiberakis](https://wordpress.org/support/users/tiberakis/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/google-analytics-java-script-in-all-pages/#post-3245303)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
