Installation guides

Next.js

Add the StatSip script to a Next.js app.

Add the script once in the root layout, inside <body>. It records client-side navigations as well as full page loads.

app/layout.tsx
import Script from "next/script";

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html>
      <body>
        {children}
        <Script src="https://statsip.com/t.js" data-site="YOUR_SITE_KEY" strategy="afterInteractive" />
      </body>
    </html>
  );
}

Replace YOUR_SITE_KEY with the key from setup. Open the site once and the visit appears on the site page.

Something unclear or missing? Tell us.