JavaScript SDK - getSessionInfo method
This method returns information about the current session: its ID, metadata, user ID and start time.
Signature
Section titled SignaturegetSessionInfo(): SessionInfo | null
Return value
Section titled Return valueReturns null if the tracker isn’t initialized, otherwise an object of the following shape:
interface SessionInfo {
sessionID: string | undefined
metadata: Record<string, string>
userID: string | null
timestamp: number // session start, ms
projectID?: string
}