React (Vite or Create React App)
Add the script to yourindex.html file. This loads the widget on every page of your app.
Next.js — App Router
Use thenext/script component in your root layout. The afterInteractive strategy loads the widget once the page is interactive, so it won’t block rendering.
app/layout.tsx
Next.js — Pages Router
Add the widget to_app.tsx using next/script. It will render on every page.
pages/_app.tsx
Always use
next/script rather than a plain <script> tag in Next.js. It handles loading strategy and deduplication automatically.