Quick start
Install the vTilt SDK, initialise it with your project token, and start tracking events in three steps. Built to be readable by AI agents.
vTilt is a privacy-first analytics platform you drop into any web app. The browser SDK installs at window.vt, batches events to your project, and forwards them to destinations (Google Tag, Meta CAPI, PostHog, GA4) you configure in the dashboard. This page walks through the minimum integration; deeper topics live under SDK > Browser SDK.
#Using these docs with an AI agent
Every page in this site is also a plain-markdown file. Point an AI assistant (Claude, ChatGPT, Cursor, Copilot, …) at one of the URLs below and it can integrate vTilt for you end-to-end.
| URL | What it returns | When to use it |
|---|---|---|
/llms-full.txt | The entire docs corpus as one markdown stream, with canonical URLs per section. | Paste once and let the agent ingest everything. |
/llms.txt | Short index (llmstxt.org convention) with a one-line summary per page. | Smarter agents that fetch pages on demand. |
/docs/<slug>.md | The current page as raw markdown. | When you only need a single page in context. |
Use the Copy menu in the top-right of any page to grab the markdown, the .md URL, or open the page directly inside ChatGPT or Claude with a pre-seeded prompt.
#1. Install the SDK
Pick a package manager or paste a script tag — both options expose the same vt global.
npm install @v-tilt/browser#2. Initialise the SDK
Call vt.init() once, as early as possible (before paint when you can). Anything before this returns no-ops; everything after is queued and flushed once the SDK boots.
import { vt } from '@v-tilt/browser'
vt.init('YOUR_PROJECT_TOKEN', {
// Optional. https://www.vtilt.com is the managed-cloud ingest host;
// self-hosted or reverse-proxy users replace this with their own origin.
api_host: 'https://www.vtilt.com',
autocapture: true,
capture_pageview: true,
capture_pageleave: true,
persistence: 'localStorage',
})#3. Track events
Pageviews, clicks and form submits are captured automatically when autocapture is on. For domain-specific events use vt.capture():
vt.capture('button_clicked', {
button_name: 'Sign Up',
page: 'homepage',
})
vt.capture('purchase_completed', {
product_id: 'SKU-123',
price: 99.99,
currency: 'USD',
quantity: 1,
})#What to wire up next
| Topic | Why it matters |
|---|---|
| Script bundles | Pick array.js vs array.chat.js vs full bundles — especially when chat or recording must load without extra requests. |
| Identify & alias | Linking events to authenticated users — both at login and on every authenticated page load. |
| Framework guides | Drop-in setups for Next.js, Nuxt, SvelteKit, Astro, Angular, NestJS, Django, Laravel, Rails, and more. |
| Reverse proxy | Route SDK traffic through your own domain so ad blockers can't strip analytics. |
| Event forwarding | Send the same events to Google Ads, GA4, Meta CAPI, PostHog. |
| Autocapture | Tune what the SDK captures automatically (allow / ignore lists, sensitive elements). |
| Session recording | Replay user sessions with privacy-aware masking. |
| MCP server | Connect Claude, Cursor, ChatGPT or any MCP client to your vTilt project. Nineteen tools (VQL, AI memory, campaigns, docs search, …) — start from the documentation map. |
#Next steps
- Read Identify & alias for the full identification model — anonymous → known user merge, SSR pattern for already-logged-in visitors, logout behaviour.
- Pick your stack from the framework integration guides — drop-in setups for the most common front-end and back-end frameworks.
- Use the Debug View to verify events arrive correctly while you integrate.