Node SDK
track
Record trusted server-side behavior and outcomes.
Signature#
params contains:
event: required event name.userIdoranonymousId: at least one is required.properties: optional behavior/outcome data.context: optional extra context.timestamp: optional event time.integrations: optional destination controls.messageId: optional deduplication ID.callback: optional callback after dispatch processing.
Use Node track for authoritative backend outcomes such as payment success, subscription activation, report generation, or account changes. Do not send raw request bodies, form values, secrets, payment credentials, or provider responses.
The callback is optional and receives the dispatch context. messageId can be supplied when the application controls deduplication; otherwise the SDK generates one.