Web Analytics shows “Error fetching data”

What is the name of the domain?

What is the error message?

Error fetching data

What is the issue you’re encountering

About a week ago I enabled Web Analytics for a site via Cloudflare. Since then, whenever I go to the Web Analytics section in the dashboard, it shows “Error fetching data” and no analytics are displayed. It looks like the data isn’t being collected or loaded properly. Does anyone knows what’s this problem and how I can fix it?

What steps have you taken to resolve the issue?

Refreshed the page multiple times. Tried accessing the section from different browsers. Verified that the domain is active on Cloudflare and also waited several days in case it was a delay in data propagation

What are the steps to reproduce the issue?

Go to the Cloudflare dashboard.
Navigate to Analytics & Logs > Web Analytics.
And in there I can see the message “Error fetching data” with no stats shown.

Screenshot of the error

Hi @techdev1,

It looks like you have got the DNS setup for this domain with partially enabled or disable O2O.

WP engine uses cloudflare behind the scenes.

You need to replace your A record for the domain with a CNAME record pointing to

wp.wpenginepowered.com
Make sure that both this new CNAME and the existing CNAME for www are proxied (Orange cloud on)

Once you have these changes made cloudflare will be able to inject the tracking code into your site and you should be able to see the analytics

1 Like

Thank you for your response. I’ll make the changes and let you know if that solves the problem

1 Like

Hello, I tired the suggested fix of replacing the A record with the CNAME record pointing to WP Engine and also making sure they are proxied.

But after the change, the issue with the web analytics persists. I’m still seeing the “error fetching data” message under Analytics & Logs > Web Analytics section, and no stats are being displayed

I did notice an increase in the number of unique visitors on the Overview tab after the DNS change, so it seems like some data is flowing through but the Web Analytics section is still broken.

Is there anything else I can try to troubleshoot this? Any ideas on what might be causing the issue?

Hi,

Can you confirm that for the website the you only have the 2 CNAMES one for the main domain and the other for the www subdomain? No other A or AAAA records.
Also can you confirm that the orange cloud proxy icon is on for both of these CNAMEs

You could try and disable, then re-enable the feature

https://dash.cloudflare.com/?to=/:account/web-analytics
On the manage site button, first disable, then re-enable.

Thanks for the reply!

I confirm that both CNAMEs (main domain and www) are proxied with the orange cloud, and there are no other A or AAAA records

Re-enabling web analytics sounds like a good idea, but I couldn’t find a specific “manage” button to disable and re-enable it. Were you referring to readding the entire domain to Cloudflare instead?

If you go to

https://dash.cloudflare.com/?to=/:account/web-analytics

This will list your domains with Web Analytics enabled.

Choose the domain in question, click on the Manage Site link.

Under the Advanced Option you can delete Web Analytics

After that you can redo the setup from scratch.

This topic was automatically closed after 15 days. New replies are no longer allowed.