Getting Started

Installing on Next.js

Last updated March 5, 2026

Installing on Next.js

Using the Script Component (Recommended)

In your root layout (app/layout.tsx or pages/_app.tsx): ``tsx import Script from 'next/script' export default function RootLayout({ children }) { return ( {children} `

Important Notes

  • Use
strategy="afterInteractive" for the LegalBanner script (not beforeInteractive` - the script handles its own loading priority)
  • The script works with both App Router and Pages Router
  • SSR/SSG pages are fully supported - the script runs client-side only