Skip to content
PingbackDocs
GuidesChannels

Widget in your framework

Copy-ready setup for Next.js, React, Vue, Angular and Svelte.

Client-side

Before you start

Create a widget in Channels › Website and copy its widget ID from Widget Studio. Add the script once, in the layout every page shares.

Choose your framework

Install in Next.js
import type { ReactNode } from "react";
import Script from "next/script";

export default function RootLayout({ children }: { children: ReactNode }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script
          src="https://pingback.live/pingback.js"
          data-widget-id="YOUR_WIDGET_ID"
          strategy="afterInteractive"
        />
      </body>
    </html>
  );
}

Check it works

  1. Open your app

    The launcher should appear in the corner.

  2. Send a message

    Start a conversation and say hello.

  3. Reply from Pingback

    Find it in Inbox and reply. The answer should appear in your app.

Not loading? Check the widget ID, that the script is added only once, and that your Content Security Policy allows pingback.live and api.pingback.live.