Documentation Index
Fetch the complete documentation index at: https://docs.tell.rs/llms.txt
Use this file to discover all available pages before exploring further.
track calls.
No cookies. No IP addresses. No cross-site tracking. Visitors are identified by a random device UUID stored in localStorage. The SDK collects anonymous device metadata only — you choose what properties to send. See Audit & Privacy for the full privacy model.
Quick start
configure() are queued and replayed once ready.
Verify it works
Open your browser’s DevTools Network tab and look for aPOST request to https://collect.tell.app/v1/events. If you see a 202 response, the SDK is sending data successfully. In development mode, the SDK also logs to the console at debug level.
Script tag (no bundler)
If you don’t use a bundler, load the SDK directly from a CDN. The global build exposes aTell object on window.
SPA page view tracking
For single-page apps without a framework router, hook into the History API to track navigations:Pin a version
Replace@latest with a specific version to avoid unexpected changes in production:
Configuration
Tracking events
No user ID parameter — the SDK tracks the current user automatically (anonymous until you callidentify). For a full explanation of the identity model (device ID, anonymous ID, user ID), see Users & Identity.
Standard event names
Super properties
Properties automatically attached to everytrack, group, and revenue call:
Structured logging
logEmergency to logTrace. See Logs for the full level reference and when to use each.
Sessions
Sessions are managed automatically. The session ID is persisted to localStorage, so page navigations within the same site continue the same session. A new session starts after 30 minutes of inactivity (configurable viasessionTimeout) or after 24 hours (configurable via maxSessionLength). The SDK also captures UTM parameters from the URL as super properties.
For the full session lifecycle model, see Sessions.
Data collected automatically
The browser SDK captures device context on every session. No PII is collected — all fields are anonymous device and browser metadata.| Data | Example value | Field |
|---|---|---|
| Full page URL (incl. query strings) | https://example.com/pricing?ref=blog | context.url |
| Page title | Pricing - Acme | context.title |
| Referrer URL | https://google.com/search?q=acme | context.referrer |
| Referrer domain | google.com | context.referrer_domain |
| UTM parameters | utm_source=twitter | Super properties |
| Browser + version | Chrome 120 | context.browser, context.browser_version |
| OS + version | macOS 14.2 | context.os_name, context.os_version |
| Device type | desktop | context.device_type |
| Screen dimensions | 2560 x 1440 | context.screen_width, context.screen_height |
| Viewport dimensions | 1280 x 720 | context.viewport_width, context.viewport_height |
| Device pixel ratio | 2 | context.device_pixel_ratio |
| CPU cores | 8 | context.cpu_cores |
| Device memory | 16 (GB) | context.device_memory |
| Locale | en-US | context.locale |
| Timezone | America/New_York | context.timezone |
| Connection type | 4g | context.connection_type |
| Touch support | false | context.touch |
Redaction & beforeSend
ThebeforeSend hook lets you transform or drop events before they’re queued. Return the modified event, or null to drop it entirely.
Drop events from routes
Strip query params from URLs
Remove PII from properties
Scrub log data
User opt-out via beforeSend
redact() utility
For common redaction patterns, use the built-in redact() factory instead of writing beforeSend by hand:
redact() and redactLog() return standard beforeSend functions. You can combine them with your own in an array:
Error auto-capture
SetcaptureErrors: true to automatically log uncaught errors and unhandled promise rejections.
What it captures
window.onerror — uncaught exceptions:
message— the error messagefilename— source file URLlineno/colno— line and column numberstack— stack trace (when available)
unhandledrejection — unhandled promise rejections:
message— the rejection reason (or"Unhandled promise rejection")stack— stack trace (when the reason is an Error)
logError with service "browser" and appear in your Tell logs dashboard.
When to use vs. your own error boundary
captureErrors is a catch-all safety net for errors that escape your application code. If you use React error boundaries or framework error handlers, you may prefer to log to Tell explicitly from those:
Privacy
respectDoNotTrack: true to honor the browser’s Do Not Track setting.
Lifecycle
Error handling
Tracking calls (track, identify, group, revenue, alias) never throw. Validation errors and network failures route through the onError callback:
Retry behavior
On HTTP send failure (5xx or network error), the SDK retries with exponential backoff: 1-second base delay, 1.5x multiplier, 20% jitter, capped at 30 seconds. AftermaxRetries attempts (default: 5), the batch is dropped and reported via onError.
The SDK also checks navigator.onLine before each attempt and skips if the browser reports offline.
Browser-specific features
Bot detection — automatically disables tracking whennavigator.webdriver is set or the user agent contains “headless”. Controlled by botDetection (default: true).
Page unload — the SDK flushes via navigator.sendBeacon on beforeunload and visibilitychange to minimize data loss.
Pre-init queue — events called before configure() are buffered (up to 1,000) and replayed once the SDK is ready.
Configuration reference
| Parameter | Default | Description |
|---|---|---|
endpoint | https://collect.tell.app | HTTP collector URL |
batchSize | 20 | Events per batch before auto-flush |
flushInterval | 5,000 ms | Time between auto-flushes |
maxRetries | 5 | Retry attempts on send failure |
closeTimeout | 5,000 ms | Max wait on close() |
networkTimeout | 10,000 ms | HTTP request timeout |
sessionTimeout | 1,800,000 ms | Inactivity time before new session |
maxSessionLength | 86,400,000 ms | Max session duration (prevents zombie sessions) |
persistence | localStorage | "localStorage" or "memory" |
respectDoNotTrack | false | Honor browser DNT setting |
botDetection | true | Auto-disable for bots/headless |
captureErrors | false | Auto-log uncaught errors |
logLevel | error | SDK log verbosity |
maxQueueSize | 1,000 | Max queued items before oldest drops |