Self-hosted web analytics tracker and dashboard that runs on Cloudflare Workers and Workers Analytics Engine.
shivamanupadi/traks
Self-hosted, cookie-free web analytics that deploys entirely into your own Cloudflare account, with no third-party services in the data path.
Open-source alternative to:Google Analytics
Plausible
- Stars
- 343
- Forks
- 28
- Open issues
- 5
- Last commit
- 4 days ago
What is it?
Traks is a web analytics platform that runs end to end on Cloudflare's data platform, using Workers, Durable Objects, D1, Pipelines, R2 Data Catalog (Apache Iceberg) and R2 SQL. Visitors are counted with a daily-rotating HMAC hash instead of cookies, and raw IP addresses are not stored. The tracker is a single script tag, and the dashboard is served from the same deployment.
Recent data is served from a per-site SQLite Durable Object with millisecond latency, and the dashboard receives live visitors, pages, referrers and city-level map points over a WebSocket. Historical data is stored as Iceberg tables on R2 and queried with R2 SQL, with edge caching. Authentication uses Better Auth on D1, and the world map is self-hosted.
The install wizard at traks.dev provisions both Workers, D1, KV, the R2 bucket with Data Catalog, and the Pipelines stream and sink into your account. The project is a Yarn and Turborepo monorepo that requires Node 20 or later.
Key features
- 01Cookie-free visitor counting with a daily-rotating hash; raw IPs are not stored.
- 02Realtime view of live visitors, pages, referrers and city-level locations via WebSocket.
- 03Historical queries over Apache Iceberg tables on R2 using R2 SQL, with edge caching.
- 04One-click deployment into your own Cloudflare account through the install wizard.
- 05Email and password authentication via Better Auth on D1.
- 06Exposes analytics to AI agents through MCP/WebMCP tools, and classifies bot traffic.
Use cases
- Running privacy-friendly analytics for a personal blog or small website without cookies.
- Replacing a hosted analytics subscription while keeping visitor data in your own Cloudflare account.
- Monitoring live traffic spikes on a launch or front-page event.
- Giving AI agents read access to site analytics through MCP tools.
Quick start
- 1
Open traks.dev/deploy and sign in with Cloudflare; the wizard provisions everything into your account
- 2
Install dependencies for working on the repository (requires Node 20 or newer)
yarn install - 3
Migrate the dev D1 database for the API
yarn workspace @traks/platform-api db:migrate:dev - 4
Start the local dev servers
yarn dev
Things to know
- Runs only on Cloudflare and needs a Cloudflare account on the Workers Paid plan, about $5 per month.
- Running the platform locally also needs your own Doppler projects with secrets and a provisioned Cloudflare data platform.
In collections
Topics
FAQ
- What is traks?
- Self-hosted, cookie-free web analytics that deploys entirely into your own Cloudflare account, with no third-party services in the data path. Traks is a web analytics platform that runs end to end on Cloudflare's data platform, using Workers, Durable Objects, D1, Pipelines, R2 Data Catalog (Apache Iceberg) and R2 SQL. Visitors are counted with a daily-rotating HMAC hash instead of cookies, and raw IP addresses are not stored. The tracker is a single script tag, and the dashboard is served from the same deployment.
- Is traks free to use? What license does it have?
- traks is open source under the MIT license. Check the license terms before using it in commercial products.
- Is traks still maintained?
- Actively maintained. The last commit to traks was on Nov 4, 2026.
- What can I use traks for?
- Running privacy-friendly analytics for a personal blog or small website without cookies. Replacing a hosted analytics subscription while keeping visitor data in your own Cloudflare account. Monitoring live traffic spikes on a launch or front-page event. Giving AI agents read access to site analytics through MCP tools.
- How do I install traks?
- Open traks.dev/deploy and sign in with Cloudflare; the wizard provisions everything into your account Install dependencies for working on the repository (requires Node 20 or newer): yarn install Migrate the dev D1 database for the API: yarn workspace @traks/platform-api db:migrate:dev Start the local dev servers: yarn dev
- Where can I get traks?
- The source code and installation instructions are on GitHub: https://github.com/shivamanupadi/traks
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open source, cookie-free web analytics tool positioned as a privacy-first alternative to Google Analytics, available as cloud or self-hosted.
Open source, privacy-friendly web analytics that you can use as a hosted service or self-host, as an alternative to Google Analytics.
Self-hosted, privacy-first web analytics written in Rust, shipped as a single binary or Docker container.
Privacy-first web analytics platform that tracks traffic, campaigns, behavior, conversions and revenue without cookies, self-hosted or in the cloud.
Open-source, privacy-friendly web and product analytics that positions itself as an alternative to Google Analytics.