What it does
Counterscale is a self-hosted web analytics application built on Cloudflare Workers and Workers Analytics Engine. It collects pageviews for named sites and presents traffic, referrer and engagement statistics in a browser dashboard. The software is free; deployment uses your Cloudflare account and its service allowances.
Counterscale is free software for running your own pageview and referrer dashboard on Cloudflare. You supply the Cloudflare account and manage its resource usage; the software licence does not include hosting.
Connect a website
Prepare a Workers subdomain, enable Analytics Engine and create the required account-analytics API token. From a macOS or Linux environment with Node 20 or later, sign in through Wrangler and run the Counterscale installer. Its prompts include a dashboard password choice. Add the deployed tracker.js script to your website with a unique data-site-id, then open the deployment's dashboard to review the traffic.
A server-side tracker is also available, but requires explicit page URL and hostname values. It does not inherit the browser tracker's automatic page detection.
Workers Analytics Engine retains data for three months and uses sampling for high-volume writes or complex queries. Counterscale also stores longer-term data as Arrow files in R2 by default; this can be disabled through its command-line tool. Those files are separate from the dashboard's recent reporting window.
Strengths
- Provides browser and server-side pageview tracking.
- Offers optional longer-term R2 storage alongside recent dashboard reports.
Watch out for
- Requires deployment and resource management in a Cloudflare account.
- Analytics Engine uses sampling and a three-month retention window.
Best for
- Website operators comfortable deploying and managing an analytics application on Cloudflare
Sources
- Counterscale: Self-Hosted Web Analytics (Oct 27, 2026)
- Counterscale Repository and Deployment Guide (Oct 27, 2026)
- Counterscale MIT Licence (Oct 26, 2026)
- Workers Analytics Engine Limits (Oct 27, 2026)
- Workers Analytics Engine Sampling (Oct 27, 2026)
