Ask this site Sign up

Ask this site for Next.js

Load the script once in your root layout, then put the box in any component.

app/layout.tsx

import Script from "next/script";

<Script src="https://askthissite.com/embed.js" strategy="afterInteractive" />

Any component

<div data-everypage-site="YOUR-SITE-ID" />

Boxes on pages you move to later mount by themselves, so client-side navigation needs nothing extra.

Your site id is on your site's page after you sign up.

The Ask this site box answering a question with links to the pages it used
Answers come from your pages, with links to the exact section.
Start free Try it on your docs first