Today I am going to show you a simple trick so you can avoid a few hours of head-banging while trying to fix your Google Universal Analytics code not being detected anymore and/or erase the frustration of having a real-time feature menu taking up half the left-hand panel but that always shows only one data - '0'.
I assume you understand where to find/paste your tracking code, you know what you're doing and you have checked your Analytics setup at least 10 times in the past 8 hours. You've googled until dawn came up and you just can't understand why you have had data coming in before, only now it won't work, for no apparent reason.
Even though I'm not too sure why, here is the awfully simple trick that worked for me, on each of the domains I am tracking. Indeed, I am tracking 3 different domains from the same Analytics account.
Just replace the 'auto' value (as in ga('create', 'UA-XXXXXXXX-X', 'auto');) by the domain name you are trying to track, but without the 'http://www' part, so it will look like 'mydomain.com' only. Make sure your FTP client has updated your file(s) correctly. Now visit your domain and then check your real-time visitor's menu in your GA page, you should see at least 1 user, which is you.
As for the debate about where to put the tracking code exactly, I have placed mine just before the ending body tag and it should not matter if it's included in a php file or not.
Do not worry about seeing 'Status: Tracking Not Installed' as it takes hours for it to update. The important thing being that if you could see yourself in the real-time stats, then it means Google is tracking your domain's data.
Edit: Since I wrote this article, that's about 3-4 hours ago, my status changed back to receiving data and my stats are updating again.
I hope this helped a few of you. Stay tuned and come back for more on RolandC.net
0 comments
Leave a comment