New: Free plan is live 7 August 2026 · View changelog →

For Next.js teams

Next.js analytics for devs who build with AI

Install with one command or ask Cursor. Track pageviews in App Router and Pages Router, route events through your own domain — no cookies. Free for one site; unlimited sites from US$9/month on Starter.

No credit card required · Free tier includes one site

app/layout.tsx
import { Analytics } from "@antlytics/analytics/next"

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Analytics trackingId={process.env.NEXT_PUBLIC_ANTLYTICS_ID} />
      </body>
    </html>
  )
}

Built for how Next.js projects actually work

From quick-start snippet to first-party proxy — every integration option is documented and tested with App Router.

One-command install

Run `npx @antlytics/init` in your Next.js project. The CLI detects your framework, adds the `<Analytics />` component to your root layout, and configures the ingest URL automatically.

npx @antlytics/init
App Router and Pages Router

The `<Analytics />` component from `@antlytics/analytics/next` works in both App Router layouts and Pages Router `_app.tsx`. Strategy is `afterInteractive` — zero impact on Core Web Vitals.

import { Analytics } from "@antlytics/analytics/next"
First-party proxy in two lines

Re-export the ingest handler from your own domain to bypass ad blockers without a separate server. Events stay on your domain — `/api/antlytics/[...path]/route.ts`.

export { GET, OPTIONS, POST } from "@antlytics/analytics/proxy"

Add analytics to your Next.js app in 60 seconds

Free tier for one site, no credit card required. Upgrade to Starter for US$9/month when you need more.