Skip to main content
The TypeScript SDK is a family of packages for sending events and structured logs to Tell. Every package is written in TypeScript with full type definitions — plain JavaScript works too.

Which package do I need?

I’m building…InstallGuide
A Node.js backend or APInpm i @tell-rs/nodeNode.js
A browser app (vanilla TS/JS)npm i @tell-rs/browserBrowser
A React SPAnpm i @tell-rs/react @tell-rs/browserReact
A Next.js appnpm i @tell-rs/nextjs @tell-rs/browserNext.js
A TanStack Router/Start appnpm i @tell-rs/react @tell-rs/browserTanStack
A Vue appnpm i @tell-rs/vue @tell-rs/browserVue

Browser

Client SDK with sessions, device context, and privacy controls.

Node.js

Server SDK with batching, gzip, and zero dependencies.

React

Provider component and hooks for React apps.

Next.js

App Router component with auto page view tracking.

TanStack

Page view tracking for TanStack Router and Start.

Vue

Plugin and composable for Vue apps.

Architecture

There are two standalone SDKs for two different runtimes: Browser SDK (@tell-rs/browser) runs in the browser. It has access to window, document, localStorage, navigator, and sendBeacon. It automatically manages device IDs, sessions, page visibility, UTM capture, and client-side context (screen, OS, locale, timezone). Data is collected client-side — rich but user-modifiable. Node.js SDK (@tell-rs/node) runs on the server. It uses HTTP + JSONL for transport, supports gzip, and has zero browser dependencies. Data is collected server-side — trustworthy and tamper-proof. Framework packages (@tell-rs/react, @tell-rs/nextjs, @tell-rs/vue) are thin wrappers around the browser SDK. They connect Tell to framework lifecycle (mounting, unmounting, route changes) and provide idiomatic APIs (hooks, composables, providers). This is why they require @tell-rs/browser as a peer — the framework package handles integration, the browser SDK handles tracking.

Further reading

Before diving into an SDK guide, you may want to read the global tracking docs first:
  • Events & Properties — event types, when to use each, property patterns
  • Users & Identity — device IDs, user IDs, the identity model
  • Sessions — session lifecycle, timeouts, automatically collected context
  • Logs — severity levels, structured data, session correlation
  • Audit & Privacy — privacy model, PII redaction, GDPR/CCPA

Validation rules

These apply to all packages:
FieldRule
API key32-character hex string
User IDRequired string (cannot be null, undefined, or "")
Event nameRequired string, 1–256 characters
Log messageRequired string, 1–65,536 characters
Group IDRequired string
Revenue amountPositive number
CurrencyRequired string
Order IDRequired string