--- title: "Session" slug: "session-1" description: "Enrich sessions with the Node.js Library: login status, temporary session ID and session parameters via MappIntelligenceSession." status: "update" updated: 2026-11-02T15:00:18Z published: 2026-11-02T15:00:18Z canonical: "docs.mapp.com/session-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Session Sessions are automatically created in Mapp Intelligence when a visitor first triggers a request (for example, a page or event call). You cannot manually start or end a session via the library. However, you can enrich existing sessions with additional information that applies to the entire visit – for example, the user’s login status, A/B test group, or device type. These details are transmitted as Session Parameters. The session object also supports a temporary session ID, which helps link multiple requests within the same visit if no persistent cookie is available. --- ## Session Parameters Session Parameters enrich session-level data with additional information about a visit. They must be configured in Mapp Q3 before they can be tracked via the library. During setup, you define the data type (text or number) and other attributes for each parameter. Mapp Intelligence provides a range of predefined Session Parameters for common use cases, such as *Login Status*, *Session Type*, or *Device Category*. Alternatively, you can create custom Session Parameters to capture completely individual session information — for example, *automatic website login*, *A/B test group assignment*, *NPS feedback*, or a *persistent shopping cart*. For detailed setup instructions and a full overview of predefined parameters, see [How to set up custom parameters](/v1/docs/how-to-set-up-custom-parameters). --- **Supported Methods** | **Method** | **Description** | **Where to configure *** | **Where to analyze** | | --- | --- | --- | --- | | **constructor** | Initializes a new session object. | – | – | | **setLoginStatus** | Transmits the user’s current login status. | *SP > Login Status* | *Visitors > Session Parameters* | | **setTemporarySessionId** | Assigns a temporary session ID to keep the session consistent without persistent storage. | *–* | *–* | | **setParameter** | Adds custom session parameters for visit-level information. | *SP > Own Configuration* | *Visitors > Session Parameters* | * **Config Abbreviations:** - **SP** = Mapp Q3 > Configuration > Custom Parameters > Session Parameters > Preconfigured > … #### Generated request parameters | **Method** | **Request parameter** | **Constant** | | --- | --- | --- | | **setLoginStatus** | `cs800` | `LOGIN_STATUS` | | **setTemporarySessionId** | `fpv` and `fpt` (always `2.0.0`) | `TEMPORARY_SESSION_ID` and `TEMPORARY_SESSION_ID_TYPE` | | **setParameter** | `cs<ID>` | `CUSTOM_SESSION_PARAMETER` | > [!NOTE] > Note > > Values that are empty or exactly `0`, `0.0`, `false` or `{}` are not transmitted. For example, a login status or session parameter with the value `0` or `false` is not sent. To transmit such a value, send the request with a parameter map (see Request Parameters). **Methods** construct ```javascript const mappSessionData = new MappIntelligenceSession(); ``` setLoginStatus ```javascript /** * @param lStatus Pass the current users login status here * * @return MappIntelligenceSession */ mappSessionData.setLoginStatus(lStatus: string); ``` setTemporarySessionId ```javascript /** * @param tSessionId Pass the temporary session ID here * * @return MappIntelligenceSession */ mappSessionData.setTemporarySessionId(tSessionId: string); ``` setParameter ```javascript /** * Session parameters always refer to a complete session (visit). If the value for the parameter is transmitted * during a visit several times, only the first or last value is evaluated, based on the configuration of the * Webtrekk GUI * * @param i ID of the parameter * @param v Value of the parameter * * @return MappIntelligenceSession */ mappSessionData.setParameter(i: number, v: string); ``` **Example** ```javascript const mic = new MappIntelligenceConfig( "111111111111111", "analytics01.wt-eu02.net" ); const mit = new MappIntelligenceTracking(mic); const mappSessionData = new MappIntelligenceSession(); mappSessionData.setLoginStatus("logged in") .setTemporarySessionId("abc123") .setParameter(2, "param2") .setParameter(15, "param15"); await mit.track((new MappIntelligenceDataMap()).session(mappSessionData)); await mit.close(); ```