• 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' : 'https://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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Check your header.php template in your theme directory.
    That’s where the GA code normally gets inserted.

    Thread Starter tiberakis

    (@tiberakis)

    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="https://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.