A Session is a single recording of sensor data as defined by Moonsense. A Session has a specific start and stop time as specified by the duration upon creation or explicitly by the implementing application. A Session also consists of metadata surrounding the data captured and includes the ability for you to specify details to make lookup and filtering of sessions easier.

Custom Data

Sessions currently offer two primary methods of providing custom metadata: labels and journeyId. Both are detailed below.


Labels provide a way to "label" the session. For example, if you are recording a specific user interaction like a login process, you could label the session with "login" to make it easier to find all sessions that were recorded during the login process.

Labels are designed to be used as a way to categorize sessions. Multiple labels can be applied to a session during the session creation process.

Setting the Labels

Labels are set on session creations

const moonsenseSdk = Moonsense.init(...); const sessionConfig: SessionConfig = { // ... other settings labels: ['MyLabel', 'MyOtherLabel'] } // This session is tagged with the labels 'MyLabel' and 'MyOtherLabel' const session = moonsenseSdk.createSession(sessionConfig);

:warning Labels should not be used for grouping limited data sets like dates or users

Journey Id

Grouping Sessions can be incredibly useful to show interactions as they span multiple sessions. For example, a session may be recorded during a login process and then another session may be recorded during a checkout process. By default, these these two sessions are not associated as part of the same user journey. However, they can be grouped by setting the journeyId.

The journeyId is a field you create to associate multiple sessions together as part of a single, larger, multi-session interaction. This allows you to view all sessions with the specified journeyId.

The journeyId is an open text field that you specify. It can be a interactive flow id that you create on your backend that has some meaning to you or it can be a GUID that is created on application start and reused across the application lifecycle.