how to enable session recording?
Hi Pauline Z., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đź‘‹
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
To enable session recording in Mixpanel, you need to make a simple change to your existing Mixpanel JavaScript SDK implementation. Here's how you can do it: 1. Ensure you're using at least version 2.50.0 of the Mixpanel JavaScript SDK.2. During SDK initialization, add the record_sessions_percent
option to control the sampling rate for session recordings. Here's an example: LBKSmixpanel.init( "<YOUR_PROJECT_TOKEN> ", { record_sessions_percent: 1 //records 1% of all sessions } )LBKS
This single line of code enables Session Replay and sets the sampling rate to 1% of all sessions. You can adjust this percentage based on your needs.It's recommended to start with a low sampling rate, such as 1%, and then adjust it according to your specific analytics requirements.Before enabling Session Replay for a large audience, it's advisable to test it in a demo project first. Then, start with smaller sets of users or accounts in production to monitor performance and ensure your privacy rules align with company policies.For more detailed information on implementation and configuration options, you can refer to the Mixpanel JavaScript SDK documentation.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.