Skip to content

Vanilla / CDN

If your app is a plain HTML page, server-rendered template, or anything without a build step, the VEKTIS tracker ships as an IIFE bundle you can load directly via <script>.

<script src="https://unpkg.com/@vektis-io/tracker@1.2.0/dist/vektis-tracker.iife.js"></script>

The IIFE bundle exposes the SDK on window.vektis.

user_id is what produces the Seats number on a dev item’s Customer Breakdown — how many people at an account used the feature, out of everyone there VEKTIS has seen. Send a stable id from your own system, never an email address (hashed or otherwise); VEKTIS only ever counts distinct people within a feature, and never displays the identifier or any individual’s activity across features.

<script src="https://unpkg.com/@vektis-io/tracker@1.2.0/dist/vektis-tracker.iife.js"></script>
<script>
vektis.init({ apiKey: "vk_pub_prd_..." });
vektis.identify({ customer_id: "acct_A1", user_id: "user_123", name: "Acme Corp" });
vektis.track("feature.used", { feature_id: "reports-dashboard" });
</script>

Open the browser dev console after the page loads:

vektis.getStatus();
// { state: "READY", queueLength: 0, identityCustomerId: "acct_A1", identityUserId: "user_123" }