Google Analytics tracking code - by paulgor

This topic has 2 replies, 2 voices, and was last updated 7 years ago ago by Olga Barlow

  • Avatar: paulgor
    paulgor
    Participant
    March 30, 2017 at 11:13

    Hi, Olga Barlow.
    Where we find in 8Theme Options menu for add Google Analytics code?

    <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','https://www.google-analytics.com/analytics.js','ga');
    
      ga('create', 'UA-96455316-1', 'auto');
      ga('send', 'pageview');
    
    </script>

    Thanks?

    1 Answer
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    March 30, 2017 at 12:46

    Hello,

    It is bad practice to add such code into theme options, because once you change theme you will lose tracking. We don’t have such fields. Use Insert Footers and Headers plugin to add the code.

    Regards

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.