Skip to main content

Signature

Parameters

string
required
A stable identifier for the user. Can be an email, UUID, or any string. Not stored as PII — hashed before transmission.
OnlookConfig
Optional configuration object. See SDK Overview for all options.

Returns

A Session object. See Session.

Example

Notes

  • Calling track() twice with the same userId returns the existing session.
  • Call session.stop() when the user navigates away to flush the final score.