Google Analytics code not working
If the Google Analytics code that you have added in the theme’s options page is not working for you or if the code is displayed in the content of the page, that’s most likely because the code might not be inserted in the correct format – you have to make sure to insert the entire tracking code that the Google Analytics service provides, and not only your tracking ID. The Google Analytics code should be in the following format:
<script> CODE GOES HERE </script>
For more information about how to retrieve your Google Analytics code, please refer to the following guide where this is explained in detail:
https://support.google.com/analytics/answer/1032385?hl=en