Quickstart
Your first page view in five minutes
Viakite Analytics counts page views, engaged time, scroll depth, outbound links and file downloads from one line of code. No cookies and no consent banner. This page takes you from sign-up to your first page view.
Using a coding agent?
Connect it to these docs with the MCP server, then ask it to install Viakite: claude mcp add --transport http viakite-docs https://docs.vk.viabio.me/mcp. Cursor and others: see Use the docs with AI agents. The dashboard's Install screen also has a ready prompt with your key filled in.
Before you start
You need a Viakite account and a project. Sign up at the dashboard; the first screen asks for your project's name and website, and gives you its public key, which starts with pk_live_. A project is one app or site; see Concepts.
Add Viakite to your site
Add the script or the component
Pick the way that fits your site. The script tag works on any site; the component is for apps built with a framework.
index.html1<script defer src="https://us.api.vk.viabio.me/v1/a.js" data-project="pk_live_us_…"></script>app/layout.tsx1import { Analytics } from "@viakite/sdk/react";23export default function RootLayout({ children }: { children: React.ReactNode }) {4return (5<html lang="en">6<body>7{children}8<Analytics project="pk_live_us_…" />9</body>10</html>11);12}src/App.tsx1import { Analytics } from "@viakite/sdk/react";23export function App() {4return (5<>6<Analytics project="pk_live_us_…" />7{/* your routes */}8</>9);10}App.vue1<script setup lang="ts">2import { Analytics } from "@viakite/sdk/vue";3</script>45<template>6<Analytics project="pk_live_us_…" />7<RouterView />8</template>src/routes/+layout.svelte1<script>2import Analytics from "@viakite/sdk/svelte";3let { children } = $props();4</script>56<Analytics project="pk_live_us_…" />7{@render children()}With a framework, install the package first:
npm install @viakite/sdk.Deploy, then open your site
Nothing is sent from
localhost,127.0.0.1orfile://. To try it on your machine, adddata-localhost(or thelocalhostprop).Watch it arrive in Realtime
Open Realtime in the dashboard. Your visit shows within a few seconds. The Install page in the dashboard also waits for your first event and says when it arrives.
Send your first event
Page views come on their own. For what matters to your business, send an event:
1import { track } from "@viakite/sdk";23track("Signup", { plan: "pro" });
With the script tag the same call is on window: viakite.track("Signup", { plan: "pro" }). Then turn it into a goal to count conversions.
Seeing nothing?
Add data-debug to the script (or the debug prop) to see each event in the browser console without sending it. More in Debugging.