SaaS stacks
Aaron Brick10 min read84 views

Open-source Google Analytics alternatives for a Next.js app: PostHog vs Plausible vs Umami (2026)

The three best open-source Google Analytics alternatives for a Next.js SaaS in 2026, compared by license, self-host cost, and how cleanly each wires into the App Router.

Updated on August 23, 2026

PostHog, Plausible, and Umami logos shown as open-source Google Analytics alternatives for a Next.js app
PostHog, Plausible, and Umami logos shown as open-source Google Analytics alternatives for a Next.js app
On this page

Everyone we know is quietly leaving Google Analytics. The GA4 migration annoyed people, the cookie banners aged badly, and if you are shipping a Next.js app you have probably already asked the real question: what do I drop into app/layout.tsx instead?

We tried the three names that keep coming up in indie and founder circles: PostHog logo PostHog, Plausible logo Plausible, and Umami logo Umami. All three are open source. That is where the similarity ends. Choosing between them for a Next.js SaaS is less about features and more about a question we care about at ShipGarden: how much of your analytics do you want to actually own, and how cleanly does it wire into the App Router?

Quick answer

For a Next.js app in 2026, the three best open-source Google Analytics logo Google Analytics alternatives are PostHog, Plausible, and Umami, and they are not really the same category. PostHog is a full product-analytics platform (events, funnels, session replay, feature flags) with a generous free cloud tier, a first-party posthog-js client, and a heavy self-host path. Plausible is lightweight, cookieless web analytics under a copyleft AGPL license, best rented from its EU cloud at $9/month and dropped in as a single script (or the next-plausible wrapper). Umami is the lightest to own: MIT-licensed, a one-line script tag, cheap to self-host next to your app, with a genuinely free managed tier. Pick PostHog if you want product analytics inside a signed-in app, Plausible if you want a privacy badge without running servers, and Umami if you want to own your numbers on a small box.

The real axis: what are you actually measuring?

The listicles lump ten tools into one ranking. That hides the decision that matters. There are two different jobs here.

One job is web analytics: pageviews, referrers, top pages, a cookieless dashboard you can put in front of a client. Plausible and Umami live here. They are pageview-first, light, and privacy-first by default.

The other job is product analytics: events, funnels, retention, "which users hit the paywall and bounced," session replay, feature flags. PostHog lives here. It is event-first and much bigger.

If you only need to know who visited your marketing pages and where they came from, a product-analytics platform is a lot of machine to run. If you need to understand behaviour inside your signed-in dashboard, a pageview counter will never answer your question. Decide which job you are hiring for before you compare logos.

The license truth table (the part nobody headlines)

If you plan to self-host, the license is the decision, not a footnote. We read each project's own LICENSE file in July 2026.

Scroll to see more

ToolStars (Jul 2026)LicenseWhat that means to owners
PostHog PostHog~37.4kMIT (except the ee directory)Do almost anything; the enterprise folder is separately licensed
Plausible Plausible~28.1kAGPL-3.0Copyleft: modify it and offer it as a network service, and you must publish your changes
Umami Umami~38.0kMITThe most permissive; fork it, embed it, resell it, no strings

That AGPL line is the one that bites agencies. If you fork Plausible, wire it into a client SaaS, and expose it over the network, the AGPL obligates you to share your modifications. For an internal dashboard it is a non-issue. For a product you resell, read it twice. Umami's MIT license and PostHog's mostly-MIT license carry no such obligation.

Cost and free tiers: where each one really lands

Sticker prices mislead here because two of these tools bill by different units (pageviews vs events). The numbers below are from each vendor's own pricing page in July 2026.

PostHog: the platform with the generous free cloud

PostHog logo PostHog's free cloud tier is the most generous of the three: 1 million product-analytics events per month, 5,000 session replays, and 1 million feature-flag requests, all free every month, no credit card. After that it is pure usage-based, starting at $0.00005 per event and dropping at scale. The catch is the unit: events are not pageviews. A busy single-page app with autocapture on can burn through a million events faster than you expect. PostHog is free until you are successful, then it meters you.

Plausible: no free cloud, but the cleanest privacy story

Plausible logo Plausible's cloud has no free-forever tier. You get a 30-day trial with no credit card, then the Starter plan is $9 per month for up to 10,000 monthly pageviews. What you buy for that is the tightest privacy posture of the three: cookieless by default, no personal data stored, EU-hosted, and a script light enough that it will not drag your Lighthouse score. It is the tool you reach for when "GDPR-clean and I do not want to run servers" is the whole requirement.

Umami: the cheapest to own

Umami logo Umami is the value pick. Umami Cloud has a genuinely free Hobby tier (100,000 events per month), and the Pro plan is $20 per month for 1 million events with additional events at $0.00003 each. But the real story is self-hosting: it is MIT, it runs on Node plus a single PostgreSQL database, and it is happy on a $5 VPS. If you want to own your analytics outright for almost nothing, this is the shortest path.

Wiring each into a Next.js app (the part the roundups skip)

Every roundup ranks these tools and then leaves you at the hardest step: actually getting the numbers to flow from an App Router app. Here is the honest integration shape for each, because the effort is not equal.

  • PostHog ships a first-party posthog-js client. The documented App Router pattern is to initialise it once in a client provider and wrap your tree, then let autocapture handle pageviews. The detail that matters: browser tracking scripts are a favourite target for ad-blockers, so PostHog's own docs recommend a reverse proxy so events leave from your own domain. In Next.js that is a rewrites() entry in next.config pointing an internal path at the PostHog ingestion host. Skip the proxy and you quietly undercount blocked visitors.
  • Plausible is the lightest wiring: a single script tag with your data-domain, dropped into the root layout. Because it sets no cookies, there is no consent banner to build, which is the whole appeal for a marketing site. If you want it typed and componentised, the community next-plausible wrapper adds a proxy option in one config flag so the script and events serve from your own domain.
  • Umami is a one-liner too: a single async script tag with your data-website-id in the root layout. If you self-host it next to your Next.js app, both the dashboard and the tracker sit on your own infrastructure, which is the cleanest ownership story and also sidesteps blockers without extra proxy plumbing.

The pattern across all three: put a proxy in front of the tracker so it serves first-party, and keep the analytics script out of the critical render path. Plausible and Umami make that trivial; PostHog asks for the proxy but pays you back with product analytics a script tag cannot give you.

Deploy paths: "self-hostable" is a spectrum, not a checkbox

All three say "open source, self-host it." In practice the effort is wildly different, and this is the detail the roundups skip.

  • Umami is the lightest lift: one Node app, one Postgres database. A single small server runs it. This is a weekend-optional deploy.
  • Plausible Community Edition is a middle path: a Docker Compose stack that also wants ClickHouse alongside Postgres. Very doable, but it is more than one container.
  • PostHog is the heaviest. It is ClickHouse-backed and infrastructure-hungry, and PostHog itself is candid about it: in their words, "if you must, you can self host." They would rather you use their cloud, and for most teams that is the honest answer.

So when someone says "they are all self-hostable," they are technically right and practically wrong. Umami you own on a small box. PostHog you can host, but you are signing up to run a data platform.

Where each one loses

No honest gallery entry skips this part.

  • PostHog loses if all you wanted was a pageview counter. It is a lot of surface area, the events model has a learning curve, and self-hosting it is a real commitment. Overkill for a marketing site.
  • Plausible loses on two fronts: there is no free cloud tier, and it will not tell you anything about in-app behaviour. It counts pageviews beautifully and stops there.
  • Umami loses on depth. It is web analytics, not product analytics. No funnels-and-replay suite, and the managed tier is younger and thinner than PostHog's. If you need to debug a checkout flow, it is the wrong tool.

So which should you pick?

Here is how we would decide, in one line each.

  1. You run a signed-in Next.js app and need funnels, replay, and flags in one place: PostHog (start on the free cloud, add the proxy).
  2. You want a cookieless, GDPR-clean dashboard for a marketing site or a client, and you do not want to run anything: Plausible Cloud.
  3. You want to own your numbers cheaply on your own infrastructure, next to your app: Umami, self-hosted.

That maps to the pattern we keep seeing in the r/degoogle threads through 2026: product folks land on PostHog, privacy-minded site owners land on Plausible, and tinkerers who want to own the stack land on self-hosted Umami. The tools sort themselves once you are honest about the job.

We build our stack so we can own the parts that matter, and analytics is one of them. You do not need the biggest platform. You need the one whose ownership model matches how much of it you actually want to run, and whose wiring matches how much App Router plumbing you want to maintain.

If you are still assembling the rest of that stack, we keep a running open-source Next.js starter scorecard and we compared the backend layer separately with the same own-versus-rent lens.

Your move: decide whether you are measuring a website or a product first, then pick the tool that lets you own exactly as much as you are willing to operate.

Sources

A

Written by

Aaron Brick

Frequently asked questions

What is the best open-source Google Analytics alternative for a Next.js app in 2026?

It depends on the job. For product analytics inside a signed-in app (events, funnels, session replay, feature flags) PostHog is the strongest, with a first-party posthog-js client and a generous free cloud tier. For simple cookieless web analytics on a marketing site, Plausible (a single script, rented from its EU cloud) or Umami (a one-line script tag, cheapest to self-host) are the best picks.

How do you add PostHog, Plausible, or Umami to a Next.js app?

PostHog uses its posthog-js client initialised in an App Router client provider, and its docs recommend a reverse proxy via a next.config rewrites() entry so events serve first-party and dodge ad-blockers. Plausible is a single script tag with your data-domain in the root layout (no cookies, so no consent banner), optionally wrapped by the community next-plausible package for a one-flag proxy. Umami is a single async script tag with your data-website-id in the root layout, and self-hosting it next to your app keeps both tracker and dashboard first-party.

Is PostHog better than Plausible?

They solve different problems. PostHog is an event-based product-analytics platform for understanding behaviour inside a signed-in app. Plausible is lightweight, cookieless web analytics for pageviews and referrers. PostHog is better if you need funnels and replay; Plausible is better if you just want a privacy-clean visitor dashboard without running servers.

Is Umami analytics really free?

Yes. Self-hosting Umami is completely free under the MIT license, and Umami Cloud offers a free Hobby tier of 100,000 events per month. The paid Umami Cloud Pro plan is $20 per month for 1 million events, per umami.is/pricing in July 2026.

Which Google Analytics alternative is easiest to self-host?

Umami. It runs as one Node app plus a single PostgreSQL database and is happy on a small VPS. Plausible Community Edition is a middle path (a Docker Compose stack that also wants ClickHouse), and PostHog is the heaviest to self-host because it is ClickHouse-backed and infrastructure-hungry.