One runtime instance
The root layout persists while App Router pages change, preventing duplicate widget controllers.
Next.js App Router guide
Put the feedbacks.dev script in the root layout, verify one real submission, then manage the form from the dashboard instead of shipping configuration in application code.
import Script from 'next/script'
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{children}
<div data-feedbacks-host="YOUR_PROJECT_KEY" />
<Script
src="https://app.feedbacks.dev/widget/latest.js"
data-project="YOUR_PROJECT_KEY"
strategy="afterInteractive"
/>
</body>
</html>
)
}Name the app, then open its Install workspace. The dashboard generates the browser-safe project key and exact snippet.
Place the host element and script after your application content so one widget instance survives route changes.
Confirm the saved form and project key work before debugging your own application shell.
Open a route you recognize, submit a message, and check that the URL and browser context reach the correct inbox.
Change fields, placement, labels, colors, screenshots, attachments, and Product Updates from the dashboard.
The root layout persists while App Router pages change, preventing duplicate widget controllers.
Hosted verification separates project configuration problems from host application problems.
Saved dashboard configuration reaches the installed widget without changing layout.tsx.
Browser code receives the publishable project key generated by the Install workspace. Keep REST and MCP credentials server-side.
A page component can remount during navigation and create duplicate triggers. Use the root layout.
Verify the default form from the real application first. Add origin restrictions, CAPTCHA, and custom triggers afterward.
Choose the Website script or the React wrapper, not both in the same application shell.
The framework documentation also covers React, Vue, WordPress, static HTML, shared templates, and tag managers.
Install the generated project snippet in your root layout and verify one message from a real route.