For Next.js teams
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
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>
)
}From quick-start snippet to first-party proxy — every integration option is documented and tested with App Router.
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/initThe `<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"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"Free tier for one site, no credit card required. Upgrade to Starter for A$10/month when you need more.