Buyer's guide · Developer analytics
The 8 best analytics tools for Next.js apps in 2026
Prices and features checked on each tool's website · sources
On Vercel, Vercel Web Analytics is the zero-effort start. For simple, light, cookie-free stats, Plausible, Fathom or Simple Analytics (which ships an official Next.js plugin with a built-in proxy). For product analytics with server events and replay, PostHog. If you want to see which traffic source brings paying customers, MetricRaven loads with next/script, proxies through one route handler or one DNS record, and reads payments from Stripe and other providers on the server.
What a Next.js app needs from analytics
Next.js apps are mostly single-page apps after the first load, with work split between the browser, server components, route handlers and server actions. Analytics has to follow client-side navigation (<Link> and router.push don't reload the page), stay out of the way of hydration, and ideally record what only the server knows: a sign-up that succeeded, a payment that cleared.
Ad blockers are the other developer problem. Developer and tech audiences block third-party analytics domains more than most, so a tool that can be served from your own domain through a rewrite, a route handler or a CNAME keeps more of your data. Our guide to stop ad blockers losing data explains the trade-offs.
What to compare as a developer
Install effort
An official package or a documented
next/scriptsnippet for the App Router, with route changes tracked without your own listener.Script weight
Sizes vary several-fold. Compare what each vendor states, and remember optional features (replay, heatmaps) usually load extra code.
Server-side events
Server actions and webhooks know things the browser doesn't. Look for an events API or SDK, and how it links a server event to the visitor who caused it (server-side tracking).
First-party proxy
A documented Next.js rewrite or route handler, or a managed custom domain, so requests go to your own origin. Check which plan includes it.
Next.js analytics tools compared
Entry prices for the smallest paid tier, in the currency each tool's pricing page lists.
| Tool | Best for | Starting price | Free plan or trial | How you start | Revenue tracking |
|---|---|---|---|---|---|
| Vercel Web Analytics | Best forApps hosted on Vercel that want analytics with no setup | Starting priceFree 50k events; Pro $0.03/1K | Free plan or trialHobby free; Pro trial 14 days | How you startVercel dashboard | Revenue trackingNone |
| MetricRaven | Best forSaaS and indie apps that want revenue by traffic source | Starting price$9/month (10k events) | Free plan or trial14 days, no card | How you startSelf-serve | Revenue trackingPayment providers connected; first touch |
| PostHog | Best forProduct engineers who want analytics, replay and flags with server events | Starting priceFree; then usage-based | Free plan or trialFree plan, no card | How you startSelf-serve or self-host | Revenue trackingStripe via data warehouse |
| Plausible | Best forDevelopers who want the lightest well-known script | Starting price$9/month (10k pageviews) | Free plan or trial30 days, no card | How you startSelf-serve | Revenue trackingRevenue goals you send; Business plan |
| Umami | Best forOpen-source fans who want to self-host or stay free | Starting priceFree; Pro $20/month (1M events) | Free plan or trialFree plan; 14 days on paid | How you startSelf-serve or self-host | Revenue trackingRevenue events; payments on Pro |
| Simple Analytics | Best forPrivacy-first teams that want an official Next.js plugin | Starting priceFree; $15/month (20k) | Free plan or trialFree plan; 14 days, no card | How you startSelf-serve | Revenue trackingNone documented |
| Fathom | Best forAgencies running many small Next.js sites | Starting price$15/month (100k pageviews) | Free plan or trial7 days, card required | How you startSelf-serve | Revenue trackingEvent values you send |
| Google Analytics 4 | Best forApps that need Google Ads conversions and audiences | Starting priceFree | Free plan or trialFree | How you startSelf-serve | Revenue trackingEcommerce events you implement |
1. Vercel Web Analytics
Best for: Apps hosted on Vercel that want analytics with no setup
Vercel Web Analytics is the shortest path on Vercel: enable it, add <Analytics /> to your root layout and deploy. Requests are first-party by default because they go to your own deployment.
It answers traffic questions only: custom events need Pro, and there are no revenue reports.
Key features
- The official
@vercel/analyticspackage: enable it in the dashboard, then add<Analytics />from@vercel/analytics/nexttoapp/layout.tsx. - First-party by default: after the next deploy, the script and endpoints are served from your own deployment under
/_vercel/insights/*. - Server-side custom events with
track()from@vercel/analytics/serverin route handlers and server actions (Pro and Enterprise).
Pricing
Hobby includes 50,000 events a month with one month of reporting. Pro charges $0.03 per 1K events on top of the Pro plan, with 12 months of data; Web Analytics Plus adds $10 a month per team for 24 months and UTM parameters.
Limitations
- Set up through a Vercel project and deployment; its docs don't describe using it on other hosts.
- Custom events are Pro and Enterprise only, with 2 properties per event on Pro and no nested objects.
- No revenue reports or payment connections.
2. MetricRaven
Best for: SaaS and indie apps that want revenue by traffic source
MetricRaven installs with next/script in app/layout.tsx (Next.js guide) or with the typed @metricraven/web package, follows <Link> navigation on its own, and connects your payment provider on the server. Each payment is credited to the visit that first brought the customer.
The script is heavier than the minimal trackers here, and it has no free plan. The SaaS analytics roundup compares it with product analytics tools.
Key features
- Install with
next/script(App Router or Pages Router) or the dependency-free @metricraven/web package with typedtrack,identifyand consent calls, safe to import during server rendering. - One tracker of about 20 KB minified (about 8 KB gzipped); page speed, automatic events, error tracking and replay are separate add-ons that load only when you switch them on.
- Server events from route handlers and server actions with @metricraven/node, which runs on Node, Bun, Deno, Cloudflare Workers and Vercel Edge.
- A Next.js route handler proxy or a managed proxy with one CNAME record, both on every plan.
- Stripe, Paddle, Lemon Squeezy, Polar and other providers connected server-side, so payments, renewals and refunds reach the first visit, with MRR and revenue by channel.
Pricing
Starter is $9 a month for 10k events and $19 for 100k; Growth is $19 and $39, with up to 30 websites, team members, AI visibility and replays of pricing and checkout visits. Revenue attribution is on both plans. Yearly billing costs ten months' price (pricing).
Limitations
- Its script is several times larger than Plausible's or Fathom's, because the base tracker includes consent handling, cross-domain linking and goal capture.
- One attribution model (first touch), no product analytics such as retention cohorts or feature flags, no free plan and no self-hosting.
3. PostHog
Best for: Product engineers who want analytics, replay and flags with server events
PostHog has official client and server libraries for Next.js and an official rewrites guide for proxying. It's the most complete toolkit here, with a 1M-event free tier.
Revenue analytics (Stripe through its warehouse) is in beta and links customers manually, so revenue by channel means writing queries.
Key features
posthog-jsinitialized ininstrumentation-client, plus a setup wizard (npx @posthog/wizard).- Server-side capture with
posthog-nodein route handlers and server actions. - An official Next.js rewrites guide for a first-party proxy, and a managed reverse proxy free on PostHog Cloud.
- Product analytics, web analytics, session replay, feature flags, experiments and surveys.
Pricing
Free up to 1M product analytics events and 5,000 recordings a month. After that you pay per unit, from $0.00005 an event, with no per-seat charges.
Limitations
- PostHog warns some hosts modify headers during rewrites, causing 503 or 400 errors, and proxied traffic runs through your server.
- Revenue analytics is in beta; Stripe customers must be linked to people by hand.
4. Plausible
Best for: Developers who want the lightest well-known script
Plausible's script is about 2.5 KB by its own count, and its Events API takes server-side events, including revenue. Next.js support comes through next-plausible, a community package Plausible documents.
Revenue is a Business plan feature, and a managed proxy is Enterprise only, so you proxy through next-plausible yourself.
Key features
- A 2.5 KB script, by Plausible's comparison with Google Analytics.
- Next.js setup with the community
next-plausiblepackage, which Plausible's docs link and which supports proxying. - A server-side Events API that takes a revenue amount and currency.
- Cookie-free, EU-hosted and open source (AGPL Community Edition).
Pricing
Three plans priced by pageviews. At 10k pageviews Starter is $9, Growth $14 and Business $19 a month. Funnels and revenue goals are on Business. 30-day trial, no card.
Limitations
- Revenue tracking and funnels are on the Business plan.
- The managed proxy is Enterprise only, and Plausible says payment webhooks aren't suitable for its Events API because they don't carry the visitor's headers.
5. Umami
Best for: Open-source fans who want to self-host or stay free
Umami is MIT-licensed, free to self-host and free in the cloud up to 100k events. Its docs install it with next/script and send server events with @umami/node.
For proxying, the docs point at Next.js rewrites without code, and renaming the script and endpoint is for self-hosted installs.
Key features
- Install with
next/scriptper Umami's docs; no Next.js package needed. - Server-side events through
/api/sendor the official@umami/nodeclient. - Revenue, attribution and funnel reports on every cloud plan, with payment integrations on Pro and Business.
- MIT license and free self-hosting.
Pricing
Hobby is free for 100k events and one website. Pro is $20 a month for 1M events and 20 websites; Business is $200 for 10M. Self-hosting is free.
Limitations
- No Next.js proxy code in its docs, and script and endpoint renaming is self-hosted only.
- The free cloud plan covers one website and six months of data.
6. Simple Analytics
Best for: Privacy-first teams that want an official Next.js plugin
Simple Analytics ships @simpleanalytics/next, an official plugin that proxies requests through your app and can track events from server actions and route handlers.
Its standard script is 4.7 KB gzipped, with a 2.0 KB light version. It has no revenue reports.
Key features
- An official
@simpleanalytics/nextplugin: wrap your config, add a component to the root layout. - Requests proxied through your app by the plugin, so ad blockers see your own domain.
trackEventin server actions and route handlers, and server-side pageviews (middleware tracking is experimental).- No cookies, no IP addresses and no visitor profiles.
Pricing
A Free plan for 5 websites with 30 days of history. The paid Simple plan is $15 a month for 20k pageviews and events, $20 for 100k and $60 for 1M, with 10 websites. 14-day trial, no card.
Limitations
- No revenue or attribution reports.
- The free plan keeps one month of history and requires a badge.
7. Fathom
Best for: Agencies running many small Next.js sites
Fathom's script is about 2 kB, and its docs show an App Router setup with fathom-client, a community package. Event values with the first referrer seen cover simple revenue.
Custom domains are no longer offered, there's no server-side event API in its docs, and the trial needs a card.
Key features
- A 2 kB script, by Fathom's own count.
- App Router setup in its docs using the community
fathom-clientpackage. - Event values credited to the first referrer or UTM seen, on every plan.
- At least 50 sites on one plan, cookieless.
Pricing
One plan priced by pageviews: $15 a month for 100k, $25 for 200k and $60 for 1M. No free plan; the 7-day trial needs a card.
Limitations
- No proxy or custom domain option since 2023.
- Events are sent from the browser only, and the 7-day trial needs a card.
8. Google Analytics 4
Best for: Apps that need Google Ads conversions and audiences
Next.js documents a <GoogleAnalytics> component in @next/third-parties, and GA4's Measurement Protocol takes server events.
The package is experimental, server events need the browser tag to make full reports, and GA4 needs a consent banner in the EU and UK.
Key features
<GoogleAnalytics gaId>from@next/third-partiesin your root layout, andsendGAEventfor client events.- Server events with the Measurement Protocol (
/mp/collect), joined to a session when you pass its client and session IDs. - Free, with links to Google Ads, Search Console and BigQuery.
Pricing
Free. Analytics 360 for large enterprises is sold through Google's sales team with no public price.
Limitations
- Next.js labels
@next/third-partiesexperimental, and route-change pageviews rely on GA's enhanced measurement setting. - Google says the Measurement Protocol augments the tag rather than replacing it; events sent only that way give partial reports.
How to choose analytics for your Next.js app
You deploy on Vercel and want traffic stats today
Vercel Web Analytics: Enable, add one component, deploy.
You need revenue and MRR by traffic source
MetricRaven: Payments from your provider, credited to the first visit, with a Next.js proxy on every plan.
You want product analytics, replay and flags
PostHog: Official client and server libraries and a rewrites guide.
Script weight comes first
Plausible: About 2.5 KB, with a server Events API.
You want an official plugin with a built-in proxy and no revenue needs
Simple Analytics:
@simpleanalytics/nextproxies through your app.You want to self-host for free
Umami: MIT license,
next/scriptinstall and a Node client.
The bottom line
For most Next.js apps the install is the easy part: every tool here is one component or one next/script tag in the root layout. The differences are in what happens next. Can you send events from server actions? Can you serve it from your own domain without writing a proxy? And can it tell you which traffic paid, or only which traffic arrived?
If the app makes money, wire the payment side first and the dashboard second. With MetricRaven that means passing the visitor ID to Stripe Checkout and calling identify when users sign in, so payments and renewals land on the channel that brought them.
Frequently asked questions
What is the best analytics for Next.js?
On Vercel, Vercel Web Analytics needs the least setup. For light, cookie-free stats, Plausible, Fathom or Simple Analytics. For product analytics, PostHog. For revenue by traffic source from your payment provider, MetricRaven.
How do I add analytics to the Next.js App Router?
Add the tool's script with next/script or its component in app/layout.tsx so it loads once for every page. Client-side navigation changes the URL through the history API, which most trackers follow without extra code.
How do I stop ad blockers blocking analytics in Next.js?
Serve the script and events from your own domain: a rewrite or route handler in your app, or a managed custom domain. PostHog, Simple Analytics and MetricRaven document this for Next.js.
Can I track events from Next.js server actions?
Yes, with a server SDK or events API: Vercel's server track on Pro, posthog-node, @umami/node, Plausible's Events API, Simple Analytics' plugin, GA4's Measurement Protocol or @metricraven/node.
Sources and method
Every competitor fact comes from that company's own website, checked on the date shown. Where we couldn't confirm something, we left it out. MetricRaven details come from our pricing and docs. We make MetricRaven, so weigh our placement accordingly. Spotted something out of date? Email support@metricraven.com.
Vercel Web Analytics · checked Nov 24, 2026
- Vercel Web Analytics quickstart: vercel.com/docs/analytics/quickstart
- Vercel Web Analytics custom events: vercel.com/docs/analytics/custom-events
- Vercel Web Analytics limits and pricing: vercel.com/docs/analytics/limits-and-pricing
- @vercel/analytics package options: vercel.com/docs/analytics/package
PostHog · checked Nov 24, 2026
- Pricing: posthog.com/pricing.md
- Revenue analytics: payment platforms: posthog.com/docs/revenue-analytics/payment-platforms.md
- Revenue analytics: connect to customers: posthog.com/docs/revenue-analytics/connect-to-customers.md
- Marketing analytics: posthog.com/docs/web-analytics/marketing-analytics.md
- Data storage: posthog.com/docs/privacy/data-storage.md
- Self-hosting: posthog.com/docs/self-host.md
- PostHog docs: Next.js: posthog.com/docs/libraries/next-js
- PostHog docs: Next.js reverse proxy: posthog.com/docs/advanced/proxy/nextjs
- PostHog docs: revenue analytics: posthog.com/docs/revenue-analytics/start-here
Plausible · checked Nov 18, 2026
- Plausible docs: Next.js integration: plausible.io/docs/nextjs-integration
- Plausible vs Google Analytics (script size): plausible.io/vs-google-analytics
- Plausible docs: Events API: plausible.io/docs/events-api
- Plausible docs: proxy introduction: plausible.io/docs/proxy/introduction
- Homepage, pricing and plans: plausible.io/
- Ecommerce revenue tracking: plausible.io/docs/ecommerce-revenue-tracking
- Google Search Console: plausible.io/google-search-console
- Track AI traffic: plausible.io/track-ai-traffic
- Annotations: plausible.io/docs/annotations
- File downloads tracking: plausible.io/docs/file-downloads-tracking
- Form submissions tracking: plausible.io/docs/form-submissions-tracking
- Scroll depth: plausible.io/docs/scroll-depth
- Self-hosted (Community Edition): plausible.io/self-hosted-web-analytics
- Accessing your data (API, MCP): plausible.io/docs/data-access
- Google Analytics import: plausible.io/docs/google-analytics-import
- Embed your dashboard: plausible.io/docs/embed-dashboard
- User journeys: plausible.io/docs/user-journeys
Umami · checked Nov 18, 2026
- Umami docs: collect data: docs.umami.is/docs/collect-data
- Umami docs: server-side events: docs.umami.is/docs/guides/send-server-side-events
- Umami docs: bypass ad blockers: docs.umami.is/docs/bypass-ad-blockers
- Homepage: umami.is/
- Pricing: umami.is/pricing
- Track events: docs.umami.is/docs/track-events
- Cloud FAQ (trial, data regions, retention, usage): docs.umami.is/docs/cloud/faq
- Payment providers: docs.umami.is/docs/cloud/payment-providers
- Cloud integrations: docs.umami.is/docs/cloud/integrations
- Google Search Console: docs.umami.is/docs/cloud/google-search-console
- Cloud MCP: docs.umami.is/docs/cloud/mcp
- Revenue: docs.umami.is/docs/revenue
- FAQ (cookies, self-hosting, databases): docs.umami.is/docs/faq
- Environment variables (bot check): docs.umami.is/docs/environment-variables
- Source code and licence: github.com/umami-software/umami
- Channel rules (LLM domains): github.com/umami-software/umami/blob/master/src/queries/sql/getChannelMetrics.ts
- Attribution: docs.umami.is/docs/attribution
- Import data: docs.umami.is/docs/cloud/import-data
- White-label: docs.umami.is/docs/cloud/white-label
- Error tracking: docs.umami.is/docs/error-tracking
- Performance: docs.umami.is/docs/performance
- Journey: docs.umami.is/docs/journey
Simple Analytics · checked Nov 18, 2026
- Simple Analytics docs: Next.js: docs.simpleanalytics.com/install-simple-analytics-with-next
- Simple Analytics docs: script sizes: docs.simpleanalytics.com/light
- Pricing (Markdown): www.simpleanalytics.com/pricing.md
- Pricing: www.simpleanalytics.com/pricing
- Features: www.simpleanalytics.com/features
- Site overview (llms.txt): www.simpleanalytics.com/llms.txt
- EU-hosted analytics: www.simpleanalytics.com/eu-hosted-analytics
- Simple Analytics vs Plausible (open source, storage): www.simpleanalytics.com/plausible-alternative
- Goals: docs.simpleanalytics.com/goals
- Unique visits explained: docs.simpleanalytics.com/explained/unique-visits
- Bots: docs.simpleanalytics.com/bots
- Bypass ad-blockers: docs.simpleanalytics.com/bypass-ad-blockers
- AI chat: docs.simpleanalytics.com/ai-chat
- AI features: www.simpleanalytics.com/features/ai
- Embed a chart on your site: docs.simpleanalytics.com/embed-chart-on-your-site
- Import Google Analytics data: docs.simpleanalytics.com/import-google-analytics-data
- White label use case: www.simpleanalytics.com/use-cases/white-label
- Changelog: www.simpleanalytics.com/changelog
- Documentation index: docs.simpleanalytics.com/sitemap.xml
- Docs index: docs.simpleanalytics.com
Fathom · checked Nov 18, 2026
- Fathom docs: Next.js: usefathom.com/docs/integrations/next
- Fathom: cookieless analytics (script size): usefathom.com/why-fathom-analytics/cookieless-analytics
- Fathom changelog: custom domains: usefathom.com/changelog/mar2023-firewall-settings
- Pricing and FAQ: usefathom.com/pricing
- Features: usefathom.com/features
- Ecommerce conversions: usefathom.com/docs/events/ecommerce-conversions
- Search Console: usefathom.com/docs/features/google-search-console
- Traffic sources (AI group): usefathom.com/docs/features/sources
- EU isolation: usefathom.com/docs/script/eu-isolation
- Bot detection: usefathom.com/docs/features/bot-detection
- Milestones: usefathom.com/docs/features/milestones
- Does Fathom have "X" feature?: usefathom.com/docs/troubleshooting/features
- Docs index (llms.txt): usefathom.com/llms.txt
- Google Analytics importer: usefathom.com/docs/features/ga-importer
- Track Google Ads: usefathom.com/docs/how-tos/track-google-ads
- Community MCP server (unofficial): www.npmjs.com/package/mcp-fathom-analytics
Google Analytics 4 · checked Nov 18, 2026
- Next.js docs: third-party libraries: nextjs.org/docs/app/guides/third-party-libraries
- Google: Measurement Protocol (GA4): developers.google.com/analytics/devguides/collection/protocol/ga4
- Google Analytics overview: marketingplatform.google.com/about/analytics/
- Analytics 360: marketingplatform.google.com/about/analytics-360/
- Set up ecommerce events: support.google.com/analytics/answer/12200568?hl=en
- Key events: support.google.com/analytics/answer/13128484?hl=en
- Search Console integration: support.google.com/analytics/answer/10737381?hl=en
- Funnel exploration: support.google.com/analytics/answer/9327974?hl=en
- Path exploration: support.google.com/analytics/answer/9317498
- Consent mode: support.google.com/analytics/answer/9976101?hl=en
- Known bot-traffic exclusion: support.google.com/analytics/answer/9888366?hl=en
- Annotations: support.google.com/analytics/answer/15884203?hl=en
- Google Analytics MCP server: developers.google.com/analytics/devguides/MCP
- Default channel group (AI Assistant): support.google.com/analytics/answer/9756891?hl=en
- Connect Meta to Google Analytics: support.google.com/analytics/answer/16536051?hl=en
- Import campaign data: support.google.com/analytics/answer/10071305?hl=en
- Connect Google Ads to Google Analytics: support.google.com/analytics/answer/9379420?hl=en
- What's new in Google Analytics: support.google.com/analytics/answer/13420269
- Google tag gateway (Cloudflare): developers.cloudflare.com/google-tag-gateway/