Analytics tools with a Next.js guide

Entry price is the lowest monthly price the vendor lists; “Free” means a free plan or free self-hosting. “At 100k” is the monthly price for 100,000 units, as the vendor bills them. Dates under statuses, prices and script sizes show when we checked them. See how we check every value.

What puts a tool on this page

A tool is counted here when the vendor publishes its own instructions for Next.js. A line saying the snippet works in any JavaScript project is not a guide, and a community package the vendor merely links to does not count — three tools read “Partly” for that reason.

The distinction matters more in Next.js than almost anywhere else, because the framework has two routing systems and a rendering model that decides where a script may run at all.

The three things a Next.js guide has to answer

Which router. The App Router and the Pages Router take the snippet in different places — a root layout against a custom document or app file. A guide that names only one of them leaves half its readers guessing, and the guides here differ in exactly that respect.

Where the script goes so it loads once. Placed inside a page component, a tag can run again on every client-side navigation; placed in the root layout with the framework’s script component, it loads once and stays. This is the most common mistake in framework installs and the one that quietly doubles numbers.

How a route change is counted. Next.js moves between pages without a full reload, so a counter that only fires on load will record one pageview for a whole session. Some tools handle this in their script, some expect you to call their function in a navigation hook, and the difference is the whole point of reading a vendor’s own guide rather than a generic snippet.

Two things people expect and do not get

The built-in option is not the same product. Hosting platforms ship their own analytics, and for many projects that is the first thing installed. It answers traffic questions inside the platform’s dashboard and stops where the platform stops — which is why the question that brings people here is usually about a second tool rather than a first one.

A package on npm is not support. Several popular integrations are written by people outside the vendor. They work until a framework release changes the rendering model, and then you are reading someone else’s repository for a fix. The date on a guide and the name of who maintains it are worth more than the star count.

How to choose

  1. Start from your router. Open the vendor’s guide and check it names the one you use.
  2. Look for the sentence about client-side navigation. If the guide never mentions it, expect to handle route changes yourself.
  3. If the site is behind a hosting platform’s edge, check whether a first-party proxy is possible — it usually is, through the framework’s rewrite rules, and it changes how much of your traffic survives blockers.
  4. Decide whether you need events from the server as well; the server-side list is the same table filtered that way.
  5. Compare the ordinary columns last: cookies, storage location, script weight, price at your volume. The methodology explains how they were filled.

Questions and answers

Does it matter whether the page is server-rendered?

For the counter, not much: the script runs in the browser either way. What changes is when it runs and how often — server-rendered pages hydrate and then navigate on the client, which is why the route-change question above decides the accuracy of your pageview count.

Can I keep analytics requests on my own domain?

Usually yes. Next.js can rewrite a path on your domain to the vendor’s endpoint, and several vendors document that rewrite. It is the cheapest way to make requests first-party without running a server of your own, and it does not change where the data is finally stored.

Within its window, yes; beyond it, no. Cookie-free tools rebuild an identifier each day or each session, so a person who returns next week counts as new. If weekly retention is the number you are after, that is a product-analytics question rather than a website-counter one — the category column in the table separates the two.

Other collections