vTilt
Why vTiltHow It WorksFeaturesFAQDocs
Docs / Install & setup
Quick startEvent forwarding
MCP server
Guides
OverviewAuthenticationOAuthAgent skills (prompts)AI intelligenceGoogle Ads
Client setup
CursorClaude DesktopVS CodeCodex
Realtime
Debug ViewRealtime Dashboard
Integration guides
Frontend frameworks
Next.jsNuxt.jsVue.jsReactReact RouterRemixGatsbySvelte / SvelteKitAstroAngularTanStack StartDocusaurus
Backend frameworks
NestJSHonoCloudflare WorkersDjangoFlaskLaravelPhoenixRuby on Rails
Backend languages
PythonPHPRubyElixirGoJava.NET / C#Rust
Stack guides
Vue + PHP
SDK
Browser SDK
InstallScript bundlesEvent trackingAutocaptureIdentify & aliasWeb VitalsSession recordingChat widgetFeature readinessRemote configurationReverse proxyDebug logging
Node SDK
Install & setupCapture, identify & aliasContext & shutdown

Documentation

vTilt
Quick startEvent forwarding

MCP server

Realtime

Debug ViewRealtime Dashboard

Integration guides

SDK

Install & setupCapture, identify & aliasContext & shutdown
DocsBrowser SDKInstall & setup

Install & setup

Add @v-tilt/node for server-side tracking. Same event shape as the browser, with explicit identity per call.

Add @v-tilt/node for server-side tracking. The wire format is identical to the browser SDK (distinct_id, anonymous_id), so events from server and browser converge on the same person record automatically.

#Install

npm install @v-tilt/node
bash

#Initialise

Create a single client at process boot, reuse it everywhere, and call shutdown() before the process exits to flush any buffered events.

import { VTiltNode } from '@v-tilt/node'

const vtilt = new VTiltNode(process.env.VTILT_TRACKER_TOKEN!, {
  host: process.env.VTILT_API_ENDPOINT || 'https://your-vtilt-instance.com',
})

vtilt.setContext({
  distinctId: 'user_123',
  anonymousId: req.cookies?.vt_anon,
})

vtilt.capture({
  event: 'purchase',
  properties: { amount: 99.99 },
})

vtilt.identify({
  distinctId: 'user_123',
  properties: { name: 'Alice', plan: 'pro' },
})

await vtilt.shutdown()
typescript

#Recommended setup

  • Construct one VTiltNode per process. The client batches events internally; multiple clients waste connections.
  • Read VTILT_TRACKER_TOKEN from environment variables, not hard-coded constants. The token is the same as the browser project token.
  • Always await vtilt.shutdown() in your shutdown signal handler (SIGINT / SIGTERM / Lambda terminate hook). Without it, the last batch of events may not flush.
  • For request-scoped frameworks (Express, Fastify, Next.js route handlers), prefer setContext() per request over passing distinctId to every capture.
PreviousDebug loggingBrowser SDKNextCapture, identify & aliasNode SDK

On this page

  • Install
  • Initialise
  • Recommended setup