Node — Capture
Track events from the server withsignal.capture(options). Pass sessionId and windowId from request headers to correlate with the client session.
capture(options)
| Option | Type | Required | Description |
|---|---|---|---|
distinctId | string | yes | User identifier |
event | string | yes | Event name |
properties | Record<string, JsonType> | no | Event properties |
timestamp | Date | no | When the event occurred (default: now) |
groups | Record<string, string> | no | Groups the user belongs to (e.g. { company: 'acme' }) |
sessionId | string | no | From x-signal-session-id header for client correlation |
windowId | string | no | From x-signal-window-id header for client correlation |
Example
See also
- Identify — Identify users
- Initialization — getSessionInfo pattern
