Caddi
Sign inSign up

Per-env toggle

You usually don’t want the comment widget on production. The templates use an env-var toggle to keep it off by default in prod and on in staging and dev.

The default

The Caddi templates ship with NEXT_PUBLIC_CADDI_PINPOINTS set as follows:

bash
# production    NEXT_PUBLIC_CADDI_PINPOINTS=off
# staging       NEXT_PUBLIC_CADDI_PINPOINTS=on
# dev           NEXT_PUBLIC_CADDI_PINPOINTS=on

Your client sign-off page (staging) gets the widget. Your live site doesn’t. Your team’s dev environment is your sandbox.

Turning on in production

Some teams want it on in production but locked to authenticated users. Two options:

  • Flip the env var to on in production. Anyone who knows the keybind triggers it.
  • Gate the script on your auth check (see the Next.js example), so only signed-in users see it.

Per-user gating

tsx
{user?.role === 'admin' && (
  <Script
    src="https://pinpoints.caddi.build/v1.js"
    data-caddi-project={process.env.NEXT_PUBLIC_CADDI_PROJECT_ID}
    data-caddi-actor={user.email}     // optional — attributes the request
    strategy="afterInteractive"
  />
)}

The optional data-caddi-actor attribute attributes requests to a specific person. Without it, requests are anonymous on the inbox.

Pinpoints does not log keystrokes, page contents, or scroll positions. It only fires on the explicit keybind, and only captures the screenshot at the moment the user submits.

Next

Inbox →