Widget in your framework
Copy-ready setup for Next.js, React, Vue, Angular and Svelte.
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
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
- Open your app
The launcher should appear in the corner.
- Send a message
Start a conversation and say hello.
- 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.