Skip to content

Quickstart

Pick your stack, copy the snippet. Two minutes, tops.

Grab a publishable key (vk_pub_*) at Settings → API Keys — you’ll paste it into the snippets below.

Terminal window
npm install @vektis-io/tracker

Initialize once at your app entry — vektis is then importable anywhere:

src/main.tsx
import * as vektis from "@vektis-io/tracker";
vektis.init({ apiKey: import.meta.env.VITE_VEKTIS_KEY });

Call identify({ customer_id, user_id }) once you know who the user is — wherever your auth state resolves.

import * as vektis from "@vektis-io/tracker";
<button
onClick={() =>
vektis.track("feature.used", {
feature_id: "checkout-button",
action: "clicked",
})
}
>
Checkout
</button>

Done. Events are flowing.