Can you explain a step-by-step guide to start tracking session replay?
Hi Yanisa S., 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
Certainly! I can provide you with a step-by-step guide to start tracking session replay in Mixpanel. Here's how you can get started: 1. Ensure you have the latest version of Mixpanel SDK: For web applications, you need at least version 2.50.0 of the JavaScript SDK. For iOS applications, you need at least version 4.3.1 of the Swift SDK.2. Initialize Mixpanel with Session Replay enabled: For web applications:
"<YOUR_PROJECT_TOKEN> ",
{
record_sessions_percent: 1 //records 1% of all sessions
}
)
```LBKS [Mixpanel SDKs: Javascript](https://docs.mixpanel.com/docs/tracking-methods/sdks/javascript#session-replay)LBKS For iOS applications:
```LBKS let config = MPSessionReplayConfig(wifiOnly: false, recordSessionsPercent: 100.0)
let sessionReplayInstance = MPSessionReplay.initialize(token: Mixpanel.mainInstance().apiToken, distinctId: Mixpanel.mainInstance().distinctId, config: config)
```LBKS [Quick Start Guide](https://docs.mixpanel.com/docs/session-replay/session-replay-ios)LBKS3. Start recording:
For web applications, recording starts automatically based on the `record_sessions_percent` setting.LBKS For iOS applications, you need to explicitly start recording:
```LBKS MPSessionReplay.getInstance()?.startRecording()
```LBKS [Quick Start Guide](https://docs.mixpanel.com/docs/session-replay/session-replay-ios#enable-session-replay)LBKS4. (Optional) Configure additional options:
You can customize various aspects of Session Replay, such as masking sensitive information or setting idle timeouts. Refer to the documentation for specific options.LBKS5. Test your implementation:
Start with a low sampling rate (like 1%) and test in a demo project before rolling out to production.LBKS6. Monitor and adjust:
Keep an eye on performance and adjust the sampling rate or other settings as needed.LBKSRemember, before enabling Session Replay 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.LBKS[Session Replay](https://docs.mixpanel.com/docs/session-replay) provides more detailed information on implementation and best practices.
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! đ
You're correct in your understanding. Mixpanel's Session Replay feature does not record all sessions by default, but instead uses sampling to capture a subset of sessions. This sampling approach is designed to balance data collection with performance and resource considerations.The sampling rate is controlled by the record_sessions_percent parameter during SDK initialization. For example: LBKSmixpanel.init( "<YOUR_PROJECT_TOKEN> ", { record_sessions_percent: 1 //records 1% of all sessions } )LBKSMixpanel SDKs: JavascriptThis setting means that only 1% of all sessions will be recorded. You can adjust this percentage based on your needs and resources. Setting it to 100 would record all sessions, but this is generally not recommended for production environments due to potential performance impacts and data volume considerations.Mixpanel recommends starting with a low sampling rate, such as 1%, and then adjusting it according to your specific analytics needs and the performance of your application. This approach allows you to gather meaningful insights while managing the impact on your application and infrastructure.Session Replay Q&A with Mixpanel Senior Product Manager DJ Satoda provides additional insights on sampling recommendations for different use cases. For instance, for debugging or monitoring new features, they don't recommend sampling at all to ensure you capture all relevant sessions.Remember, you can always adjust the sampling rate to find the right balance between data collection and performance for your specific use case.
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! đ
Your understanding is not entirely correct. Let me clarify how Mixpanel's Session Replay works with regards to storage and access limits: Mixpanel does not store all recorded sessions beyond your plan's limit. According to the documentation: "Customers will be blocked from viewing additional replays above their monthly limit (or custom add-on limit for an Enterprise plan) until they upgrade or purchase additional volumes. After breaching a higher limit, we may stop capturing replays of your user sessions."Session ReplayThis means that if you're on a Growth or Enterprise plan with 20k free replays per month, Mixpanel will only capture and store up to 20k replays. Once you reach this limit, Mixpanel will stop capturing new replays for that month.In your hypothetical scenario of 100k sessions, Mixpanel would not store all 100k sessions. It would only capture and store the first 20k replays, and then stop capturing additional replays for that month.It's also worth noting that for customers who have purchased additional Session Replay capacity as an add-on (available for Enterprise plans), there's a different behavior: "For customers who have purchased our Session Replay add-on, you will be billed for replays ingested beyond your purchased amount at the per unit rate."Session ReplayIn this case, Mixpanel would continue capturing replays beyond the initial limit, but at an additional cost.To manage your replay capture effectively, it's recommended to monitor your usage and adjust your sampling rate if necessary. If you find that you consistently need more than 20k replays per month, you might want to consider upgrading your plan or purchasing additional capacity if you're on an Enterprise plan.
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! đ
Yes, you can specify only certain screens or parts of your application to be recorded in Mixpanel's Session Replay. This level of control allows you to focus on specific areas of interest while avoiding recording sensitive information. Here's how you can achieve this: For web applications: 1. You can use the start_session_recording() and stop_session_recording() methods to control when recording happens. For example: LBKS// Start recording when entering a specific screen mixpanel.start_session_recording()LBKS// Stop recording when leaving the screen mixpanel.stop_session_recording()LBKSMixpanel SDKs: Javascript2. You can also use these methods in combination with your application logic to record only certain types of users or features: LBKS// Example: Record only for users using a specific feature if (userIsUsingSpecificFeature) { mixpanel.start_session_recording() }LBKSFor iOS applications: You can use similar methods to start and stop recording at specific points in your app: LBKS// Start recording MPSessionReplay.getInstance()?.startRecording()LBKS// Stop recording MPSessionReplay.getInstance()?.stopRecording()LBKSQuick Start GuideThe documentation provides some example scenarios: 1. For sensitive screens: "When user is about to access the sensitive screen, call mixpanel.stop_session_recording(). To resume recording once they leave this screen, you can resume recording with mixpanel.start_session_recording()"2. For specific features: "When user is about to access the feature you wish to capture replays for, call mixpanel.start_session_recording() to force recording on"Mixpanel SDKs: JavascriptBy using these methods, you can effectively control which parts of your application are recorded, allowing you to focus on the most relevant areas for your analysis while respecting user privacy and optimizing resource usage.
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! đ
Yes, Mixpanel can record sessions on both websites and mobile applications, but there are some differences in availability and implementation: For websites: Session Replay is fully available for web-based applications, including mobile web. You can implement it using the JavaScript SDK.Session Replay states: "We currently support two platforms: Web iOS (Alpha)"For mobile applications: 1. iOS: Session Replay is currently in Alpha testing for native iOS apps. Session Replay mentions: "iOS (Alpha)"2. Android: Session Replay is not yet available, but it's in the pipeline. According to the FAQ: "Android Alpha testing is expected in early 2025."It's important to note that the implementation and capabilities may differ between web and mobile platforms. For web applications, Session Replay is more established and fully featured. For mobile applications, especially iOS, it's still in early stages (Alpha) and may have limitations or be subject to changes.If you're interested in using Session Replay for mobile applications, especially for iOS, you should contact your Mixpanel Account Manager for the most up-to-date information and access to the Alpha version.Session Replay Q&A with Mixpanel Senior Product Manager DJ Satoda provides more insights into the implementation and use cases for different platforms.
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.
