I have pasted the script that Google provided as below on every page of my website.
<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-65079904-3', 'auto');
ga('send', 'pageview');
</script>
However Google is not verifying my tracking code.
Here is my Screenshot:
Why can Google Analytics not verify my tracking code?
Related
When I get the website report, I see an issue with Google Analytics under the Performance section.
Is there a way to fix it? For now all I've done is just turn off GA loading if the user-agent contains Google bots.
if (/googlebot|lighthouse/i.test(navigator.userAgent)) {
window.ga=function(){};
} else {
(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');
}
On my website I have a Google Analytics scripts with my own trackercode. One of my clients, who has its own pages on my website, wants to be able to see pageviews of those pages in my websites under his own GA account.
I have tried the following code:
ga('create', 'My-code', 'auto');
ga('send', 'pageview');
ga('create', 'client code', 'auto');
ga('send', 'pageview');
But that doesn't seem to have the result I'm looking for.
i had set up a google analytics account 3 days ago and i followed the instructions given from google analytics website. all goes well, but when i go to my google analytics account i can't see any visiting data. to be sur there is visitors i accessed my website from different places.
is it a matter of time or did i miss something ?
this is the Tracking Code
<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-68467341-1', 'auto');
ga('send', 'pageview');
</script>
a preview from my account
THANK YOU.
Is there a delay between when you open a Google Analytics account and when it starts reporting?
For some reason, my Google Analytics doesn't report anything even though in the browser console everything seems fine.
Did anyone experience a similar issue?
(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-61199413-1', 'none');
ga('send', 'pageview');
Please see that everything looks fine in the browser console.
I have the same tracking code on my main site and on a subdomain.
(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-26266386-1', 'auto');
ga('send', 'pageview');
I now have a lot of traffic directly to my subdomain. but google analytics does not show the original referrer. it shows the subdomain itself as the referrer... how can i change that? do i need to use a seperat tracking id?
You can add your subdomains to the Referral Exclusion list: https://support.google.com/analytics/answer/2795830?hl=en