--- title: "Session" slug: "session-data-object-java-library-s2s" description: "Enrich sessions with the Java library: login status, temporary session ID and session parameters via MappIntelligenceSession." status: "update" updated: 2026-11-02T16:52:00Z published: 2026-11-02T16:52:00Z canonical: "docs.mapp.com/session-data-object-java-library-s2s" --- > ## 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). ## Details for the Java Library - **Reserved session parameters:** The library sets the session parameters `cs801` (library version) and `cs802` (tracking platform `Java`) on every request. Values that you set with `setParameter(801, …)` or `setParameter(802, …)` are overwritten. `setLoginStatus` uses `cs800`: if you also set `setParameter(800, …)`, it is undefined which value is sent. - **Temporary session ID:** `setTemporarySessionId` sends the ID as `fpv` together with the type parameter `fpt=2.0.0`. An empty ID or `null` sends neither parameter and removes an ID set before. - **Null values:** A string setter or a `setParameter` value called with `null` counts as not set. The value is not transmitted and no exception is thrown. --- **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 ```java MappIntelligenceSession mappSessionData = new MappIntelligenceSession(); ``` #### setLoginStatus ```java /** * @param lStatus Pass the current users login status here * * @return MappIntelligenceSession */ mappSessionData.setLoginStatus(String lStatus); ``` #### setTemporarySessionId ```java /** * @param tSessionId Pass the temporary session ID here * * @return MappIntelligenceSession */ mappSessionData.setTemporarySessionId(String tSessionId); ``` #### setParameter ```java /** * 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(int i, String v); ``` **Example** ```java MappIntelligenceConfig mic = new MappIntelligenceConfig( "111111111111111", "analytics01.wt-eu02.net" ); MappIntelligenceSession mappSessionData = new MappIntelligenceSession(); mappSessionData.setLoginStatus("logged in") .setTemporarySessionId("abc123") .setParameter(2, "param2") .setParameter(15, "param15"); try (MappIntelligenceTracking mit = new MappIntelligenceTracking(mic)) {    mit.track((new MappIntelligenceDataMap()).session(mappSessionData)); } ```