Built for Next.js

Analytics & Monitoring
for Next.js

Add real-time analytics, error tracking, distributed tracing, session replay, and uptime monitoring to your Next.js app. Works with App Router and Pages Router. Two script tags in your layout -- done.

  • Works with App Router and Pages Router out of the box
  • Automatic page transition tracking for client-side navigation
  • Server-side SDK for API route tracing and error capture
  • Web Vitals monitoring (LCP, FID, CLS, TTFB, INP)
  • Session replay with DOM snapshots and network recording
  • Under 5KB total script size -- zero impact on Core Web Vitals
tsx
1// next.config.js - No config needed!
2
3// app/layout.tsx
4export default function RootLayout({ children }) {
5 return (
6 <html>
7 <head>
8 <script defer
9 src="https://justanalytics.app/tracker.js"
10 data-site-id="YOUR_ID" />
11 <script defer
12 src="https://justanalytics.app/monitor.js"
13 data-site-id="YOUR_ID" />
14 </head>
15 <body>{children}</body>
16 </html>
17 );
18}

Built for the Next.js ecosystem

Whether you deploy to Vercel, Railway, AWS, or self-host, JustAnalytics works seamlessly with your Next.js stack.

Client-side navigation

Automatically tracks App Router and Pages Router transitions. No manual pageview calls needed for SPA navigation.

API route tracing

Install our Node.js SDK to trace API routes, middleware, and server actions. See the full request lifecycle from browser to database.

Error boundaries

Capture React error boundaries, unhandled rejections, and server-side exceptions. Linked to session replay for instant reproduction.

Web Vitals

Monitor LCP, FID, CLS, TTFB, and INP. Track how Next.js SSR, ISR, and client-side rendering affect your Core Web Vitals score.

Privacy-first

No cookies, no fingerprinting. GDPR and CCPA compliant. No cookie consent banner needed. Works with strict CSP policies.

Full analytics

Real-time dashboard, conversion funnels, cohort retention, user journeys, attribution modeling, and segmentation -- all included.

Server-side monitoring for Next.js API routes

Install our Node.js SDK to get distributed tracing, error capture, and log correlation for your API routes and server actions.

// instrumentation.ts (Next.js instrumentation hook)
import { JustAnalytics } from '@justanalyticsapp/node';

export function register() {
  JustAnalytics.init({
    apiKey: process.env.JUSTANALYTICS_API_KEY!,
    serviceName: 'my-nextjs-app',
    environment: process.env.NODE_ENV,
    enableTracing: true,    // Distributed tracing
    enableLogs: true,       // Log aggregation
    enableMetrics: true,    // Infrastructure metrics
  });
}

// That's it! API routes, middleware, and server actions
// are automatically instrumented. Traces link to frontend
// sessions via W3C Trace Context propagation.

Ready to simplify your stack?

Replace five tools with one platform. Start with the free tier or try Pro free for 7 days.

Get Started Free