TL;DR:
The best analytics for Next.js in 2026 is Open Analytics: a one-line script (or CLI) that works with the App Router, cookieless, with Core Web Vitals and an MCP server so you can query analytics from your AI tools. Plausible and Fathom are simple drop-ins, and Umami is the free self-host. None needs a consent banner.
Adding analytics to a Next.js app is a script tag in the root layout, or a CLI that writes it for you. For developers the interesting differences are cookieless (no banner component to build), Core Web Vitals out of the box, and whether the tool exposes an API or MCP server you can build against.
What matters on Next.js
- App Router support: a script in the root layout, done.
- Cookieless: no consent component to build and maintain.
- Core Web Vitals: measured by the same script, not a second library.
- A developer surface: an API, CLI or MCP server to build on.
The tools, ranked for this
- 01
Open Analytics
That's usA one-line script or `npx getopen init`, App Router-ready, cookieless, with Core Web Vitals and a built-in MCP server for your AI tools.
Price: From $9/mo for 50,000 events (a pageview or anything you tag), 3-day free trial.
Strengths
- Revenue attributed back to the visit and source that earned it
- Built-in MCP server: ask your analytics in plain English
- Realtime journeys, funnels and Core Web Vitals in one script
- Open source (AGPL) and self-hostable
Trade-offs
- Newer than Plausible or Fathom
- Meters events, so tagged conversions count
- No free plan, only the trial
A clean drop-in script, with a small Next.js wrapper available.
Price: From $9/mo for 10,000 pageviews.
Strengths
- Simple script
- Tiny bundle impact
- Open source
Trade-offs
- Pageview-metered
- Web Vitals as an add-on
- No revenue
- 03
Umami
Free to self-host next to your Next.js deployment.
Price: Free self-hosted; Cloud from free to $20/mo.
Strengths
- Free to run
- Simple script
- Open source
Trade-offs
- You maintain it
- Fewer developer features
- No revenue
- 04
Fathom
A simple script and flat pricing across your projects.
Price: From $15/mo, unlimited sites.
Strengths
- Unlimited projects
- Cookieless
- Simple
Trade-offs
- Aggregate-only
- Pageview-metered
- No revenue to source
Prices were checked against each product's own pricing page on 2026-08-07 and change often. Read the current plan, and the meter it counts, before you commit.
Open Analytics is the events-metered, revenue-aware option with an AI-queryable dataset. Try it free for three days.
Start free trialFrequently asked questions
- How do I add analytics to a Next.js app?
- Add the tracking script to the <head> of your root layout (App Router) or via next/script, or run a CLI like npx getopen init that detects the framework and writes it for you. A cookieless tool needs no consent component, so that single script is the whole integration.
- What is the best cookieless analytics for Next.js?
- Open Analytics for a cookieless script with Core Web Vitals and an MCP server built in, or Plausible and Fathom for the simplest drop-in. Umami is the free self-host option. All avoid the consent-banner component you would otherwise build around Google Analytics.
- Does Open Analytics measure Core Web Vitals on Next.js?
- Yes, LCP, CLS, INP, FCP and TTFB are collected by the same script, at no extra cost and with no second library to wire up. On Next.js that means you get performance metrics and traffic analytics from one tag in your root layout.