Integrations Next.js

Next.js

Three steps, one snippet - no rebuild of your app required.

  1. 01 Copy your widget key (pk_...) from the dashboard: Settings -> API Keys.
  2. 02 In the App Router, add a client component that injects the script once in your root layout; in the Pages Router, add it to _document.js.
  3. 03 Keep data-api-url pointed at your API origin.
  4. 04 Rebuild - the widget appears site-wide.
INSTALL SNIPPET
<script src="https://cdn.example.com/widget.js"
        data-public-key="pk_..."
        data-api-url="https://api.example.com"
        async></script>