- This topic has 5 replies, 2 voices, and was last updated 4 months ago by Tom.
May 19, 2020 at 2:29 pm #1292718Giacomo
As per David’s suggestion, I am creating a new topic for my question.
I followed these instructions on how to add the Google Analytics tracking script to my WordPress (GeneratePress, Target theme). I am using the classic Google Analytics code, not Google Tag Manager’s.
When I load any page of my website and look at the source code, the script correctly shows up.For some reason though, Google Analytics is not getting any information.
I tried with multiple browser, both in normal and incognito mode. I only had luck with Microsoft Edge, so I fear that some plugin may be interfering with the tracking code.
Some additional info:
- I cleared the cache on my website
- I used gachecker and the website doesn’t pass the tests
- I installed the Google extension to check the live behavior of GA, and it returns a net::ERR_BLOCKED_BY_CLIENT error. Which is weird, because it doesn’t return any error on my other websites and I am not using an ad blocker.
I really have no idea what to do, I set up Google Analytics in multiple WordPress websites (not using GeneratePress) and never experienced this kind of problem.
Sorry for the long posts, but I tried to be as descriptive as possible.
Thanks a lot for your help.May 19, 2020 at 4:41 pm #1292882TomLead DeveloperLead Developer
How long have you given it? If you go into the “Real Time” section of GA, do you see any data?
You must be using something to block GA in your browser – I’m not seeing the BLOCKED_BY_CLIENT error on my end.May 19, 2020 at 9:11 pm #1293082Giacomo
Thank you for your reply. It’s now been ~14 hours since I added the tracking code.
I do see a visit at about the same time of your reply, so it looks like it recorded your visit.
It might be a problem with my browser(s), but what is weird is that:
– it doesn’t work in incognito either
– it works (with the same browsers) with all my other websites
I just tried from mobile, and the Real-Time tracking seems to work if I use a VPN. I wonder if Google is somehow figuring out that these devices are mine, and is excluding them from the stats. But then, I don’t see why it would work with my other websites.
Even more weird, if I go to Google Analytics -> Admin -> Tracking Info -> Tracking Code, I see “No data received in past 48 hours.” under Status.
Thank you again for your reply.May 20, 2020 at 10:01 am #1294178TomLead DeveloperLead Developer
Might be best to get some family members/friends to visit the site and see if it logs them.
As long as you’ve copied the code from GA correctly and added it to
wp_head, you should be good to go.May 21, 2020 at 11:56 pm #1296244Giacomo
Thank you, it seems to be working now.
I don’t know what happened, but it took two days for Analytics to finally show “Data received in the past 48 hours”.
Have a nice one!May 22, 2020 at 9:30 am #1296946
- You must be logged in to reply to this topic.