Agent setup: authorize Sight MCP and ask your agent to call get_tracking_setup. It configures this integration automatically.

Vercel v0

Sight integration guide for apps built with v0 (Vercel). v0 generates a real Next.js app you own — there's no plugin marketplace or settings page, so the install is a prompt you give v0's AI, which edits your app's actual source.

Part of Sight, split across repos under the sightapp org — see sightapp/sight-backend's SPEC.md for the full picture. This is a docs-only repo (no code to publish) — same pattern as sight-lovable, sight-bolt, and sight-replit, one per AI app builder.

Install

Paste this into the v0 chat (replace the API key with your project's):

Add Sight analytics to this Next.js app. In the root layout (app/layout.tsx), add this script tag inside the <head> (or via next/script with strategy="afterInteractive" if you'd rather use that):

<script defer src="https://api.usesight.dev/script.js?k=pk_your_project_api_key" />

Sight's script automatically tracks pageviews, including on client-side route changes, so no other code changes are needed.

Note: for a production Next.js app, sightapp/sight-nextjs (see the App Router–specific wrapper on the roadmap in sight-backend's tasks/plan.md) will be the more idiomatic install once it exists. This raw script tag works today and is what v0 can paste in immediately without adding an npm dependency.

Tracking custom events

Once the script tag above is loaded, window.analytics.track(name) is available in any client component. Ask v0 to call it wherever you want a custom event, e.g.:

When the user submits the signup form, call window.analytics.track("signup").

Verify it worked

Open the deployed app, then check GET https://api.usesight.dev/api/v1/query/overview?days=1 (with your X-API-Key header) or the Sight dashboard — a pageview should show up within a few seconds.

Source repository