How do I see web analytics data thorugh API?
Hi, I need to create an API for my blog site, where I will need to expose last 24 hours most visited blog urls (Page View) in the API. How can I do it? I have tried to get this one, https://api.cloudflare.com/client/v4/zones/{ZONE_ID}/analytics/dashboard but it's giving error, look like this API doesn't works. These urls I want to get through API.
1 Reply
The answer is GraphQL, https://developers.cloudflare.com/analytics/graphql-api/, which Cloudflare does all its analytics via nowadays
Page Views in the API just check for requests returning 200 & html, essentially like
then you can filter further by hostname (clientRequestHTTPHost) either in filters or dimensions, etc