Search code examples
google-analyticsanalytics

Problems with Google Analytics - Tracking not installed, but tracking, but no real time


I wanted to install google analytics on my new site. I've set up the site, and pasted the code into my html web page and got it online. I'm using the Universal code version.

When I first put it up I put the code just before the but after uploading it, the real time views didn't work and it told me 'Tracking Not Installed' so i used Googles Tag Assistant which told me that there was a critical error - HTTP Response Error (something along those lines).

I then removed the code and put it just before the tag, when uploading it now, real time views still do not work, but it appears to have started to collect data, views, users, etc. When I know use googles tag assistant it tells me there are no problems just a suggestion that it should be in the head. Inside Google Analytics it is still telling me that 'Tracking Not Installed'.

Does it just take time to update? (been around 3 hours since first adding the code)

The website a one page site using css cheat script and things a long that line (lots of javascript) could this be a problem? (I didn't create the site).

I've doubled checked the account code and thats correct and also the http/https in the settings is set correctly to http.

Any help would be greatly appreciated.

The code I'm using:

 <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', 'REMOVED', 'auto');
  ga('send', 'pageview');

</script>

Solution

  • If you just put the code in, then it normally takes from 24-48 hours for the status to change. If you can see Real-Time events tracking, say, with your own visits for example, then you should be good, and you can ignore the error message. How do you know that the tracker is collecting "data, views, users, etc."? Also, it's best practise to put the tracker within the head tags.