Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google analytics: Tracking Not Installed

I am trying to setup Google Analytics on my site, however it will not detect that it is being tracked.

I have placed the code they provided in my header.php right before the </head> as recommended:

<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-41420598-1', 'example.com');
ga('send', 'pageview');

</script>

Not really sure what else to do..

like image 642
Chris Avatar asked Jun 03 '13 19:06

Chris


People also ask

Why is my Google Analytics not tracking?

If the goal page is not tagged with tracking code, Analytics does not track this page, and as a result does not track goals. You should also make sure that you've installed the correct tracking code on your pages since the code is specific to each account property.

How do you check if Google Analytics is installed?

On a PC use “Control+F” or for Macs use “Command+F”. Then type in “UA-” (without the quotes) in the “Find” text box. If Google Analytics is installed, you should see the snippet (like: UA-453782-0) highlighted. You might need to scroll down to find it.


3 Answers

It took a day or two after I put the tracking code on each of my pages for the status on my Google Analytics Tracking Info tab to be updated from "Tracking Not Installed" to "Universal Analytics is enabled for this property". During this time I was seeing regular activity in my tracking reports.

If you're brand new to Google Analytics, the default reports only include data up to the previous day. If you want to check for activity on the same day that you added the tracking code, you have to adjust the date range to include the current day's activity.

like image 157
drs Avatar answered Sep 22 '22 06:09

drs


That's their new tracking code, I wouldn't be surprised if their detector isn't set up to find it yet. Go into the Google Analytics real-time dashboard and see if your pageviews are showing up - if they are, don't worry about the incorrect flagging.

like image 34
ceejayoz Avatar answered Sep 23 '22 06:09

ceejayoz


I fix this by using the asynchronous script first, then visiting a page on the site, refreshing the GA screen to check if the status has been changed, then replacing the GA script with the Universal script once the status has been updated. It works every time. It makes my clients happy.

like image 38
user3908875 Avatar answered Sep 24 '22 06:09

user3908875