For Next.js teams

Analytics built for Next.js

Install with one command, track pageviews in App Router and Pages Router, and route events through your own domain — all without cookies or consent banners. A$10/month, unlimited sites.

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 A$10/month when you need more.