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.

<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>

Open the browser dev console after the page loads:

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