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>.
1. Add the script tag
Section titled “1. Add the script tag”<script src="https://unpkg.com/@vektis-io/tracker@1.2.0/dist/vektis-tracker.iife.js"></script><script src="https://cdn.jsdelivr.net/npm/@vektis-io/tracker@1.2.0/dist/vektis-tracker.iife.js"></script>The IIFE bundle exposes the SDK on window.vektis.
2. Initialize, identify, and track
Section titled “2. Initialize, identify, and track”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>3. Verify the install
Section titled “3. Verify the install”Open the browser dev console after the page loads:
vektis.getStatus();// { state: "READY", queueLength: 0, identityCustomerId: "acct_A1", identityUserId: "user_123" }