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

Vue

Sight analytics Vue plugin — wraps @sightapp/analytics for Vue 3 apps.

Part of Sight — see sightapp/sight-backend SPEC.md and tasks/plan.md (Track B3).

Install

npm install @sightapp/vue

Until both packages are on npm, from sibling checkouts:

npm install file:../sight-js file:../sight-vue

Usage

import { createApp } from "vue";
import { SightPlugin } from "@sightapp/vue";
import App from "./App.vue";

createApp(App)
  .use(SightPlugin, { apiKey: "pk_..." })
  .mount("#app");

Custom events, anywhere in your app:

import { track } from "@sightapp/vue";

track("signup");

SPA navigation

vue-router's default createWebHistory() mode uses the native History API, which @sightapp/analytics's init() already patches — so navigations via <router-link> / router.push() are tracked automatically. If you use createWebHashHistory() or createMemoryHistory(), navigations bypass the History API and won't be tracked automatically; call track() manually on route change instead (e.g. in a global router.afterEach guard).

Build

npm install
npm run build      # dist/{index.js,index.cjs,index.d.ts}
npm run typecheck

Source repository