Collecting data with Trackers and Webhooks

  1. Home
  2. Docs
  3. Collecting data with Trackers and Webhooks
  4. Trackers – collecting data from your own applications
  5. Unity Tracker
  6. Session


The Session object is responsible for maintaining persistent data around user sessions over the life-time of an application.


Argument NameDescriptionRequired?Default
foregroundTimeoutThe time until a session expires in focusNo600 (s)
backgroundTimeoutThe time until a session expires in backNo300 (s)
checkIntervalHow often to validate the session timeoutNo15 (s)

A full Session construction should look like the following:

Session session = new Session (1200, 600, 30);
Code language: JavaScript (javascript)

The timeout’s refer to the length of time the session remains active after the last event is sent. As long as events are sent within this limit the session will not timeout.



Will set whether or not the application is in the background. It is up to the developer to set this metric if they wish to have a different timeout for foreground and background.

If you’d like to learn more about Snowplow BDP you can book a demo with our team, or if you’d prefer, you can try Snowplow technology for yourself quickly and easily.