Google Analytics code

edited August 2014 in Theme support
HI again support,

I have an issue in my website, I have copied the google analytics code im theme options and now it shows in front end and seems also not close the head tag in the correct part of code. I ask you to fix the problem.

Many thanks for support.

Juan.

Website is: http://inpromar.es/

Comments

  • Hi Juan,

    unfortunately you did it wrong. You have copied only Google Analytics ID instead of whole GA code. This code should be exactly the same as you got in Google Analytics panel, for example our code looks like this one below:
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-xxxxxxxx-x', 'domain.com');
      ga('send', 'pageview');

    </script>
Sign In or Register to comment.