JavaScript SDK ⁠-⁠ Methods

  • Constructor: Learn all about the initialization options for the tracker.
  • event(): Send custom events to be recorded as part of your replays with this method.
  • getSessionToken(): Get the currently active session’s token.
  • getSessionID(): Get the currently active session’s ID.
  • getSessionURL(): Get the url to replay the current session.
  • handleError(): Capture custom error information and save it as part of your recording.
  • isActive(): Get the current state of the active session.
  • issue(): Capture custom technical events and save them as part of the replay.
  • setUserID(): Identify your users with this method.
  • setMetadata(): Set a metadata field and save it as part of the recording.
  • start(): Start recording a session.
  • stop(): Stop the recording of a session with this method.
  • clearPersistFlag(): Removes persistent Feature Flags from browser’s sessionStorage.
  • getFeatureFlag(): Returns a IFeatureFlag by key if eixsts.
  • onFlagsReload(): Sets the callback to use when Feature Flags are loaded.
  • isFlagEnabled(): Returns true if flag with this key does exist and is active.
  • reloadFlags(): Reloads all flags (can be useful if user session had any change of metadata, userId or any other information that could be required for certain flag conditions).
  • getAllFeatureFlags(): Returns all flags (IFeatureFlag[]) that are active right now.
  • coldStart(): Starts buffering messages (refreshing buffer) with the possibility to call start() to enable session recording and send the buffer content.
  • startOfflineRecording(): Starts offline session recording which can be sent with uploadOfflineRecording.
  • uploadOfflineRecording(): Uploads the stored session buffer to the backend.
  • forceFlushBatch(): Force sends the current batch of messages without waiting for its completion.
  • trackWs(): Create a hook to capture WebSocket messages.