Analytics
5.2K members online now
5.2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Analytics Code in Wrong Spot

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Please help! So on my blog fancythatblog.blogspot.com I have Google Analytics code implemented in the HTML but I found out through talking to a support rep that it's in the wrong spot. Then I had someone help me put it in the right spot but now I think the code is in there twice. Can someone help me move the analytics code to the right spot and delete the spots where the code is in the wrong place?

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Nicole M
April 2017

Analytics Code in Wrong Spot

Top Contributor
# 4
Top Contributor

It's towards the bottom of the site template code down towards the closing </body> tag, are there any widgets at the bottom of the website that you can check in to see if the code is in one of those?

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

View solution in original post

Re: Analytics Code in Wrong Spot

Top Contributor
# 2
Top Contributor

Hi @Nicole M :-)

You need to remove the following code which seems to be towards the bottom of the template code

<script type='text/javascript'>
          var _gaq = _gaq || [];
          _gaq.push(['_setAccount', 'UA-48682441-1']);
          _gaq.push(['_trackPageview']);
          (function() {
            var ga = document.createElement('script');
            ga.type = 'text/javascript';
            ga.async = true;
            ga.src=(document.location.protocol == 'https:' ?
                      'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(ga, s);
          })();
        </script>

 

 

 

 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Analytics Code in Wrong Spot

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi! Well, when I go to "Edit HTML" i can't seem to find that code. 

Marked as Best Answer.
Solution
Accepted by topic author Nicole M
April 2017

Analytics Code in Wrong Spot

Top Contributor
# 4
Top Contributor

It's towards the bottom of the site template code down towards the closing </body> tag, are there any widgets at the bottom of the website that you can check in to see if the code is in one of those?

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Analytics Code in Wrong Spot

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Found it! Thank you! I saw that but wasn't sure if that was a code I could remove but I think that did it. Thank you!!

Analytics Code in Wrong Spot

Top Contributor
# 6
Top Contributor

Yeap.. that has removed it :-))

 

Cheers

Bronwyn

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here