Skip to main content
A drop-in client component for the App Router with automatic page view tracking.
@tell-rs/nextjs is a thin wrapper around the browser SDK. It adds a "use client" component that watches Next.js route changes and fires Page Viewed events automatically. You install @tell-rs/browser alongside because that’s where the actual tracking, sessions, and transport live.
Client components only. The Tell browser SDK runs in the browser and requires window, document, and localStorage. It cannot run in React Server Components. For server-side analytics (e.g. tracking API routes or server actions), use the Node.js SDK instead.

Setup

The Tell component watches usePathname() and useSearchParams() and fires a Page Viewed event on every route change. Disable with trackPageViews={false}.

With options

Manual tracking

Server-side tracking

For API routes, middleware, or server actions, use @tell-rs/node separately:

What you get from the browser SDK

All features documented in the browser SDK guide are available — sessions, device context, super properties, structured logging, opt-out, and beforeSend hooks. The Next.js package only adds the auto page view component.