Typed SDK for ReplayPilot session replay. Call
init() once and it injects the hosted snippet, no <script> tag by hand.
npm install @replaypilot/sdkimport { init, track, identify, grantConsent } from "@replaypilot/sdk";
init({ projectId: "pk_live_xxxxxxxx" });
// Tag a product event
track("checkout_completed", { plan: "pro" });
// Tag the session with your own user id
identify("user_123", { plan: "pro" });init({ projectId: "pk_live_xxxxxxxx", requireConsent: true });
// later, once the visitor accepts your cookie banner
grantConsent();ReplayPilot speaks Sentry's own envelope protocol. Point any Sentry SDK
(@sentry/browser, @sentry/node, @sentry/nextjs, and the rest) at
ReplayPilot's ingest endpoint by swapping the dsn, no ReplayPilot-specific
error SDK needed:
import * as Sentry from "@sentry/browser";
Sentry.init({ dsn: "https://[email protected]/1" });Use your project's public key in place of pk_live_xxxxxxxx. The trailing
/1 is a shape the Sentry SDK expects; ReplayPilot's ingest endpoint ignores
its value.
MIT