Early accessBy invitation, and the SDKs aren't published yet.Ask for an invitation
Skip to Content
Docs

Users, sessions and installs

The three ids that tie events to a person, a visit and a device.

IdWho sets itWhat it means
user_idYour app (setUser)Your own id for the person: an account id, a player id. Up to 128 bytes.
session_idThe SDKOne visit. On a device, a new session starts after 30 minutes without any event; on a server, see below.
install_idThe SDKOne installation of the app: a random UUID kept on the device.

Users

Call setUser once you know who the person is, and every following event carries that id. Pass nil / null / None / "" to clear it (on sign-out). Lyrelog never makes up a user id: events logged before setUser have none.

Each project picks the word it uses for its people (users, players, customers...) in Settings. The dashboard uses it everywhere: the Players page of a game is the Customers page of a shop.

Sessions

How each SDK makes sessions:

SDKSession
SwiftA new one after 30 minutes without an event (sessionTimeout)
AndroidA new one after 30 minutes without an event (sessionTimeoutMillis)
React Native, FlutterThe native SDK's: a new one after 30 minutes without an event (sessionTimeoutMs, sessionTimeout)
JavaScript, browserOne per tab, kept in sessionStorage with the time of the last activity, so a reload continues it; a new one after 30 minutes idle
JavaScript, NodeOne per process, for as long as it runs
PythonOne per process, and a new one after 30 minutes without an event (session_timeout)
GoOne per process, for as long as it runs
JVMOne per process, for as long as it runs

On a server a session says little about a person: group by user_id instead.

Reports that arrive later, like a crash reported on the next launch, keep the time they happened. Swift's have no session; an Android crash keeps the session it ended.

Installs

The install id survives launches and updates but not a reinstall. It is not an advertising identifier and isn't linked to anything else on the device. On Android it lives in noBackupFilesDir, so it's never in a backup restored on another device. On the web it lives in localStorage. On servers (Node, Python, Go, the JVM) it is a new id for each process. React Native and Flutter apps keep the native SDK's.

The user id isn't kept: call setUser again on each launch once you know who the person is.