survaii-session-stream
v0.0.9
Published
Survaii SessionStream is an advanced session recording and replay tool designed to help businesses and developers gain deep insights into user behavior. By capturing and replaying user interactions, ReplayView provides a comprehensive view of how users en
Downloads
1
Readme
Survaii Session Stream
Survaii Session Stream allows you to record user sessions effortlessly, capturing valuable insights into user interactions with your application.
Getting Started
Follow these simple steps to integrate and use Survaii Session Stream in your project.
Prerequisites
- AppKey: Ensure you have an AppKey from Survaii.
Installation
Install the Survaii Session Stream library via npm:
npm install survaii-session-stream
Usage
Import the Library:
import { SurvaiiSessionStream } from 'survaii-session-stream';
Initialize the Recorder:
Call the
init
function to initialize the recorder. Theinit
function takes four parameters, with theID
,Interval
andMaskAllInputs
parameters being optional:- AppKey: Your Survaii AppKey.
- ID: (Optional) A unique identifier for the session (e.g., an email or a database ID). This is useful for recording sessions of authenticated users.
- Interval: (Optional) The interval in milliseconds to capture small chunks of the session (default is
30000
ms). This ensures you don't miss anything even if the user exits your app abruptly. - MaskAllInputs: (Optional) When set to true, all input fields will have their values masked to prevent sensitive information from being recorded. This is useful for maintaining privacy and security.
SurvaiiSessionStream.init( 'your-app-key', // Replace with your AppKey 'unique-user-id', // Optional: Replace with your unique identifier 30000, // Optional: Adjust the interval as needed true, // Optional: Mask all inputs );
Start Recording:
To start recording the session, call the
startRecording
function:SurvaiiSessionStream.startRecording();
Stop Recording:
If you need to stop recording the session, call the
stopRecording
function:SurvaiiSessionStream.stopRecording();
Example
Here is a complete example of how to use Survaii Session Stream:
import { SurvaiiSessionStream } from 'survaii-session-stream';
// Initialize the recorder
SurvaiiSessionStream.init({
id: '[email protected]', // Optional: Replace with a unique identifier
interval: 30000, // Optional: Adjust the interval as needed
appKey: 'your-app-key', // Replace with your AppKey
});
// Start recording the session
SurvaiiSessionStream.startRecording();
// Optionally, stop recording the session when needed
// SurvaiiSessionStream.stopRecording();
Conclusion
That's it! You are now ready to start recording user sessions with Survaii Session Stream. This will help you gain valuable insights into how users interact with your application, allowing you to make informed decisions to improve the user experience.
If you have any issues or need further assistance, please contact us at [email protected].