Agent setup: authorize Sight MCP and ask your agent to call
get_tracking_setup. It configures this integration automatically.
JavaScript
Framework-agnostic tracker for Sight
— pageviews, custom events, SPA navigation. Ports the inline
<script src=".../script.js?k=..."> collector into a real npm package
for apps that would rather npm install than paste a <script> tag.
Same wire format, same /api/v1/track endpoint on the backend — this is
a thin client, not a second implementation of the tracking logic.
Part of Sight, split across repos under the sightapp org — see
sightapp/sight-backend's
SPEC.md for the full picture. This package is the foundation the
framework-specific wrappers (Next.js, Vue, Astro, etc. — see that repo's
tasks/plan.md, Track B) build on.
Install
Usage
Build
Ships ESM, CJS, and an IIFE (dist/index.global.js, global Sight) for
plain <script> use without a bundler.
Verified
Smoke-tested against a running sightapp/sight-backend: the built IIFE
bundle recorded a real pageview and a custom track() event, both
confirmed via GET /api/v1/query/timeseries.