Google Analytics Setup
PermalinkI've gone to the dashboard and pasted in the tracking code that google gave me:
<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', '....com'); ga('send', 'pageview'); </script>
And put it in the header. (Yes I edited out the UA number and website name). When I look at the source of my site, it is showing up in the header.
I'm using one of the default themes (Greek Yogurt).
I know this may be a silly question, but.... did you wait a few minutes after installing the code, then refreshed the Google analytics page? It often doesn't show as working unless the page is refreshed.
I thought there was a problem, because every time I refreshed the google analytics page it would say "last checked at TIME" where TIME is when I refreshed. But its better now.
Thanks for your help though!
I'd forgotton to add the redirect to my .htaccess file :(