Google Analytics says "Tracking Not Installed" but I see it working? - google-analytics

My site www.katievb.com is a blog hosted by blogspot.com. I've created a Google Analytics account and registered a "Universal Analytics" property. It provided a unique UA ID and some code to embed in the HTML that looks similar to this:
<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', 'katievb.com');
ga('send', 'pageview');
</script>
I did this probably about 24 hours ago. The GA admin page has said "Status: Tracking Not Installed" this whole time. However, GA Real-Time actually does track my visits. (I can use Firefox on a Mac and in real-time see that on the Analytics screen, and then I can go over to a Windows computer with Chrome and visit katievb.com and see that on the real-time screen too.)
In blogspot's settings, I intentionally did NOT populate the Settings > Other > Analytics Web Property ID because it appeared to me that that would expect that I was using the old-style Google Analytics (ga.js) and not this new kind (analytics.js).
Also, I then replicated this in a completely independent pair of blogspot/GA accounts.
Why does it say "Tracking Not Installed"? It seems to be tracking, and I'm not sure what I'm supposed to change about how I installed it.
I've read the instructions many times and have tried different versions of their code and placing it in different locations, such as prior to </head> or </body>.

Eventually it started working. I think it took a day or 2 for the status to accurately reflect that tracking had been properly installed. It's bizarre... because Real-time was working, so I would have guessed that Google's status code would have been able to be updated real-time too.

It takes up to 72 hours to detect, but look in the Reporting section, Standard Reports, under Real Time, and it should show at least 1 active visitors on the site, which is probably you.

You can access to real time tracking.
To see Real-Time data, navigate to the Reporting tab and select Real-Time from the left hand report navigation column.
You will see 1 visitor if there were 1 visitor within the last minute.

Related

UTM Source not passing through (google analytics)

I've got an email campaign that Im trying to track with Google Analytics, but for some reason the source, campaign etc are not being tracked.
The URL I'm using is:
https://makemeacocktail.com/list/14911/wimbledon-cocktails/?utm_source=mailinglist&utm_campaign=weeklynewsletter&utm_term=wimbledon
I've obviously got some htaccess rules kicking in that change the php _GET variables, but that shouldn't really matter here (I dont think).
My GA tracking code is:
const dimensions = {
TRACKING_VERSION: 'dimension1',
CLIENT_ID: 'dimension2',
};
const TRACKING_VERSION = '1';
ga('create', 'UA-22275118-1', 'auto');
ga('set', 'transport', 'beacon');
ga('set', dimensions.TRACKING_VERSION, TRACKING_VERSION);
ga('send', 'pageview');
ga((tracker) => {
var clientId = tracker.get('clientId');
tracker.set(dimensions.CLIENT_ID, clientId);
});
and passing the GA script through using:
<script async src="https://www.google-analytics.com/analytics.js"></script>
(This can all be seen in the source). Am I doing something fundamentally wrong?
Thanks in advance
Here are a few thoughts to troubleshoot this:
Install the Google Analytics Debugger in Chrome and verify your pageview is triggering when the campaign URL is there. You'll be able to see individual dimensions and metrics too (so you can check you custom dimensions too).
It seems like you're implying that the pageviews are working, but I wanted to include this just for due diligence.
Looks like you're relying on ES6 and the beacon to send data. That should be fine, but if your users are on older browsers that may prevent the data from coming through.
UTM campaigns require a utm_campaign, utm_source, and utm_medium to be valid. This does not prevent them from sending, but I'd recommend updating your campaign URLs if possible (you're missing utm_medium).
Are you using a filtered view? If so, your own traffic won't appear in the reports.
Are you using the Real Time reports? If not, you'll need to wait a few hours before the data becomes available in the Google Analytics standard reports.
Hopefully one of those steps gets you pointed in the right direction. Best of luck!
Edit: Viewing the source of that link you provided, I don't see your Google Analytics snippet in there. Maybe you're working on it now, but try viewing the page in an incognito window and check the source (maybe your script is tied to an admin or dev user?).

How can we check analytics code of my site?

I am working on a site Local.mensusa.com. which is sob domain of www.mensusa.com.
I added a analytics code to my site but unable to get traffic on my site.
My code:
<script type="text/javascript">
(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-2085156-1', 'auto');
ga('send', 'pageview');
</script>
1: Is this the right code?
2: There is same code pattern for domain and sub domain?
Yes your code looks correct. If you want to be able to compare the data between the Doman and the subdomain then you should use the same tracking code. If you want to keep the data separate ex: two sites that have no relation to each other what so ever, than create a separate account for it.
Possible causes of your problem are.
When did you create the analytics account? it can take 48 - 72 hours for new accounts to begin recording data.
How long ago did you add that code to your site? it can take 24 - 48 hours for new code to start recording data.
Did you check the Real-time report? Standard reports take 24 hours to complete processing.
This tool is also useful for checking that your code is correct. Extension Google Analytics Debugger
It should be the right code. Otherwise, copy/paste it from the dashboard again.
In order to test it, you can easily check if you currently have visitors on your website: go to real time section.
Finally, about subdomain, you have to create another website to watch (with another google code) to track data.

Google Analytics tracking of the same website with on different domains

basically, my website is based on one set of html codes but it is hosted on 3 different domains. (example.com, example.sg, example.my)
So each of these websites has their unique ids for Google analytics tracking.
Is there a way to tweak the code from Google to track all three websites respectively?
This is the current code I am 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', 'UA-38011741-2', 'versafleet.sg');
ga('send', 'pageview');
</script>
It is from here: https://developers.google.com/analytics/devguides/collection/analyticsjs/
The flaw with the code is that it only takes in one id for example.com and there is no where to include the ids for the other 2 websites.
So is there a way to include the ids of the other 2 websites into code to track them as well? Thanks for your help!
You could change your configuration depending on the hostname. Not tested, but it work something like this:
uaids = {
"domain1.com":"UA-XXXXX-X1",
"domain2.sg":"UA-XXXXX-X2",
"domain3.my":"UA-XXXXX-X3",
}
ga('create', uaids[window.location.hostname], window.location.hostname);
ga('send', 'pageview');
where the uaids-Array stores the Account Ids with the respective domain as index and the hostname is pulled via javascript from the location object to retrieve the value.
It would be more reliable to change the account id serverside (but I guess if that where an option you would not have asked).
However in your case it would be simpler to use the same account id for each domain (since apparently the pages are the same) and use view filters based in hostnames to separate the data (update: on second reading I may have misunderstood the requirements).
Unless you expect people to move between the domains and you want to track visitor sessions across domain boundaries - in that case, as already has been pointed out, you would need cross domain tracking (and you should follow Crayons link and get back to us with any problems you encounter there).
Google Analytics uses 1st party cookie tracking. You need to implement cross domain tracking on your pages in order for GA to track the visitor across multiple domains.

Issue using Google Analytics (ga.js) and Universal Analytics (analytics.js) at the same time

I have attempted to find this questions answer on this site and a few others. But it does not appear to be working for myself. The following url shows explainations on how to use GA and UA together.
How to use both ga.js and analytics.js?
I've tried this example, with the same account and property (but separate property of course), I have tried this with different accounts but I am constantly only getting 'real-time' hits from the first analytic that is ran. Ie, if I put UA then GA, UA only reports live hit, and visa versa.
Additionally I am getting a message on the screen saying "More than one Google Analytic's scripts are registered. Please verify your pages and templates. "
Sad part is when I Google this, I get many results, but they are all sites that are showing the same symptom :(
Tia Charles
Make sure that your not using the same Tracking ID You need to log them to different web Properties.
_gaq.push(['_setAccount', 'UA-xxxxx-y']);
ga('create', 'UA-xxxxx-z', 'yoursite.com');
Notices how one has 'UA-xxxxx-y' and the other is 'UA-xxxxx-z'

google analytics experiments "No Google Analytics tracking code found."?

hopefully someone can help me out.
So l have a google analytics experiment running. However when l set it up and click the "validate code" button l get this error:
No Google Analytics tracking code found.
For both the original, and the variation page.
The thing is, l DO have the google analytics code on the pages.
One thing to note is that my google analytics tracking code looks a little different than most.
It looks like this:
<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-xxxxxxx-1', 'mysite.com');
ga('send', 'pageview');
ga('require', 'ecommerce', 'ecommerce.js');
</script>
Also it's important to note that the site is tracking visits properly in google analytics.
Can anyone help me out?
When I last checked (yesterday) Universal Analytics did not support (yet) content experiments (although it was announced support would be coming soon). I guess you opened a new GA account - new accounts are now set to Universal Analytics as default, you have to manually switch to the previous asynchronous version. However you cannot change this after you started tracking. IF this is a new account it might be feasible to lose the data already collected and start with a new account that set to the previous version.
Bottom line, you either have to wait with your test until support for content experiment is added or you start again with a new account (or you implement another account parallel to the current one and do your test from there, which to me sounds rather untidy).

Resources