Install the capture SDK
@insitue/sdk and mount the capture widget in production. The component self-isolates inside a Shadow DOM — no style or DOM leakage into your app.pnpm add @insitue/sdk
// app/layout.tsx
import { InSitueCapture } from "@insitue/sdk";
// Mount in prod only — in dev the same component (without
// projectKey) connects to a local companion instead. See /docs/dev.
{process.env.NODE_ENV === "production" && (
<InSitueCapture projectKey="pk_live_…" />
)}pk_live_…key is on the project page. It's Origin-pinned, quota'd, and rate-limited — safe to ship in your prod bundle.