UseDocumentation Index
Fetch the complete documentation index at: https://docs.trodo.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
track to record product-specific behavior: signups, workflow steps, integrations, billing milestones — anything auto-events do not cover.
Backend SDKs are stateless. Node.js and Python require the user’s
distinctId / distinct_id as the first argument on every call. The browser SDK is stateful — after identify() the id is remembered in session/localStorage.Signatures
- JavaScript (browser)
- Node.js
- Python
Parameters
Backend only. The end-user’s unique id. Required on every call because the server SDKs don’t persist identity.
Name of the event. Prefer
snake_case, action-oriented names. Max 255 chars.JSON-serialisable properties for filtering and breakdowns.
Node accepts a
TrackOptions object ({ category, timestamp }); Python accepts a category string positional. Both default category to "custom".Basic call
- JavaScript (browser)
- Node.js
- Python
Bind once, call many (forUser / for_user)
When you’re emitting several events for the same user in a row — a request handler, a background job — bind the distinct id once and call methods on the returned context. The browser SDK doesn’t need this because identity is already bound globally.
- JavaScript (browser)
- Node.js
- Python
Event category
Override the defaultcustom category when you want to separate a class of events in the dashboard — e.g. security, billing, lifecycle.
- JavaScript (browser)
- Node.js
- Python
Batching (server only)
Enable batching at init when your backend emits thousands of events per second. Events are queued in memory and flushed on size/time/explicit flush.- Node.js
- Python
shutdown() on process exit to flush the queue.
Naming best practices
Do
Avoid
Property best practices
Use typed, bounded values — strings for categoricals, numbers for metrics. Avoid free-form blobs.Reserved names
Don’t send properties that collide with auto-captured fields (page, current_url, referrer, timestamp, user_agent, screen_width, viewport_width, page_title, url, href). They may be stripped.
Error tracking
Wrap fallible code and track both outcomes so you can compute success rates as a ratio.- JavaScript (browser)
- Node.js
- Python
server_error event automatically when autoEvents is on.
Related methods
Identify users
Link anonymous sessions to known identities
User properties
Persistent traits that follow the user