how to start session erplays
Hi Nainik M., 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 start session replays in Mixpanel, you need to initialize the Session Replay feature in your application. Here's how you can do it: For web applications: 1. Ensure you're using at least version 2.50.0 of the Mixpanel JavaScript SDK.2. During SDK initialization, set the record_sessions_percent
option to enable Session Replay and control the sampling rate: LBKSmixpanel.init( "<YOUR_PROJECT_TOKEN> ", { record_sessions_percent: 1 //records 1% of all sessions } )LBKS
This single line of code is typically all you need to enable Session Replay for web applications.Mixpanel SDKs: JavascriptFor iOS applications (currently in Alpha): 1. Call the following method once at the beginning of your app's lifecycle: LBKSSessionReplay.getInstance()?.startRecording()LBKS
Session Replay iOSIt's important to note that Session Replay is not enabled by default and requires additional instrumentation beyond standard Mixpanel setup. Before enabling it for a large audience, it's recommended to test in a demo project and start with smaller sets of users to monitor performance and ensure privacy rules align with company policies.Session Replay (Web): Watch playbacks of user digital experiences
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.
Let me check the knowledge base for you again. One moment! đź“š
I understand you're having trouble seeing session replays after calling the method. Let's troubleshoot this issue based on the information provided in the knowledge sources.Here are a few things you can check: 1. Search for Session Recording Checkpoint events:
Look for events tracked as $mp_session_record
in your Mixpanel project. These events are automatically emitted by the SDK when you capture Mixpanel session replays. If you've implemented correctly, you should see these events appear.Mixpanel SDKs: Javascript2. Check your sampling rate:
If you're not seeing any replays, your sampling rate might be set too low. Make sure you've set an appropriate recordSessionsPercent
value. For testing purposes, you might want to set it to 100 to ensure every user session is sent to Mixpanel.LBKSlet config = SessionReplayConfig(wifiOnly: false, recordSessionsPercent: 100.0) let sessionReplayInstance = SessionReplay.initialize(token: token, distinctId: distinctId, config: config)LBKS
Session Replay (iOS): Watch playbacks of user digital experiences3. Check for replays on your project's home page:
Look at the Latest Replays card on the home page of your Mixpanel project to see if there are any replays listed.Mixpanel SDKs: Javascript4. Be aware of the delay:
There is about a 1-minute delay between when recordings are captured and when they appear in Mixpanel. Make sure you're allowing enough time for the replays to show up.Session Replay5. Verify your implementation:
Double-check that you've implemented Session Replay correctly for your platform (web or iOS). Make sure you're using the latest version of the Mixpanel SDK and that you've followed all the necessary steps for initialization and configuration.If you're still not seeing any replays after checking these points, it might be helpful to enable logging for debugging purposes: LBKSsessionReplayInstance.loggingEnabled = trueLBKS
Session Replay (iOS): Watch playbacks of user digital experiencesIf you're still struggling to implement or see replays after trying these steps, it's recommended to submit a request to Mixpanel's Support team for more assistance.Mixpanel SDKs: Javascript
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.