Self-hosted, cookie-free web analytics that deploys entirely into your own Cloudflare account, with no third-party services in the data path.
surendrapandar/minilytics
Self-hosted, revenue-first web analytics that shows which traffic source actually produced paying customers, running on Cloudflare's free plan.
Open-source alternative to:Google Analytics
Plausible
- Stars
- 815
- Forks
- 199
- Open issues
- 4
- Last commit
- 4 days ago
What is it?
Minilytics is web analytics for your own websites, built for indie hackers and solo founders. Beyond visitors and pageviews, it tracks where traffic comes from (channel, referrer, UTM campaign, keyword, ?ref= tags) and links payments back to the visitor who made them, so you can see which tweet, article or search led to revenue.
Each person deploys their own copy as a Cloudflare Worker backed by D1 (SQLite), so data stays in their own Cloudflare account. The project includes a lightweight tracking script, a React dashboard served from the same Worker, and a Hono-based API. Dodo Payments webhooks are supported for attribution, and a generic payments API covers other providers.
The setup uses Wrangler commands and requires Node.js 20+. The README notes that the free Cloudflare tier suits side-project traffic, with the paid Workers plan as the next step for larger sites.
Key features
- 01Shows visitors, revenue, conversion rate and revenue per visitor with period-over-period change
- 02Attributes each payment to the last real traffic source, such as a tweet or Google search
- 03Tracks pages, outbound clicks, button clicks, custom goals and funnels
- 04Provides a per-customer journey with full visit-to-payment timeline
- 05Supports multiple websites under one login and single-page app routing
Use cases
- Finding out which launch tweet or article produced paying customers for a solo product
- Self-hosting analytics on a free Cloudflare account instead of paying for a SaaS tool
- Connecting Dodo Payments or another provider's payments to traffic sources
Quick start
- 1
Download the code and install dependencies
git clone https://github.com/surendrapandar/minilytics.git && cd minilytics && npm install - 2
Log in to Cloudflare
npx wrangler login - 3
Create the D1 database, then paste its database_id into wrangler.jsonc
npx wrangler d1 create minilytics - 4
Deploy the dashboard and worker (set ADMIN_PASSWORD and SESSION_SECRET first with wrangler secret put)
npm run deploy
Things to know
- Requires a free Cloudflare account and Node.js 20+.
- Each user must deploy and maintain their own copy.
- Some revenue attribution needs a Dodo Payments webhook setup; the rest uses a generic API.
In collections
Topics
FAQ
- What is minilytics?
- Self-hosted, revenue-first web analytics that shows which traffic source actually produced paying customers, running on Cloudflare's free plan. Minilytics is web analytics for your own websites, built for indie hackers and solo founders. Beyond visitors and pageviews, it tracks where traffic comes from (channel, referrer, UTM campaign, keyword, ?ref= tags) and links payments back to the visitor who made them, so you can see which tweet, article or search led to revenue.
- Is minilytics free to use? What license does it have?
- minilytics is open source under the MIT license. Check the license terms before using it in commercial products.
- Is minilytics still maintained?
- Actively maintained. The last commit to minilytics was on Nov 3, 2026.
- What can I use minilytics for?
- Finding out which launch tweet or article produced paying customers for a solo product Self-hosting analytics on a free Cloudflare account instead of paying for a SaaS tool Connecting Dodo Payments or another provider's payments to traffic sources
- How do I install minilytics?
- Download the code and install dependencies: git clone https://github.com/surendrapandar/minilytics.git && cd minilytics && npm install Log in to Cloudflare: npx wrangler login Create the D1 database, then paste its database_id into wrangler.jsonc: npx wrangler d1 create minilytics Deploy the dashboard and worker (set ADMIN_PASSWORD and SESSION_SECRET first with wrangler secret put): npm run deploy
- Where can I get minilytics?
- The source code and installation instructions are on GitHub: https://github.com/surendrapandar/minilytics
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Self-hosted web analytics tracker and dashboard that runs on Cloudflare Workers and Workers Analytics Engine.
An open-source Cloudflare-native framework for running a fleet of new-keyword AI sites, with shared auth, credits, payments and AI generation.
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.
Privacy-first, cookieless web analytics that bundles error tracking, performance monitoring and session replays, self-hostable with Docker.