OCMLABS/MODULE-CLOUDFLARE · DASHBOARD & ANALYTICS

Cloudflare traffic, cache hit ratio, bandwidth and origin timing on the Magento dashboard

  • Magento
  • Adobe Commerce
  • Hyvä

The Overview tab

System > Cloudflare > Dashboard opens on the Overview tab for the selected website. It shows the connection status, the zone name and plan, whether development mode is on, and the edge cache settings in force (enabled or not, edge TTL). Below that:

  • Development mode can be turned on and off here. On stops Cloudflare caching for the zone for 3 hours, which is useful while you deploy theme changes; Cloudflare turns it off again by itself. When you turn it off, a checkbox offers to purge everything so visitors do not get pages cached before the change.
  • Quick purge takes cache tags, URLs or prefixes, one per line, or purges everything. See Purging.
  • Health summarises the last health run (pass, warn, fail, skip counts and when it ran) with a link to the Health tab.

The same figures are available from bin/magento ocmlabs:cloudflare:status.

The Analytics tab

The Analytics tab reads Cloudflare’s GraphQL Analytics API for the website’s zone and shows:

PanelWhat it shows
RequestsTotal requests in the range
Cached requests / hit ratioHow many requests Cloudflare served from the edge, and the share of the total
Bandwidth served / savedBytes served, and the bytes the origin did not have to send
Unique visitorsCloudflare’s unique visitor count for the range
Threats blockedRequests Cloudflare’s security features stopped
Origin response p50 / p95Median and 95th percentile time the origin took to answer
Requests and cached requests over timeA line chart over the range
Bandwidth over timeA line chart over the range
Status codesBreakdown by HTTP status
Cache statusHit, Miss, Dynamic, Bypass and the rest, as Cloudflare reports them
Top pathsThe most requested paths with their cache status
Top countriesThe ten countries sending the most requests
Top user agentsThe ten most common user agents

Each panel loads on its own. If Cloudflare renames a field or a query fails, that panel shows the error and the rest of the tab still loads.

Time ranges and plans

Cloudflare keeps analytics for longer on higher plans, so the Range selector only offers what the zone can answer:

PlanRanges
Free24 hours
Pro24 hours, 7 days
Business and Enterprise24 hours, 7 days, 30 days

The 24 hour range uses minute-level data; longer ranges use daily data.

Caching and the warm-up cron

Analytics responses are cached in the ocmlabs_cloudflare cache type for Analytics Cache TTL seconds (900 by default), so opening the dashboard repeatedly does not hit the API each time. A cron job runs every 15 minutes and warms the cache for each website’s default range, so the tab usually opens with data already there.

The tab can be hidden entirely with Enable Analytics set to No. The API token needs Analytics:Read; without it the tab reports the permission error Cloudflare returned.

Charts

Charts are drawn with a vendored copy of Chart.js 4.4.1 that ships with the module. Nothing is loaded from a CDN and the admin makes no requests to anyone but your own Magento and Cloudflare’s API.

See also

In this module