Revulytics > Revulytics - Support Help Desk > Knowledgebase

Search help:

What is multi-session mode and how should it be used?


When and how should multi-session mode be used?

Desktop versions of the Revulytics Usage Intelligence SDK require a Boolean parameter named “multiSessionEnabled” when calling tbCreateConfig() or its equivalent. This is used to specify whether multiple user sessions can exist within a single application runtime.

What is the difference between single-session and multi-session mode?

In single-session mode (multiSessionEnabled set to false), when starting the application and calling tbStart(), the Usage Intelligence SDK automatically starts a user session, and when calling tbStop(), the SDK automatically stops the user session it had started earlier. This means that in single-session mode, a user session is tied to a runtime session, where a user session is considered to start when the application starts and stops when the application stops.

In multi-session mode (multiSessionEnabled set to true), session-management is left up to the developer. This mode is meant to be used when a single application runtime may host multiple user sessions. Examples of this use-case would be applications which require users to log-in, and the application may be left running between different user logins. In such cases, it does not make sense to start a session when the application is executed and stop the session when the application exits, but it would be more appropriate to log a session start when a user logs in and a session stop when the user logs off.

When NOT to use multi-session mode

If your application is used by a single user and a user session should be tied with when the application starts and stops, then single-session mode should be used and therefore the Usage Intelligence SDK will manage starting and stopping sessions. This also applies if you allow multiple parallel executions of your software, where the user can run the software two or more times at the same time. In such cases the multiple sessions in no way affect each other and single-session mode should still be used. Multi-session mode should ONLY be used in cases where you need to manage when a user session starts and stops as described above.

What to consider when using multi-session mode

In multi-session mode, the management of user sessions is left up to the developer. Therefore, the developer must ensure that the functions tbSessionStart() and tbSessionStop() are called at the appropriate times, for example when a user login and logoff occurs. Also, when calling event tracking functions, you will need to pass the correct session ID under which this event occurred. This must be an ID of a session that has been started and not yet stopped.

What is acceptable as session ID?

The session ID must be a unique value for each session that is started. This may be a random value, or any other unique value generated by your application. Under no circumstance should you start 2 or more sessions with the same session ID.

Was this article helpful? yes / no
Related articles What is multi-session mode and when should it be used?
What are Product Usage Filters?
Comparing Revulytics Usage Intelligence with Google Analytics or web-analytics solutions
What files are created by the Revulytics Usage Intelligence SDK and what is the folder location?
Revulytics Usage Intelligence SDK versions and updates - Changelog
Article details
Article ID: 63
Category: Knowledgebase
Date added: 2016-05-05 15:31:44
Views: 171
Rating (Votes): Article rated 4.3/5.0 (6)

« Go back