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”<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" }); 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" }