Next.js Integration
Learn how to add the tracking snippet to Next.js App Router applications.
App Router Layout Setup
For Next.js App Router applications, import the Script component from 'next/script' and add it inside your root layout.tsx file.
Code Example
Add the script directly in your app/layout.tsx layout component:
tsx
import type { Metadata } from "next";
import Script from "next/script";
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<head>
{/* AIReady Bot Tracker */}
<Script
src="https://aiready.co/t.js?id=YOUR_SITE_ID"
strategy="afterInteractive"
/>
</head>
<body>{children}</body>
</html>
);
}Still having trouble with integration?
Reach out to our developer support team directly. We are happy to help get you verified.