vTilt
Why vTiltHow It WorksFeaturesFAQDocs
Docs / Feature readiness
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

InstallScript bundlesEvent trackingAutocaptureIdentify & aliasWeb VitalsSession recordingChat widgetFeature readinessRemote configurationReverse proxyDebug logging
DocsBrowser SDKFeature readiness

Feature readiness

SDK lifecycle — when features are ready, how calls queue, and how to wait for full initialisation.

Every SDK method is safe to call at any time after vt.init(). The SDK queues calls internally and applies them in order when each feature is ready. No timing hacks needed.

#SDK initialised

The sdk:initialized event fires after DOM boot, feature start, and the initial config load. This is the single lifecycle hook for "SDK is fully wired".

import { vt } from '@v-tilt/browser'

vt.init('YOUR_PROJECT_TOKEN', { api_host: 'https://www.vtilt.com' })

// Features are constructed during init(). sdk:initialized fires after boot + start.
vt.on('sdk:initialized', () => {
  console.log('SDK ready — features started')
})
typescript

#Early calls are safe

Feature methods like vt.openChat() and vt.showChat() queue internally before the feature is ready. They flush automatically in call order — no promises or await needed.

import { vt } from '@v-tilt/browser'

vt.init('YOUR_PROJECT_TOKEN', {
  api_host: 'https://www.vtilt.com',
  chat: { enabled: true, bubble: { visible: false } },
})

// Safe immediately after init — calls queue until the feature is ready.
vt.showChat()
vt.hideChat()
vt.openChat()
typescript

#How it works

Several internal layers queue work so public API calls never get lost:

  1. Boot gate — queues calls made before DOMContentLoaded.
  2. Feature deferral — queues calls until async initialisation completes (e.g. chat settings fetched).
  3. Lazy load — queues calls until the external script loads.
  4. Remote config + ingest — vt.capture() events buffer for HTTP until __remote_config_loaded (see Event tracking). Google Tag uses the same flag before installing gtag, with a capped pre-commit queue only; after that, dataLayer orders calls until gtag.js is ready.

Implementation details live in the repository under docs/patterns/tracker-feature-lifecycle.md.

PreviousChat widgetBrowser SDKNextRemote configurationBrowser SDK

On this page

  • SDK initialised
  • Early calls are safe
  • How it works