Skip to main content

Install

App Router

Create a Client Component for the widget and add it to your root layout:

App Router with NextAuth

If you use NextAuth.js, pass the session user to the widget:
Mark the component 'use client' — the widget uses browser APIs and cannot run on the server.

Pages Router

Add the widget in _app.tsx:

Using the CDN (no npm)

Alternatively, add the script tag to app/layout.tsx via Next.js’s built-in <Script> component: