regarding session replays. I only want to record specific pages. Is this possible and how do I do it?
Hi Bradley A., 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
Yes, it is possible to record session replays only on specific pages using Mixpanel. You can achieve this by using the manual capture methods provided by the SDKs. Instead of relying solely on sampling, you can programmatically start and stop session recording based on your application's logic—such as when a user navigates to or away from a specific page.For the JavaScript SDK (Web): - Use mixpanel.start_session_recording()
to begin recording when the user enters a page you want to capture.
- Use mixpanel.stop_session_recording()
to stop recording when the user leaves that page.**Example:**LBKS// Start recording when entering a specific page mixpanel.start_session_recording();LBKS// Stop recording when leaving the page mixpanel.stop_session_recording();LBKS
This approach allows you to control exactly which pages are recorded. For example, you might call start_session_recording()
in your page's load event and stop_session_recording()
in the unload event or when navigating away. This is also useful for excluding sensitive pages from being recorded by stopping the recording before the user accesses them. You can apply similar logic for iOS and Android using their respective SDK methods (.startRecording()
and .stopRecording()
) as well.For more details and example scenarios, see the documentation on manual capture for Web, iOS, and Android.
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.
kapa.ai I want to record our onboarding journey only, how would I do this?
Let me check the knowledge base for you again. One moment! 📚
To record only your onboarding journey with Mixpanel Session Replay, you should use the manual capture methods to start and stop recording specifically when users are in the onboarding flow.For the web (JavaScript SDK), you would: 1. Start recording when the user enters the onboarding journey:
```LBKS2. **Stop recording** when the user completes or exits the onboarding journey:
```LBKS mixpanel.stop_session_recording();
```LBKSLBKSThis ensures that only the onboarding steps are captured. You can place these calls in your application's routing or page logic—start recording at the beginning of onboarding, and stop when onboarding ends or the user navigates away.LBKSThis approach is explicitly recommended for scenarios where you want to capture replays for only certain features or flows, such as onboarding. The same logic applies to iOS and Android using their respective `.startRecording()` and `.stopRecording()` methods [Implement Session Replay (Web)](https://docs.mixpanel.com/docs/session-replay/implement-session-replay/session-replay-web#manual-capture) [Implement Session Replay (iOS)](https://docs.mixpanel.com/docs/session-replay/implement-session-replay/session-replay-ios#capturing-replays) [Implement Session Replay (Android)](https://docs.mixpanel.com/docs/session-replay/implement-session-replay/session-replay-android#capturing-replays).LBKS**Example scenario from the docs:**LBKS> When user is about to access the feature you wish to capture replays for, call `mixpanel.start_session_recording()` to begin recording. When they leave, call `mixpanel.stop_session_recording()` [Implement Session Replay (Web)](https://docs.mixpanel.com/docs/session-replay/implement-session-replay/session-replay-web#manual-capture).
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.