Web analytics
Self-hosted web analytics on Cloudflare
Run Yaap in your own Cloudflare account. Keep website traffic, conversion funnels and revenue reports on infrastructure you control.
Last updated September 16, 2026
Keep the analytics stack in your account
Self-hosted web analytics means you run the software that collects, stores and reports your website activity. With Yaap, the dashboard and event collection run in a Cloudflare Worker. You choose the database and manage the account that holds your data.
This is useful when you want to inspect the tracking code, choose how long to retain events or connect reporting to your own tools. You can track multiple websites from one workspace and give collaborators access to individual websites.
Yaap is source-available under the Elastic License 2.0. Read the license before modifying or redistributing it; source-available does not mean an unrestricted open-source license.
What runs in your Cloudflare account
The default deployment uses a Cloudflare Worker, a D1 database, an event queue and a dead-letter queue. The Worker serves the app and accepts events. Queues buffer collection before events are processed into analytics storage.
D1 keeps the default setup within Cloudflare. PostgreSQL through Hyperdrive is an optional backend if you want to operate a separate database. The repository includes the app, the browser tracker and the documentation.
You get traffic sources, page reports, custom events, goals and conversion funnels, and optional payment attribution. A scoped API and MCP endpoint let approved tools work with your analytics.
Deploy, add a website and verify collection
Start with the self-hosting setup guide and the full repository. Provision the database and queues, configure the Worker and create separate authentication and bootstrap secrets. After deployment, open /setup on your installation to create the owner account.
Add a website, configure its allowed origins and install either the script snippet or the @yaap/client npm package. Visit the tracked site and confirm that a real pageview reaches your dashboard before adding goals or payments.
Choose identified, anonymous or paused collection deliberately. Anonymous events can contribute to pageview and event totals, while visitor journeys and ordered funnels need identifiers. The collection controls guide explains how to connect those choices to your site.
Plan for infrastructure and maintenance
Self-hosting has no Yaap hosted subscription, but your infrastructure still has costs. Cloudflare usage, database storage, optional email and an external PostgreSQL provider can affect your bill. Event volume, retention and reporting workload determine how those costs grow.
You operate upgrades, database backups, secrets and queue monitoring. Keep resource identifiers and authentication secrets stable across upgrades. Back up the database before applying migrations and verify the restore process; rolling back Worker code does not reverse a database migration.
If you prefer managed infrastructure, compare hosted Yaap pricing. The hosted service starts at $9 per month for 100,000 events with a 14-day trial. Self-hosting is the option for teams willing to maintain their own installation.
Try Yaap with your own website
Start a 14-day hosted trial with no credit card, or follow the documentation to run Yaap in your own Cloudflare account.