Mixpanel Community Icon
  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    It's great that you've taken steps to enable session replay in Mixpanel. To ensure you've set it up correctly and to test if replays are being captured, there are a few things you can do:1. First, make sure you've initialized Mixpanel with the session replay option as shown in the Sampling Method documentation:LBKSmixpanel.init( "<YOUR_PROJECT_TOKEN> ", { record_sessions_percent: 1 //records 1% of all sessions } )LBKS2. After implementation, you can look for Session Recording Checkpoint events in your project. These are tracked as $mp_session_record and are automatically emitted by the SDK when you capture Mixpanel session replays. If you see these events, it's a good indication that you've implemented correctly.3. You can also test by calling mixpanel.start_session_recording() in your website/application. This should cause the Session Recording Checkpoint event mentioned above to appear.4. Check the home page for your project to see if there are any replays listed in the Latest Replays card.These tips are mentioned in the Tips & Tricks While Implementing section of the Mixpanel documentation.If you're still not seeing replays after trying these steps, it's possible that your sampling rate may not be working or may be set too low. You might want to increase the record_sessions_percent value temporarily for testing purposes.If you continue to have issues, the Mixpanel documentation suggests submitting a request to their Support team for more assistance.Remember, there's about a 1-minute delay between when recordings are captured and when they appear in Mixpanel, as mentioned in the FAQ section of the Session Replay 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.

  • Avatar of Lauren W.
    Lauren W.
    ·
    ·

    kapa.ai Increasing the recording sessions percent worked! However, the recorded screen is black after the web page loads. What could cause that?

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Let me check the knowledge base for you again. One moment! đź“š

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    I'm glad to hear that increasing the recording sessions percent worked for you! However, the issue of a black screen after the web page loads could be due to a few reasons. Let's explore some possible causes and solutions:1. Ad Blockers or Browser Settings: Mixpanel runs session replays in an isolated domain through an iframe for security reasons. This domain might be blocked by ad blockers or certain browser settings. As mentioned in the Session Replay FAQ, try disabling any ad blockers you might have active. For uBlock specifically, you can add a custom filter:

    ```LBKSLBKS2. Content Blocking: Check your implementation to ensure you're not accidentally blocking all content. The [Session Replay documentation](https://docs.mixpanel.com/docs/tracking-methods/sdks/javascript#session-replay) mentions two options that could cause this if set incorrectly:LBKS - `record_block_class`: This option replaces elements with an empty element of the same dimensions. - `record_block_selector`: This option also replaces elements with an empty element.LBKS Make sure these are not set to block more content than intended.LBKS3. Initialization Timing: Ensure that Mixpanel is initialized before your page content loads. If Mixpanel initializes after the page content, it might miss capturing the initial state of the page.LBKS4. Single-Page Application (SPA) Issues: If you're using a single-page application, make sure you're handling page navigation correctly. As mentioned in the [FAQ](https://docs.mixpanel.com/docs/session-replay/session-replay-web#how-do-session-replays-work-when-navigating-between-pages-that-are-full-page-loads), full page loads create new Session Replay recordings. You might need to reinitialize Mixpanel or use their SPA-specific methods.LBKS5. Performance Issues: While unlikely, if your site is very complex or resource-intensive, it might affect the replay capture. The [Session Replay FAQ](https://docs.mixpanel.com/docs/session-replay/session-replay-web#how-does-session-replay-affect-my-websites-performance) mentions that more complex pages generate more data for Mixpanel to handle.LBKSIf none of these solve your issue, I recommend reaching out to Mixpanel's support team for more specific assistance. They can provide more tailored troubleshooting based on your exact implementation and setup.

    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.

  • Avatar of Lauren W.
    Lauren W.
    ·
    ·

    kapa.ai the webpage I am testing with mixpanel tracking is actually a python built game that is published and packaged as an html and javasctipt/jsom website- could this also cause issues with how the replay records the sessions?

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Let me check the knowledge base for you again. One moment! đź“š

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Yes, the fact that your webpage is a Python-built game packaged as HTML and JavaScript could potentially cause issues with how Mixpanel's Session Replay records the sessions. Here's why:1. DOM-based recording: Mixpanel's Session Replay primarily works by recording changes to the Document Object Model (DOM) of a webpage. As explained in the How does session replay work? blog post, session replay "works by reconstructing the changes made to the code that represents the app you're using." If your game uses non-standard ways of rendering content (e.g., using a canvas element), it might not interact with the DOM in the way Mixpanel expects.2. Complex interactions: Games often involve complex, rapid interactions that might be challenging for the session replay technology to capture accurately. The Session Replay FAQ mentions that "more complex and interactive pages generate more data for rrweb and Mixpanel to handle."3. Performance considerations: Games can be resource-intensive, and adding session replay on top of that might affect performance. The Session Replay documentation notes that while they've "tested the SDK extensively and it generally has minimal impact on how your website performs," it's always good to do performance testing after implementation.4. Non-standard elements: If your game uses WebGL or other non-standard web technologies, these might not be captured correctly by the session replay feature.5. Frequent updates: Games often update the screen frequently, which could generate a large amount of data for the session replay to capture and process.To address these potential issues:1. Test thoroughly: Implement session replay and test it extensively with your specific game to see how well it captures the user experience.2. Consider sampling: You might want to use a lower sampling rate to reduce the impact on performance.3. Custom events: Consider supplementing session replay with custom events that capture important game interactions, as these might be more reliable for your specific use case.4. Reach out to Mixpanel support: Given the unique nature of your application, it might be worth contacting Mixpanel's support team for specific guidance on implementing session replay for a web-based game.Remember, while session replay can be a powerful tool, it might not be the best fit for all types of web applications, especially those with non-standard interactions like games. You may need to experiment and possibly combine it with other analytics approaches to get the insights you need.

    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.