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

Replit

Sight integration guide for apps built on Replit (including Replit Agent). Replit apps are real code you own in a workspace — there's no plugin marketplace, so the install is either a prompt to Replit Agent, or a two-line manual edit if you're not using Agent.

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-vercel-v0, one per AI app builder.

Install via Replit Agent

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

Add Sight analytics to this app. Find the main HTML file (usually index.html, or the root template if this is a framework like Next.js/Vite) and add this right before the closing </head> tag:

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

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

Manual install

If you're editing the workspace directly rather than using Agent, open your app's main HTML entrypoint and add the same <script> tag from above just before </head>.

Tracking custom events

Once the script tag above is loaded, window.analytics.track(name) is available anywhere in the app. For an Agent-built app, ask:

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

Verify it worked

Open your Replit app's live URL, 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