Tagged: x
-
AuthorPosts
-
October 19, 2016 at 5:05 am #1222049
glynnekParticipantHi all, I’m struggling to get Google Analytics to work on my site. I’ve searched the forums and read some of the previous questions related to this. I’ve tried using the x-addon of google analytics, Google Analytics Dashboard for WP and finally Google Analytics by MonsterInsights. All of the plugins seem to work as normal but I can’t find any code relating to my GA account in my source code anywhere, and no data is registering on GA. I have cloudflare set up and noticed that on one of the other questions some code has been added to the functions.php I’ve added this code and still can’t seem to get things working. Any ideas? Thanks in advance for any responses.
My site is http://www.yellowfly.co.uk
Wordpress v4.6.1.
X Theme v4.6.2
Cornerstone v1.3.3the code I’ve added to the functions.php file is:
add_action(‘wp_footer’, ‘exclude_my_ga_code_from_cloudflare’, 9999);
function exclude_my_ga_code_from_cloudflare() {
?>
<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-85691607-1’, ‘auto’);
ga(‘send’, ‘pageview’);</script>
<?php
}October 19, 2016 at 7:02 am #1222148
ThaiModeratorHi There,
Can you please purge / clear the CloudFlare cache again?
If it doesn’t work, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
β Link login to your site
β WordPress Admin username / PasswordDonβt forget to select Set as a private reply. This ensures your information is only visible to our staff.
Thanks.a
October 19, 2016 at 4:20 pm #1222879
glynnekParticipantThanks for the reply, I’ve cleared the cache again as requested. I’ve just checked for the tracking code in google analytics and it is showing up as working. When I view the source code for my home page though, I can’t find the tracking code anywhere? I’ll leave it overnight and see if I get any data and I’ll get back to you if I don’t have any luck. Thanks, Glynne
October 19, 2016 at 6:49 pm #1223013
JadeModeratorSure, let us know how it goes.
December 28, 2016 at 1:38 am #1306832
LaZKParticipantHello!
I am also struggling to get Google Analytics working on my site. I am very new to this.
I’ve put the code snippet into Addons -> Google Analytics -> Settings -> Analytics Code. And marked ‘head’ in Position.
When I go to GA report – there are 0s on every part.My website is: http://prisluhnem.si/
Thank you!
Laura
December 28, 2016 at 1:54 am #1306844
LelyModeratorHello Laura,
Thanks for posting in and giving us your site URL.
When I check your site, the code was added correctly. But then there are 2 tracking codes on your site:<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-75297221-3', 'auto'); ga('send', 'pageview'); </script>And 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','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-89512191-1', 'auto'); ga('send', 'pageview'); </script>Please double check which one is supposed to be there.
You may also check this thread:https://www.en.advertisercommunity.com/t5/Google-Analytics-Reports/Why-is-GA-showing-zero-traffic/td-p/505159#Cheers!
December 28, 2016 at 4:23 am #1306929
LaZKParticipantHello Lely,
thank you for your reply.
The first code is a remnant of me, trying to navigate all this new info π and I’ve put it under child theme editor something.I think I’ve cleared the first one. But I don’t know where to check.
If I understood correctly, it can take up to 48 hours for GA to start showing the traffic?
(I am not in a hurry for traffic info, just for me to know, that I won’t be checking GA every hour or so π ).Thank you.
Laura
December 28, 2016 at 5:09 am #1306966
LelyModeratorHello Laura,
Report data shows up in your reports within 24 hours of setting up the tracking code. You may check this link if it shows zero after that:https://support.google.com/analytics/answer/1009683?hl=en
Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1222049 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
