-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Djmixpanel patch 1 #1631
Open
djmixpanel
wants to merge
20
commits into
main
Choose a base branch
from
djmixpanel-patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+220
−205
Open
Djmixpanel patch 1 #1631
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
7d9b74b
Update session-replay-web.md
djmixpanel 9038901
Update session-replay-ios.md
djmixpanel 30f34b1
Update session-replay-web.md
djmixpanel 387c41c
Update session-replay-web.md
djmixpanel e4cf14c
Update data-clean-up.mdx
djmixpanel fde41f0
Update session-replay-ios.md
djmixpanel ccc2f32
Update session-replay-ios.md
djmixpanel 12f9440
Update session-replay-web.md
djmixpanel 3cc37a3
Update session-replay-web.md
djmixpanel 0cc6ed7
Merge branch 'main' into djmixpanel-patch-1
Tofufu 0dbe445
Update session-replay-web.md
djmixpanel f4192f8
Update session-replay-ios.md
djmixpanel dc57b74
Create replay-privacy-controls
djmixpanel 17247e4
Rename replay-privacy-controls to session-replay-privacy-controls
djmixpanel c4c0305
Update session-replay.mdx
djmixpanel 0c178e3
Merge branch 'main' into djmixpanel-patch-1
djmixpanel 39a97be
Update session-replay-web.md
djmixpanel be4afb0
Update session-replay.mdx
djmixpanel 4d4a956
Update pages/docs/session-replay.mdx
djmixpanel 9c7dc06
Update session-replay-web.md
djmixpanel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Session Replay Privacy Controls | ||
**Last updated July 30th, 2024** | ||
|
||
# Introduction to Session Replay | ||
|
||
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 and blocking work? What are the high-level technical details? | ||
|
||
Masking and blocking are slightly different. | ||
|
||
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 elements have their text replaced with asterisks of the same length [****]. | ||
|
||
Blocked data is similarly 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. However, blocked elements will be rendered with a placeholder element (e.g., an empty box of similar size). | ||
|
||
Note: interactions (such as mouse-clicks) with blocked and masked elements are still captured by Session Replay. | ||
|
||
# Configuring Privacy Controls | ||
|
||
By default, Mixpanel masks and/or blocks the most common elements that contain content like input text, non-input text, images, and videos. However, Mixpanel also offers its customers a range of privacy controls to choose to unmask / unblock elements as needed, which are detailed further on this page. | ||
|
||
| Element Type | Default State | Customizable | | ||
| --- | --- | --- | | ||
| Inputs | Mixpanel attempts to mask all user input text. When a user enters text into an input field, Session Replay captures [****] in place of text. | No. You cannot disable this privacy feature. | | ||
| Text | By default, Mixpanel attempts to mask all non-input text on your webpage. This masked content on your webpage is replaced with [****]. | Yes. Mixpanel empowers its customers to decide to record all non-input text as-is. First, change record_mask_text_selector’s default value from “*” to “” to make all text elements no longer masked. Then, you can individually mask each text element detailed in the next section. | | ||
| Videos and Images | By default, Mixpanel blocks videos and images. These elements will be rendered with a placeholder element (i.e., an empty box of similar size). Note: interactions with blocked elements will still be captured (e.g., mouse-clicks). | Yes. Mixpanel empowers its customers to decide to record images and videos as-is. | ||
|
||
Other elements not listed in this table are captured by default, and can be blocked at your discretion. You can specify a CSS selector under the config option `record_block_selector` to block all elements which match the selector. | ||
|
||
# How to mask and block elements | ||
- To mask text, add the class name “.mp-mask.” Masked content is replaced with [****] | ||
- To block elements containing text entirely, add the class name “.mp-block.” Blocked content will be rendered with a placeholder element | ||
- Specify a CSS selector `record_mask_text_selector` to mask all text in elements that match the selector | ||
|
||
Example code below for masking text: | ||
``` | ||
mixpanel.init(YOUR_PROJECT_TOKEN, {record_mask_text_selector: ''}) | ||
``` | ||
``` | ||
<div class="text mp-mask">This text is masked!</div> | ||
``` | ||
Example code below for blocking elements: | ||
``` | ||
mixpanel.init(YOUR_PROJECT_TOKEN, {record_block_selector: '.sensitive-data'}) | ||
``` | ||
``` | ||
<img src="https://image.com" class="mp-block"/> | ||
``` | ||
|
||
# Disabling Replay Collection | ||
|
||
Once enabled, Session Replay runs on your site until either: | ||
- The user leaves your site | ||
- The user is inactive for more than 30 minutes | ||
- 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. | ||
|
||
# Additional Considerations | ||
WebComponents that utilize HTML attributes may be ingested and stored by Session Replay, regardless of whether they are displayed in an individual recording as text. Customers should utilize the block functionality outlined above to the extent specific areas of a webpage should not be ingested. | ||
|
||
# User Opt-Out | ||
|
||
Mixpanel’s Session Replay follows Mixpanel’s [standard SDK opt-out setting](/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](/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. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this repeated on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeated across iOS and Web? Yes, just figured for anyone who lands directly on this page, the overview /context is helpful