For a client or a teammate, deploy a preview and let them comment there. The preview build is opted in with the project’s build secret; a build without it carries nothing of ours. Each project’s Setup tab has these steps with its own values filled in.
Turn on shared mode
Pass
sharedto the plugin, on wherever the build secretONTRACKD_SECRETis set. The rest of the config stays as the Quickstart left it. Your framework’s config is below.Set the secret for preview builds
In your host’s environment variables, add
ONTRACKD_SECRETfor preview builds only. Its value is in the project’s Setup tab, and in Settings → Build secret.ONTRACKD_SECRET=sk_prj_…Allow the preview's address
In the project’s Settings → Allowed sites, add the exact origin the preview is served from. Comments from any other address are refused. Your own dev server needs no entry: see below.
Invite reviewers
In the project’s People tab, create a review link: whoever opens it can comment under the name you give, without an account. To give someone the dashboard too, invite them by email instead.
Shared mode in your config
The same config as in the Quickstart, with shared mode on wherever ONTRACKD_SECRET is set.
In vite.config.ts, ontrackd() stays first, before the React plugin:
import { ontrackd } from 'ontrackd/vite';
export default defineConfig({
plugins: [
ontrackd({ shared: Boolean(process.env.ONTRACKD_SECRET) }), // first
react(),
],
});In next.config.mjs, the options go after your config:
import { withFeedback } from 'ontrackd/next';
export default withFeedback(
{ /* your config */ },
{ shared: Boolean(process.env.ONTRACKD_SECRET) },
);<Feedback /> stays once in app/layout.tsx, as in the Quickstart:
import { Feedback } from 'ontrackd/next/overlay';
<body>
{children}
<Feedback /> {/* renders nothing in production */}
</body>In astro.config.mjs, on the integration:
import ontrackd from 'ontrackd/astro';
export default defineConfig({
integrations: [ontrackd({ shared: Boolean(process.env.ONTRACKD_SECRET) })],
});In nuxt.config.ts, through Nuxt’s Vite config:
import { ontrackd } from 'ontrackd/vite';
export default defineNuxtConfig({
vite: { plugins: [ontrackd({ shared: Boolean(process.env.ONTRACKD_SECRET) })] },
});In vite.config.ts, ontrackd() stays before sveltekit():
import { ontrackd } from 'ontrackd/vite';
export default defineConfig({
plugins: [
ontrackd({ shared: Boolean(process.env.ONTRACKD_SECRET) }), // first
sveltekit(),
],
});With the script tag there is no build and no shared mode: the live site is what reviewers comment on. The Quickstart covers it.
Your dev server, too
Once the app has the secret on your machine (ONTRACKD_SECRET in .env.local or .env, where init puts it), your dev server uses the project as well. The bar asks you to sign in, with GitHub, Google or an email code, as on a preview. Your comments go to the project, with the file and line of the element and the git branch you are on, so your teammates, the dashboard and your agent see them with the preview’s.
- No address to allow.
localhost,127.0.0.1,*.localhostand*.test(Laravel Herd and Valet) are accepted on any port, for every project. Signing in still needs you to be a member of the project. - No build. A dev comment belongs to no deploy: it points at the file and line as they were when you wrote it.
- To stay local, remove
ONTRACKD_SECRETfrom the app’s env files, or setFEEDBACK_CLOUD_SYNC=0. The bar goes back to a name and comments saved in.feedback/, within a minute. Comments written there before the app was linked stay there. - Offline, the page falls back to local mode, and the browser console says why.
What a shared preview gives you
Anyone you let in can comment on the preview, and each comment still knows the file and line behind the element it points at. Without the project’s secret, nobody can read those locations from the preview.
Why production stays clean
Shared mode is on only where ONTRACKD_SECRET is set, and you set it for preview builds only. A production build, built without it, carries nothing of ours. A preview build needs the secret and no other variable.
Which address to allow
Allow one that stays the same between deploys, like your preview branch’s URL. A per-deployment URL changes on every push, and comments from the new one are refused until it is allowed.
