1 Overview
Session parameters refer to an entire visit (also known as a session). They are used when you want to persist a value throughout the entire visit rather than just a single page view or interaction.
A common example is the login status of a user. Initially, a session might be classified as "not logged-in". Once the login occurs, the value can be updated to reflect the new status. Depending on your configuration, only the first or last value passed during the session will be considered.
Note: A session in Mapp Intelligence corresponds to a Visit in the frontend. Technically, the terms "session" and "visit" are used interchangeably.
2 Configurable Properties
Property | Description | Request Parameter |
|---|---|---|
loginStatus | Indicates whether a user is logged in during a session. This value can be passed once per visit. |
|
parameter | Tracks additional custom data points for a session. More details below. |
|
2.1 Parameters
Session parameters are additional attributes that can be configured to collect custom data relevant to the entire session. You must define these parameters in the system configuration (Configuration > Custom Parameters > Session Parameter), including the ID and the data type (text or number).
Values can be analyzed in Visitors > Session Parameters if they are of type text, or as metrics if they are of type number.
Note: If a session parameter is passed multiple times during a visit, Mapp Intelligence will evaluate either the first or last value based on the system configuration.
For setup instructions: How to Set Up Custom Parameters
3 Implementation Example
import { WebtrekkSmartPixelReact, WebtrekkSessionData } from "@webtrekk-smart-pixel/react";import { WebtrekkSmartPixelReact, WebtrekkSessionData } from "@webtrekk-smart-pixel/next";If you do not have automatic page tracking enabled, invoke the track method after adding all relevant tracking information.
WebtrekkSmartPixelReact.session({
loginStatus: "login",
parameter: {5: "male"}
});If you do not have automatic page tracking enabled, invoke the track method after adding all relevant tracking information.
render()
{
return (
<div>
<WebtrekkSessionData
loginStatus="login"
parameter={ {5: "male"} }
/>
</div>
);
}