Web session
Explore what information is available for web sessions.
This type represents a summary of a user's activity in a web application, providing valuable insight into user behavior and engagement.
In addition to the properties listed below, the web session supports additional properties called custom attributes.
These attributes are useful if you want to store additional information that is only relevant during the session. For example, you could set a plan attribute to store the plan the user selected and use it later in the session for personalization purposes.
Properties
These are the available properties:
- start
The start time of the session, corresponding to the time of the first interaction in the session.
- end
The end time of the session, corresponding to the time of the last interaction in the session.
- duration
The duration of the session until the last interaction. It is calculated as the difference between the start time and the end time.
- landingPage(optional)
The URL of the page the user landed on in the current session. It is not available if the starting page is unknown.
- referrer(optional)
The URL of the page that linked to the page the user landed on in the current session. It is not available if the initial page is accessed directly.
- stats
The aggregate statistics of the session.
- <attribute>(optional)
A custom attribute, where /*<attribute>*/ is the name of the attribute.
You can access any custom attribute just like any other property. For example, if you have defined a custom property named plan, you can access it like this:
session's planIf a custom attribute has the same name as a predefined one, it takes precedence and hides the predefined attribute without overwriting it. Removing the custom attribute exposes the predefined one again.