Analytics Code Not Tracking after 24 hours - google-analytics

I've installed - and I believe I installed right - Google Analytics code yesterday. But still getting "not tracking" message and 0 stats. Can anyone check if there is something wrong?
I don't know if it's allowed to give urls. So, the website is my display name dot com if you want to check.
Here is my head code:
<head>
<meta charset="utf-8">
<title>Babality - Oyunlar, Hileler, Combolar</title>
<meta name="keywords" content="flash oyun, unity oyunları, 3d oyunlar, flash oyunlar, tam ekran oyun, oyun hileleri, oyun comboları, oyun komboları">
<meta name="description" content="domain.com; kaliteli ve eğlenceli oyunların, popüler oyunlara ait hilelerin ve comboların bulunduğu bir web sitesidir.">
<link href="http://domain.com/tyle.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="http://domain.com/jss.js"></script>
<!-- analytics script -->
<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-55572105-1', 'auto');
ga('require', 'displayfeatures');
ga('send', 'pageview');
</script></head>
I've tried some websites that checks if anaytics code works. Every site I tried saw my analytics code working.
I've tried GA Debug extension on Chrome. Can't find any errors.
I can see my code in my pages
I've tried Google Tag Assistant extension on Chrome. It found a Google tag. It was Analytics. And 0 errors.
Bottomline, everything - even Google extension - says nothing wrong. But still not tracking.
EDIT: Did not change anything, did not do anything. Code works now. Seems sometimes 24 hours is not enough. For me, code worked after 30 hours.

After you have installed the tracking code, you will need to wait at least 24 hours for stats to show up in your standard reports. What you can do is to check in Real-time reports to see if you see hits for you own simultaneous visits. If you see data there, then you should only need to wait the aforementioned 24 hours.

Related

Google Tag Manager conflict because in my HTML I have an element with name="ga" and id="ga"?

Is it possible that my GTM code is failing because of some conflict with Google Analytics and an HTML element I have with <input id="ga" name="ga">?
My tag for Google Analytics is:
<style>.async-hide { opacity: 0 !important} </style>
<script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
})(window,document.documentElement,'async-hide','dataLayer',4000,
{'GTM-XXXXXXXXXXXXX':true});</script>
<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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXXXXXXX', 'auto');
ga('send', 'pageview');
</script>
Should I change the 'ga' to something else and it'd still work but without the conflicts?
I found this answer but I'm not sure if it's the same issue, however I'll try to do it (the reason why I don't try and test it by myself is because it will take a lot of time until the marketing team can check it).
Changing the Global GA Object in google tag manager
Yes, it is certainly a cause.
The error it will generate is:
Uncaught TypeError: ga is not a function
You can see it in this JSFiddle (see error in console).
As the answer by Michele Pisani says, it does conflict, and it can be solved with this answer (changing the global function name):
Changing the Global GA Object in google tag manager

Solving configuration mismatch between Google Analytics and Google Optimize?

So I'm using Google Analytics, Google Optimize, and Google Tag Manager. I also feel that I may be losing my mind.
For performance reasons, we don't want to add the google optimize script through GTM. We want to hard-code it. But every time I try that, the installation doesn't work. Specifically, when I click "Run Diagnostics" on the google optimize setup page, I get an error that says
All Analytics tracking code on the page must have the same tracker configuration settings. [...] The following tracker configuration properties do not have the same configurations: alwaysSendReferrer.
So I go into my handy Analytics debugger, find the alwaysSendReferrer property, and note that it's set to true. Great. I edit the config object that i'm passing to the google optimize init script, and I add alwaysSendReferrer: true. So far so good. Except... I get the same error.
I thought maybe something was wrong with our analytics setup, so I got rid of the hardcoded google optimize script and instead included it via the Google Optimize GTM tag -- which, unexpectedly, worked perfectly. I thought "Okay i'll just find the script that GTM is adding and copy/paste it into the codebase" but of course it's minified within an inch of its life, and untangling that javascript from the rest of the tags would be a whole other endeavor.
I have access to a {{Default UA Settings}} variable in GTM, and google's documentation would really like me to just pass that object to the official "Google Optimize" tag in GTM. That works (I've tested it), but as mentioned, we don't want to do that.
If anyone knows what the Google Optimize config object should look like, that would help me massively.
Right now mine looks like this (with identifying details removed)
dataLayer.push(['config', 'UA-12345', {
'optimize_id': 'GTM-55555',
'linker': { 'domains': ['mywebsite.com <http://mywebsite.com>'] },
'alwaysSendReferrer': true
});
I've tried false, "true", 1, and basically everything else I can think of (I'm quite confident that Google Analytics has this property set to true on our site) -- my only guess is that maybe I'm setting the value in the wrong place and google optimize isn't seeing it. Help?
I know the feeling of losing your mind trying to read through Google documentation!
This is the code I use on pages I wish to run Optimize experiments on:
<head>
...
<!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-PRMQXXX');</script> <!-- End Google Tag Manager -->
<!-- Page-hiding snippet (recommended) -->
<style>.async-hide { opacity: 0 !important} </style>
<script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
})(window,document.documentElement,'async-hide','dataLayer',4000,
{'GTM-KL7XXXX':true});</script>
<!-- Modified Analytics tracking code with Optimize plugin -->
<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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-99999999-1', 'auto');
ga('require', 'GTM-KL7XXXX');
ga('send', 'pageview');
</script>
...
</head>
Where:
GTM-PRMQXXX is the Google Tag Manager container id
GTM-KL7XXXX is the Google Optimize container id, and
UA-99999999-1 is my Google Analytics id
Note that you need to remove your usual GA script once you add the scripts above.
I hope this helps you!

How to use Google Analytics to track cross-domain image loads?

I have a simple-cheezy web site set up on Neocities for the single and sole purpose of hosting a single image. There is no other content, and this free web-hosting service exists only to host the single image. The reason why I am hosting the image here, is that I have another web hosting service provider where I wish to display the image, but the second provider does not support Google Analytics; Neocities does.
I'd like to embed the image (which is my organization's logo, so it's use is legal and users aren't getting stuffed with the typical, rogue blank gif). Sounds like Google Analytics could simply track image loads, where the image is hosted on Neocities and loaded via page views to the other web page.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>The web site of abcdz</title>
<!-- The style.css file allows you to change the look of your web pages.
If you include the next line in all your web pages, they will all share the same look.
This makes it easier to make new pages for your site. -->
<link href="/style.css" rel="stylesheet" type="text/css" media="all">
<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-xxxxxxxxx-2', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<a target="_blank" href="http://www.abz.com/abcd/index.htm" id="anch_90" style="display: block; width: 80px; margin: auto"><img class=""
src=" http://abcdz.neocities.org/logo.png" width="200" height="260"
alt="Organization Name."
title="Organization Name."></a>
</body>
</html>
So back to my second web site, I embed the following, so users see my organization logo, and when they click on it, a new page opens to my organization home page. Just to reiterate, the second web host does not support Google Analytics, only simple HTML customization (I can't access head content), it is something like a CMS-style application.
<a target="_blank" href="http://www.abz.com/abcd/index.htm" id="anch_90" style="display: block; width: 80px; margin: auto"><img class=""
src=" http://abcdz.neocities.org/logo.png" width="200" height="260"
alt="organization Name."
title="Organization Name."></a>
Set up GA, seems to be working, when I visit http://abcdz.neocities.org/, GA statistics register the hit.
When I visit the other web page, which is loading only http://abcdz.neocities.org/logo.png, no GA "hits". Obviously, GA is tracking page views, but no tracking access to the logo.png that is embedded in the page but accessed cross-domain.
Certainly other people are doing this successfully, but how?
You can use Google URL builder to be able to track the image itself. Here is the directions for that: https://support.google.com/analytics/answer/1033867?hl=en
I am referencing this answer post on the Google Product Forum.
Google Analytics does not track images since images do not contain tracking code, so this is not caused by cross domain issue (it is in fact expected behavior, unless I really misunderstand your post).
GA tracks pages which are composed of multiple assets like HTML, images, scripts etc. Most people would not event want their assets tracked individually and are quite happy with page tracking, so there has been no need ever for Google to invent a workaround.
You can track when the image is successfully loaded into your html page (by using the onLoad-event of the image) but that does not seem to be what you are after.
You cannot track images that are called directly (unless they are really scripts that output an image after sending a server-side request to Analytics which does not seem feasible in your case).

google analytics for responsive design

I've started with Google Analytics this year so I'm still learning a lot.
I have stumbled onto this article: http://www.smashingmagazine.com/2014/08/28/responsive-web-design-google-analytics/
And I thought it really interesting but I'm struggling. I implemented it for this website:
http://conversionadvantage.com/
but now my GA stopped tracking; telling me I don't have the code on my website.
Can someone give me pointers please as what I could have done wrong? My code 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-xxxxxxxx-x', 'auto');
ga('require', 'displayfeatures');
ga('send', 'pageview', {
'dimension2': WURFL.complete_device_name,
'dimension4': WURFL.form_factor,
'dimension3': WURFL.is_mobile
});
</script>
I just have different dimensions since nr 1 is taken. The developer also added
<script type="text/javascript" src="//wurfl.io/wurfl.js"></script>
So any thoughts for a newbie?
Thanks in advance!
Wurfl is a script for device detection that is used to determine device name etc. So you need to include this before your pageview calls else the variables will not be set (which will result in a javascript error, hence GA will not track anything).
Device Name and "is_mobile" are not necessary since this is already tracked by Google Analytics.

Google Analytic tracking code not working / not installed.

The code is visible in "view page source" but GA says "Tracking Not installed". the website is validated for errors with html5.validator.nu and http://validator.w3.org and there is no error. But still couldn't see the "Tracking Installed" not the realtime activity.
<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-40983367-1', 'star-business-directory.com');
ga('send', 'pageview'); </script>
here is my site: star-business-directory.com
The code is implemented correctly. Please check that your property is properly configured to receive Universal Analytics data. If not, then it will not work.
Regarding Universal or Classic Analytics support, you can find this information if you look in the administrative overview, under "Property".
If you look at the top, you can see a property which does NOT have support for Universal Analytics. Please upgrade. If you DO have support for it, you should see a green check sign.
Also, are you looking into the correct account and property? You should be seeing real-time data for the property UA-40983367-1.
The code on your site looks like this:
<script> <!-- type="text/javascript" language="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-40983367-1', 'star-business-directory.com');
ga('send', 'pageview');
</script>
I believe the problem you are having issues with the HTML comment inside the script tag. Try and remove the following code.
<!-- type="text/javascript" language="javascript"> -->

Resources