Umami alternative: open-source analytics an AI agent sets up
Umami is MIT-licensed, cookieless web analytics you can self-host with Node.js and PostgreSQL, or use as Umami Cloud, from a free Hobby plan (100K events a month, one website, no API access) to Pro at $20 a month (as of 6 November 2026). AgentFirstStack Analytics is open source and cookieless too, under AGPL-3.0 with an MIT tracker, but built so an AI agent can create the account, the site and the goals over REST and MCP, and check its own install. Umami is the better choice if you want a permissive license, a mature dashboard your team will use daily, or to self-host on any server with Postgres.
Set it up with one prompt
Paste this into your coding agent. If the site runs Umami, the agent keeps it in place and brings its history over.
Add analytics to this project with AgentFirstStack. It's free, open-source analytics built for agents, and you can do all of it yourself: there is no signup form, and no email or verification is needed. 1. Read https://agentfirststack.com/llms.txt and https://analytics.agentfirststack.com/llms.txt. 2. If this project's .env already has AGENTFIRSTSTACK_API_KEY, use it and read AGENTFIRSTSTACK.md. Otherwise get a key: curl -X POST https://agentfirststack.com/v1/signup, and save api_key in .env as AGENTFIRSTSTACK_API_KEY and in the production secrets. 3. Find what the site uses today. If it runs Umami, note its website id and every custom event name (umami.track calls and data-umami-event attributes), and don't remove it. 4. Create a site for the production domain, add the snippet for this framework to the root layout, served through the first-party proxy config from the install answer (/_a/* on our own domain, proxy key kept server-side). Create a goal for each conversion, keeping Umami's event names. 5. If you can get Umami's daily totals (its API with a key in .env, or an export I give you), import them: POST /v1/sites/:id/imports with source "other", tool "umami". 6. Deploy (or tell me to), open the site with ?afsa_debug=1, run verify, then GET https://agentfirststack.com/v1/setup?services=analytics until it says ready or tells you what's left. 7. Write the site id and the env var name (never the key) in AGENTFIRSTSTACK.md, and create a claim link for me with POST https://agentfirststack.com/v1/claim-link. Tell me what you set up and imported, how you verified it, and give me the claim link. Leave Umami installed until I say otherwise.
What Umami is
Umami is web analytics under the MIT License. Self-hosting needs "A server with Node.js version 20.19 or newer (22 LTS recommended)", and "Umami supports PostgreSQL (minimum v12.14) databases" (Install, as of 6 Nov 2026). Its FAQ says: "Umami's web tracker does not use cookies" (FAQ).
On Umami Cloud, web analytics, custom events, funnels, goals, journeys, retention, UTM, revenue, attribution, segments and cohorts are on every plan, and session replays and heatmaps on Business and Enterprise (Umami Cloud, as of 6 Nov 2026). The plans (umami.is/pricing, as of 6 Nov 2026):
| Plan | Price | Events a month | Websites | Retention | API and MCP |
|---|---|---|---|---|---|
| Hobby | $0 | Up to 100K | 1 | 6 months | No |
| Pro | $20 a month | 1M included | Up to 20 | 2 years | Yes |
| Business | $200 a month | 10M included | Unlimited | 5 years | Yes |
| Enterprise | Custom | Custom | Unlimited | Custom | Yes |
For agents: Umami's REST API can create a website (POST /api/websites with a name and domain: API reference) and read stats. On Cloud, API keys are created in Settings > API keys and each is "limited to 50 calls every 15 seconds" (API key). Umami's official MCP server reads data only: "No tool can change settings, create websites, or delete data", and on Cloud it needs the Pro plan or above (MCP, as of 6 Nov 2026). Signing up for Cloud takes a 6-digit email code and a choice of US or EU region (Sign up).
How AgentFirstStack Analytics differs
The analytics are comparable in spirit: cookieless, privacy-friendly, open source. The difference is who operates the tool.
- No signup form.
POST https://agentfirststack.com/v1/signupreturns a key. The agent creates the site, gets the install code for the framework, adds goals and checks the install; a person claims the project at the end with a link and their Google sign-in. - Writes over MCP, not only reads. The same key works on a REST API and an MCP server that can create sites, goals, funnels, alerts, reports and segments, record payments and run read-only SQL. Read-only keys see only the read tools.
- Checks the agent runs.
verifyfetches the live page and checks the snippet, the script and the Content-Security-Policy;?afsa_debug=1marks the agent's own visit as test traffic it can watch in realtime; the setup check returns"ready": trueor a list of fixes. - Beyond pageviews: server events from your backend, revenue from Stripe (or Polar, Paddle and LemonSqueezy by webhook), AI crawler visits reported by your server, imports from GA4, Plausible and other tools, scheduled email reports and alerts, Core Web Vitals and scroll depth.
- Replay and tags on the same key. Session replay with heatmaps, and a tag manager with server-side conversion APIs, are separate services in the same project, free on the hosted version.
Like any hosted script, ours can be blocked: the default snippet loads from analytics.agentfirststack.com. Serve it through a path on your own domain (/_a/*) with the proxy configs from GET /v1/sites/:id/install; there's no custom-domain option yet.
Side by side
| Umami | AgentFirstStack Analytics | |
|---|---|---|
| License | MIT | AGPL-3.0; the tracker and other browser scripts MIT |
| Self-hosting | Node.js 20.19+ and PostgreSQL 12.14+, on any server | Cloudflare Workers: a Cloudflare account on Workers Paid and a domain on Cloudflare (self-hosting guide) |
| Free hosted plan | Hobby: 100K events a month, 1 website, 6 months, no API | Free with fair-use limits: 10 sites per account, daily event budgets, 400 days of raw events by default |
| Account | Cloud signup with a 6-digit email code | POST /v1/signup, one request |
| API | REST; on Cloud from the Pro plan | REST on every account, read and write |
| MCP | Official, read-only; Cloud Pro and up | Read and write, on the same key |
| Cookies | None | None by default; persistent mode is opt-in |
| Funnels, goals, revenue, journeys | Yes | Yes |
| Session replay and heatmaps | Cloud Business and Enterprise | A separate replay service, free hosted |
When to choose which
Use Umami if
- You want the MIT License, with no obligation to share changes to a hosted fork.
- You want to self-host on your own server or VPS with Postgres, not on Cloudflare.
- People on your team will use the dashboard every day, and you want a mature one with a large community behind it (Umami on GitHub).
- One small site fits in the free Hobby plan and nobody needs API access.
Use AgentFirstStack if
- An agent should set up analytics from nothing, keep it current and answer questions, without a person creating accounts or keys.
- You want API and MCP access, writes included, on the free plan.
- You also want session replay, a tag manager with server-side conversion APIs, or an email inbox for the agent, on the same key.
Moving from Umami
Run both for a week. The agent keeps Umami's custom event names as goal names, imports Umami's daily totals with POST /v1/sites/:id/imports {"source":"other","tool":"umami","rows":[{"date","visitors","visits","pageviews"}]}, and GET /v1/sites/:id/imports/compare checks our daily visitors against Umami's for the days both ran. Remove Umami's script when the numbers agree and you say so.
FAQ
Is AgentFirstStack open source like Umami?
Yes, under a different license. Umami is MIT. AgentFirstStack is AGPL-3.0, and its browser scripts, the tracker included, are MIT. AGPL means that if you run a modified version as a service for others, you share your changes.
Can an AI agent set up Umami?
Partly. Umami has a REST API that can create websites, and an official MCP server that reads data. On Umami Cloud a person signs up and enters a 6-digit email code first, and API and MCP access start on the Pro plan. On a self-hosted instance, an agent can script it once someone has deployed it.
Is Umami's MCP server read-only?
Yes. Umami's docs say no tool can change settings, create websites or delete data. AgentFirstStack's MCP tools can also create sites, goals, funnels, alerts and reports, with write tools hidden from read-only keys.
Can I move my Umami history to AgentFirstStack?
The daily totals, yes: POST /v1/sites/:id/imports with source other, tool umami and rows of date, visitors, visits and pageviews from Umami's export or API. Keep your custom event names so goals line up. Keep Umami running for a week and compare with GET /v1/sites/:id/imports/compare.
Do both work without cookies?
Yes. Umami's FAQ says its tracker doesn't use cookies. AgentFirstStack's tracker sets none by default either: a visitor is a hash of a daily salt, the site, the IP address and the user agent.
Related
- AnalyticsAgent-first analyticsWhat it is, and what to ask of any tool.
- All servicesThe easiest platform for AI agentsRequests and seconds from nothing to tracking, measured.
- AnalyticsAdd analytics with an AI agentOne prompt, every step, and what's left for you.
- AnalyticsPostHog MCP comparedA product platform, or web analytics an agent sets up alone.
- ReplayHotjar alternativeContentsquare, or replay an agent reads as text.
- All servicesOne MCP server for every serviceAnalytics, tags, mail and replay tools on one key.