Skip to content

Commit

Permalink
Update session-replay.md (#1057)
Browse files Browse the repository at this point in the history
* Update session-replay.md

* Add files via upload
  • Loading branch information
djmixpanel authored May 9, 2024
1 parent 9e7f51d commit 895e0e2
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 2 deletions.
99 changes: 97 additions & 2 deletions pages/docs/features/session-replay.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Session Replay

## **Overview**
## Overview

Mixpanel Session Replay is the fastest way to understand the whole picture about your customers and make better product decisions, by combining quantitative and qualitative user insights.

Expand Down Expand Up @@ -78,4 +78,99 @@ Not currently, but we plan to add support soon.

### How soon are Replays available for viewing after a session begins?

There is about a ~1 minute delay between when recordings are captured and when they appear in Mixpanel.
There is about a ~1 minute delay between when recordings are captured and when they appear in Mixpanel.

---
<br>

## Appendix: Session Replay Privacy Controls
**Last updated May 9th, 2024**

### Introduction

Mixpanel offers a privacy-first approach to Session Replay, including features such as data masking. Mixpanel’s Session Replay privacy controls were designed to assist customers in protecting end user privacy.

Data privacy regulations are rapidly evolving and vary considerably across states and countries. A consistent requirement across many data privacy regulations for website operators is disclosing to end users that their personal information is being collected, often in a privacy notice. Before implementing Session Replay on your website, a best practice is to review your privacy notice with legal counsel to ensure it remains accurate and compliant with data privacy laws.

### How does Session Replay work?

Session Replay captures the Document Object Model (DOM) structure and changes to it. Mixpanel then reconstructs the web page, applying recorded events at the time an end user completed them. Within Mixpanel’s platform, you can view a reconstruction of your end user’s screen as they navigate your website. However, Session Replay is not a video recording of your end user’s screen and end user actions are not literally video-recorded.

### How does masking work? What are the high-level technical details?

Masked data is suppressed client-side, meaning it is not collected in its original form by Mixpanel’s SDK, and the data is not stored on Mixpanel servers. Masked data appears in Mixpanel as [****].

### Configuring Privacy Controls

Mixpanel offers its customers a range of privacy controls to limit the data captured by Session Replay, which are summarized in the table below and detailed further on this page.

| Element | Description | Mask Text Mode (Mixpanel’s Default) | Mask User Input Mode |
| --- | --- | --- | --- |
| Input | Textareas, select | Masked (cannot be unmasked) | Masked (cannot be unmasked) |
| text | Non-input text | Masked (cannot be unmasked) | Unmasked, with the ability to mask specific text elements |
| Non-text elements | Video and image elements | Ingested by default (not masked) with the ability to block specific non-text elements | Ingested by default (not masked) with the ability to block specific non-text elements |

### Mask Text Mode (Mixpanel’s Session Replay default privacy setting)

By default, Mixpanel attempts to mask all HTML text and user input text when you enable Session Replay. This masked content on your webpage is replaced with [****].

Here is an example of what “Mask Text Mode” could look like:

![replayMaskTextMode](/replayMaskTextMode.png)

### Mask User Input Mode

Mixpanel empowers its customers to decide to record all non-input text as-is, while continuing to mask input text. Inputs are replaced with [****].

`mixpanel.init(YOUR_PROJECT_TOKEN, {record_mask_text_selector: ''})`

Here is an example of what “Mask User Input Mode” could look like:

![replayMaskInputMode](/replayMaskInputMode.png)

With the goal of offering a privacy-first product, Mixpanel’s Session Replay cannot be configured to capture input form fields such as textareas.

### Mask specific elements

You can tag the privacy level of an individual HTML element using one the following methods:

1. For masking text contents, add the class name “.rr-mask”
2. To mask the entire contents of an element, add the class name “.rr-block”

The example below demonstrates how you can override certain elements in your HTML to customize your masking:

`<div class="text.rr-mask">This text is masked!</div>`

`<img src="https://image.com" class="rr-block"/>`


### Other Elements (e.g., images, video)

If you would like to block Mixpanel’s Session Replay from capturing video, images, or other non-text elements, you should add the CSS class name “.rr-block” to elements that should not be captured. This will cause the element's contents to no longer be captured. In subsequent playback, this element will be rendered with a placeholder element (e.g., an empty box of similar size).

### Disabling replay collection

Once enabled, Session Replay runs on your site until either:

- The user leaves your site
- You call `mixpanel.stop_session_recording()`

Call mixpanel.stop_session_recording() before a user navigates to a restricted area of your site to disable replay collection while the user is in that area.

To restart replay collection, call `mixpanel.start_session_recording()` to re-add the plugin.

### User Opt-Out

Mixpanel’s Session Replay follows Mixpanel’s [standard SDK opt-out setting](https://docs.mixpanel.com/docs/privacy/end-user-data-management#opt-out-users).

### Data Deletion

Deletion requests for Session Replay use Mixpanel’s standard end user management process for events documented [here](https://docs.mixpanel.com/docs/privacy/end-user-data-management).

### Data Retention

Mixpanel retains Session Replays for 30 days from the date the Session Replay is ingested and becomes available for viewing within Mixpanel.

### EU Data Residency

Session Replay is not currently available to Mixpanel customers who use the EU data center. This functionality is coming soon.
Binary file added public/replayMaskInputMode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/replayMaskTextMode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 895e0e2

Please sign in to comment.