Start for free
Get started/Quickstart

Get started

Quickstart

Install the package, add it to your build, leave a comment on your dev server, and hand it to your agent.

This sets ontrackd up on your dev server, where you are the first reviewer. Once it works, share a preview so people who are not on your machine can comment too. A site with no build uses the script tag instead.

Ask your agent

Paste this into Claude Code, Cursor or any coding agent working in your project:

Install and configure ontrackd in this project: run npx @ontrackd/feedback init and follow what it prints.

It detects your framework and package manager, installs the package, adds it to your config and connects your agent over MCP. First it asks you who will comment: only you, on your dev server, which needs no account; or others too, on shared previews, which uses your ontrackd account. When it is done, it lists what it changed and what to do next.

Or by hand

Install

$ npm i -D @ontrackd/feedback

Add it to your build

In vite.config.ts, feedback() goes before the React plugin, so it sees JSX before it is compiled.

import { feedback } from '@ontrackd/feedback/vite';

export default defineConfig({
  plugins: [feedback(), react()], // feedback() first
});

Wrap your config in next.config.mjs, and render <Feedback /> once in the root layout, app/layout.tsx. Turbopack and webpack both work.

import { withFeedback } from '@ontrackd/feedback/next';

export default withFeedback({ /* your config */ });
import { Feedback } from '@ontrackd/feedback/next/overlay';

<body>
  {children}
  <Feedback /> {/* renders nothing in production */}
</body>

In astro.config.mjs, use the integration, not the Vite plugin: Astro builds its own HTML.

import feedback from '@ontrackd/feedback/astro';

export default defineConfig({
  integrations: [feedback()],
});

In nuxt.config.ts, through Nuxt’s Vite config. The widget loads from your client bundle: nothing else to add.

import { feedback } from '@ontrackd/feedback/vite';

export default defineNuxtConfig({
  vite: { plugins: [feedback()] },
});

In vite.config.ts, feedback() goes before sveltekit(). The widget loads from your client bundle: nothing else to add.

import { feedback } from '@ontrackd/feedback/vite';

export default defineConfig({
  plugins: [feedback(), sveltekit()], // feedback() first
});

Vue, Svelte, React Router, TanStack Start, Preact, Solid, webpack, Rspack and Rsbuild work too. The Guide in the dashboard, and each project’s Setup tab, show their config.

No build: use the script tag

For a site you do not build yourself, like a theme or a CMS, one script tag adds the widget. There is no package to install and no config.

  1. Create a project

    In the dashboard’s Projects, create one for the site. Its Setup tab has these steps with your project filled in.

  2. Paste the script

    Before </head>, on every page: in a theme, a layout, or your CMS’s custom code setting. Replace prj_your_project with your project’s id, or copy the tag from the Setup tab.

    <script type="module" async src="https://api.ontrackd.com/overlay/v1/browser.js?p=prj_your_project"></script>

    Visitors see nothing: the widget stays asleep until a reviewer opens the site through their review link. With no build behind the page, each comment describes its element, and your agent finds the element in your code by that description.

  3. Allow the site's address

    In the project’s Settings → Allowed sites, add the exact origin, like https://www.example.com. The widget’s comments are refused anywhere else.

  4. 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. See Review links.

Next

Esc

Type to search every page.