diff --git a/pages/docs/data-governance/data-clean-up.mdx b/pages/docs/data-governance/data-clean-up.mdx index c993c949c2..eaf5863c16 100644 --- a/pages/docs/data-governance/data-clean-up.mdx +++ b/pages/docs/data-governance/data-clean-up.mdx @@ -84,7 +84,7 @@ Data Deletion is a severe action with permanent consequences. Thus, we recommend You can use the Data Deletion tool in these scenarios: - Your Mixpanel role is Owner or Admin -- Your data does not extend beyond the past 180 days +- Your data does not extend beyond the past 180 days (event time, not ingestion time) - Your event volumes are below 5 billion events per month, any month over the trailing 3 months - Your project has not had more than 10 deletes over the past calendar month @@ -100,7 +100,7 @@ Once you've identified the problematic data, and confirmed you want to delete: 1. Navigate to the Data Deletion section in Project Settings 2. Click ‘Request an Event Deletion’ 3. Select which event you want to delete -4. Select time range (cannot be more than 180 days in the past) +4. Select time range (event time cannot be more than 180 days in the past) 5. Add any Event property filters if needed 6. Validate in the preview that the right data is being deleted 7. Submit deletion request diff --git a/pages/docs/session-replay.mdx b/pages/docs/session-replay.mdx index de0442ce21..99f0228171 100644 --- a/pages/docs/session-replay.mdx +++ b/pages/docs/session-replay.mdx @@ -2,9 +2,113 @@ import { Cards } from 'nextra/components' # Session Replay -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. We have two ways to implement: +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. + +When digging into customer journeys in Mixpanel’s analytics, you can understand “**where** do customers drop-off?” And now, Mixpanel Session Replay enables you to quickly follow-up with, “**why** do customers drop off?” + +## Platform Availability + +We have two ways to implement: + +## Plan Availability + +Session Replay is available for customers on Free, Growth, and Enterprise plans: +- Customers on the Free plan have access to 10k free replays per month. +- Customers on the Growth and Enterprise plans have access to 20k free replays per month. +- Additional custom volumes of Session Replay are available as an add-on purchase for [Enterprise plans](https://mixpanel.com/pricing/). + +To access free replays, customers will need to ensure they’re on the latest Mixpanel plans: + +- For customers on an existing **Free** plan: + - Switch your plan to the latest Free plan, which includes 1M monthly events and 10k session replays. You can make this switch directly from the [pricing page](https://mixpanel.com/pricing/). +- For customers on an existing **Growth** plan: + - You're on the latest plan if you purchased or edited your plan after April 2024. If you’re not sure if you’re on the latest plan, you confirm on the pricing page - if you see ‘Make the Switch’ on the Growth plan, then you are on an older version. + - You can make the switch to our latest plan directly from the [pricing page](https://mixpanel.com/pricing/). +- Enterprise customers should contact their account manager to determine their plan status. + +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. + +## Using Session Replay + +Session Replay can be accessed in three places: + +1. From User Profile page +2. From Mixpanel reports +3. On the Home page for your project + +### From User Profile page + +In any user’s profile page, Click the ‘View Replays’ button to watch replays from that user. From here, you will be taken to our Replay Player. + +![replayProfileEntry](/replayProfileEntryPoint.png) + +### From Mixpanel reports + +Click any point on a chart for Event, Funnel, and User Profile, and select ‘View Replays’ to view replays that show that event being fired. From here, you will be taken to our Replay Player. + +![replayReportEntry](/replayReportEntryPoint.png) + +*Note: reports entry point is currently supported for Event, Funnel, and User Profile metrics only.* + +### From the Home page + +Find the Latest Replays card and click on individual replays to view them or click on ‘View All Replays‘ to see up to 100 of your latest replays. + +![replayHomeEntry](/replayHomeEntryPoint.png) + +### Replay Player + +![replayHeroImageWithPrivacy](/replayHeroImageWithPrivacy.png) + +The Replay Player allows you to watch replays, as well as: + +- Expand the player to full-screen +- Copy a URL with or without a timestamp to share with your teammates +- Change the playback speed +- Automatically skip periods of the replay where user is inactive +- See events in the replay timeline +- Jump to different parts of the replay by clicking in the timeline + +The Replay Feed on the left of the player also allows you to: + +- Sort replays by recency, activity, or duration +- Search for replays by user's name / email, replay date, user ID, or the name of an event in the replay +- See a feed of events that occurred during each replay + +## Server Side Stitching (Beta) + +Server-Side Stitching allows our customers to easily watch replays for events that aren’t fired from our SDK. + +It works by inferring the replay an event happened in by looking at the distinct ID and time that the replay ocurred. This is especially useful if you have events coming in from multiple sources, like your server or via warehouse import and it doesn't make sense to pass around the value of `mixpanel.get_session_recording_properties()`. NOTE: we still recommend including these properties on your client side events to guarantee accuracy. + +As a result, this feature: +- makes it 10x easier to watch replays for events coming from your data warehouse +- makes it 10x easier to watch replays for server-side tracked events +- makes Session Replay work automatically with events tracked with your CDP *(although we still recommend using our [CDP middleware](/docs/session-replay-web#can-i-use-session-replay-with-a-cdp) to ensure data accuracy for cross tab / platform user sessions)* + +| | **With Competitors** | **With Mixpanel** | **Value Add** | +| --- | --- | --- | --- | +| **DWH events** | Can’t watch replays that contain a specific DWH event without lots of custom code | Can easily watch replays that contain specific DWH events, just need our SDK to capture replays and make an `.identify()` call | **High** | +| **SS events** | Can’t watch replays that contain a specific SS event without lots of custom code | Can easily watch replays that contain specific SS events, just need our SDK to capture replays and make an `.identify()` call | **High** | +| **CDP events** | Middleware required to watch replays that contain a specific event | You don’t need middleware to watch replays that contain specific events. However, we recommend adding middleware to handle edge cases where replays may not be associated with the right events (simultaneous sessions across tabs, domains, or apps) | **Medium** | +| **SDK-sent events** | Can easily watch replays that contain a specific event | Can easily watch replays that contain a specific event | **Low** | + +In order for Server Side Stitching to work, just ensure that the Mixpanel Javascript SDK calls `identify()` at some point with the user's unique Distinct ID. [See managing user identity](/docs/tracking-methods/sdks/javascript#managing-user-identity). + +## FAQ + +### What happens when I reach my Session Replay limit? +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. Before this happens, we'll send email notifications warning that your limit is approaching to users with “Owner” or “Billing Admin” permissions over your Mixpanel organization. + +For customers using Session Replay who have not purchased our add-on (for example, using complimentary replays included with your Free, Growth, or Enterprise plan), replays above your complimentary amount will not be viewable until you upgrade your plan. Before this happens, users with “Owner” or “Billing Admin” permissions over your Mixpanel organization will be notified that their limit is approaching. + +Mixpanel reserves the right to stop ingesting replays once a customer collects replays beyond their purchased / allocated amount. To minimize disruption to your team, we recommend monitoring your usage in Mixpanel’s user interface and, if applicable to your account, working with your Account Manager to ensure you have the right plan for your session replay needs. + +### 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. diff --git a/pages/docs/session-replay/session-replay-ios.md b/pages/docs/session-replay/session-replay-ios.md index c92e5180ff..fb7bac96a6 100644 --- a/pages/docs/session-replay/session-replay-ios.md +++ b/pages/docs/session-replay/session-replay-ios.md @@ -1,22 +1,24 @@ # Session Replay (iOS): Watch playbacks of user digital experiences -# Overview +## Overview -Welcome to the Mixpanel Session Replay iOS SDK(Closed Alpha)! +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. -Mixpanel Session Replay helps you quickly understand your customers and make better product decisions by combining quantitative and qualitative user insights. +When digging into customer journeys in Mixpanel’s analytics, you can understand “**where** do customers drop-off?” And now, Mixpanel Session Replay enables you to quickly follow-up with, “**why** do customers drop off?” -# Availability +## Availability Currently, iOS Session Replay is in invite-only Alpha access for customers on our Enterprise plan. For any questions about Session Replay or iOS Alpha access, please reach out to your Account Manager. Note: as our Alpha program is early access, our functionality may have bugs and cause crashes. Be sure to test thoroughly before enabling in production. +For more information on our Web replay functionality, read [here](/docs/session-replay/session-replay-web) + # Quick Start Guide ## Prerequisite -You are already a Mixpanel customer and have the Mixpanel iOS SDK installed. If not, please follow this [doc](https://docs.mixpanel.com/docs/what-is-mixpanel) to get started. +You are already a Mixpanel customer and have the Mixpanel iOS SDK installed. If not, please follow this [doc](docs/what-is-mixpanel) to get started. ## Install @@ -164,7 +166,7 @@ SessionReplay.getInstance()?.addSensitiveView(mySensitiveView) ## Using Session Replay -Please refer to [Using Session Replay](/docs/session-replay/session-replay-web#using-session-replay) +Please refer to [Using Session Replay](/docs/session-replay#using-session-replay) ## Legal (Beta Terms) @@ -225,5 +227,3 @@ If your app is SwiftUI-based, the automatic masking for `UITextField` and `UILab ```swift Image("family photo").replaySensitive(); ``` - -For More FAQ, please refer to Mixpanel Session Replay [FAQ](/docs/session-replay/session-replay-web#faq) diff --git a/pages/docs/session-replay/session-replay-privacy-controls b/pages/docs/session-replay/session-replay-privacy-controls new file mode 100644 index 0000000000..dcb82b51ab --- /dev/null +++ b/pages/docs/session-replay/session-replay-privacy-controls @@ -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: ''}) +``` +``` +
This text is masked!
+``` +Example code below for blocking elements: +``` +mixpanel.init(YOUR_PROJECT_TOKEN, {record_block_selector: '.sensitive-data'}) +``` +``` + +``` + +# 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. diff --git a/pages/docs/session-replay/session-replay-web.md b/pages/docs/session-replay/session-replay-web.md index f142e4003c..b2cafee22f 100644 --- a/pages/docs/session-replay/session-replay-web.md +++ b/pages/docs/session-replay/session-replay-web.md @@ -1,4 +1,4 @@ -# Session Replay (web): Watch playbacks of user digital experiences +# Session Replay (Web): Watch playbacks of user digital experiences ## Overview @@ -6,80 +6,13 @@ Mixpanel Session Replay is the fastest way to understand the whole picture about When digging into customer journeys in Mixpanel’s analytics, you can understand “**where** do customers drop-off?” And now, Mixpanel Session Replay enables you to quickly follow-up with, “**why** do customers drop off?” -## Availability - -Session Replay is available on the Free, Growth, and Enterprise plans! - -- Customers on the Free plan have access to 10k free replays per month. -- Customers on the Growth and Enterprise plans have access to 20k free replays per month. -- Additional custom volumes of Session Replay are available as an add-on purchase for [Enterprise plans](https://mixpanel.com/pricing/). - -To access free replays, customers will need to ensure they’re on the latest Mixpanel plans: - -- For customers on an existing **Free** plan: - - Switch your plan to the latest Free plan, which includes 1M monthly events and 10k session replays. You can make this switch directly from the [pricing page](https://mixpanel.com/pricing/). -- For customers on an existing **Growth** plan: - - You're on the latest plan if you purchased or edited your plan after April 2024. If you’re not sure if you’re on the latest plan, you confirm on the pricing page - if you see ‘Make the Switch’ on the Growth plan, then you are on an older version. - - You can make the switch to our latest plan directly from the [pricing page](https://mixpanel.com/pricing/). -- Enterprise customers should contact their account manager to determine their plan status. - -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. - -## Using Session Replay - -Session Replay can be accessed in three places: - -1. From User Profile page -2. From Mixpanel reports -3. On the Home page for your project - -### From User Profile page - -In any user’s profile page, Click the ‘View Replays’ button to watch replays from that user. From here, you will be taken to our Replay Player. - -![replayProfileEntry](/replayProfileEntryPoint.png) - -### From Mixpanel reports - -Click any point on a chart for Event, Funnel, and User Profile, and select ‘View Replays’ to view replays that show that event being fired. From here, you will be taken to our Replay Player. - -![replayReportEntry](/replayReportEntryPoint.png) - -*Note: reports entry point is currently supported for Event, Funnel, and User Profile metrics only.* - -### From the Home page - -Find the Latest Replays card and click on individual replays to view them or click on ‘View All Replays‘ to see up to 100 of your latest replays. - -![replayHomeEntry](/replayHomeEntryPoint.png) - -### Replay Player - -![replayHeroImageWithPrivacy](/replayHeroImageWithPrivacy.png) - -The Replay Player allows you to watch replays, as well as: - -- Expand the player to full-screen -- Copy a URL with or without a timestamp to share with your teammates -- Change the playback speed -- Automatically skip periods of the replay where user is inactive -- See events in the replay timeline -- Jump to different parts of the replay by clicking in the timeline - -The Replay Feed on the left of the player also allows you to: - -- Sort replays by recency, activity, or duration -- Search for replays by user's name / email, replay date, user ID, or the name of an event in the replay -- See a feed of events that occurred during each replay - ## Implementation -Session Replay is not enabled by default; enabling the feature requires instrumentation beyond the standard Mixpanel instrumentation. - -However, in most cases, implementation is extremely simple, only requiring a single line of code to be changed. +Session Replay is not enabled by default; enabling the feature requires instrumentation beyond the standard Mixpanel instrumentation. However, in most cases, implementation is extremely simple, only requiring a single line of code to be changed. -Note that replays sent via your implementation will only be viewable in the project they were ingested in and will not be available to other projects in your org. +- Our documentation on how to implement Session Replay with our Javascript SDK can be found [here](/docs/tracking-methods/sdks/javascript#session-replay) +- Our documentation on how to implement Session Replay with CDPs (like Segment and mParticle) can be found [here](/docs/session-replay/session-replay-web#can-i-use-session-replay-with-a-cdp). -Our documentation on how to implement Session Replay can be found [here](/docs/tracking-methods/sdks/javascript#session-replay). +Replays sent via your implementation will only be viewable in the project they were ingested in and will not be available to other projects in your org. Before you enable Session Replay for a large audience, we recommend testing in a demo project, and starting in production with smaller sets of users or accounts, so that you can monitor performance and ensure your privacy rules align with company policies. @@ -87,17 +20,17 @@ Before you enable Session Replay for a large audience, we recommend testing in a ### Is Session Replay available for mobile? -As of today, Session Replay is available for web-based applications (including mobile web) on the Enterprise Plan and closed Alpha testing for native iOS apps. Android Alpha testing is expected later this year. +As of today, Session Replay is available for web-based applications (including mobile web) on the Enterprise Plan and closed Alpha testing for native iOS apps. Android Alpha testing is expected in early 2025. -For any questions about mobile beta access, please reach out to your Account Manager. - -### Can I prevent Session Replay from recording sensitive content? - -By default, all on-screen text elements are masked in replays. Additionally, you can customize how you initialize our SDK to fully control (1) where to record and (2) whom to record. For more details, please see our [implementation docs](/docs/tracking-methods/sdks/javascript#session-replay). +For any questions about early mobile access, please reach out to your Account Manager. ### How long are replays stored? 30 days. + +### Can I prevent Session Replay from recording sensitive content? + +By default, all on-screen text elements are masked in replays. Additionally, you can customize how you initialize our SDK to fully control (1) where to record and (2) whom to record. For more details, please see our [implementation docs](/docs/tracking-methods/sdks/javascript#session-replay). ### How can I estimate how many replays I'll have? If you already use Mixpanel, the simplest way to estimate the amount of replays is to use a proxy metric for how many page loads you have. If you use timeout based query sessions, Total Session Start events in the Insights report could be a good estimate. @@ -116,16 +49,24 @@ If instead of random sampling, you want to use conditional logic to control whic If you want to only record certain parts of a single-page application with no new mixpanel.init calls, you can also use our [Start / Stop methods](/docs/tracking-methods/sdks/javascript#session-replay-methods). -### What happens when I reach my Session Replay limit? -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. Before this happens, we'll send email notifications warning that your limit is approaching to users with “Owner” or “Billing Admin” permissions over your Mixpanel organization. +### How does Session Replay affect my website's performance? + +Mixpanel leverages the open-source library, [rrweb](https://github.com/rrweb-io/rrweb), to power Session Replay. Both rrweb and Mixpanel are designed with the highest standards of performance in mind. + +How the SDK works on your site – the gist: +* Initial Snapshot: When recording starts, rrweb takes a snapshot of the entire webpage's structure (the DOM), assigning unique IDs to each element for change tracking. +* Change Detection: Asynchronously monitors any changes that occur to the DOM using MutationObserver, minimizing work so that we don't need to keep taking full snapshots. +* User Interactions: Listens for actions like clicks and mouse movements and throttles any high frequency events. +* Collection & Delivery: Mixpanel collects the recording data and sends it to our servers in batches every 10 seconds. +* Optimized Compression: Before sending, Mixpanel will compress the payload using the asynchronous CompressionStream API. This will optimize bandwidth while not blocking the UI thread. -For customers using Session Replay who have not purchased our add-on (for example, using complimentary replays included with your Free, Growth, or Enterprise plan), replays above your complimentary amount will not be viewable until the customer pays for overage replays (Enterprise plan only), or upgrades plan. Before this happens, users with “Owner” or “Billing Admin” permissions over your Mixpanel organization will be notified that their limit is approaching. +We've tested the SDK extensively and it generally has minimal impact on how your website performs. The initial snapshot takes a bit of work, and naturally, more complex and interactive pages generate more data for rrweb and Mixpanel to handle. So, it's always a good practice to do some performance testing after you've implemented Session Replay, just to be sure everything's running smoothly. -Mixpanel reserves the right to stop ingesting replays once a customer collects replays beyond their purchased / allocated amount. To minimize disruption to your team, we recommend monitoring your usage in Mixpanel’s user interface and, if applicable to your account, working with your Account Manager to ensure you have the right plan for your session replay needs. +### Why can't I view Replays from my Insights or Funnels chart? -### How soon are Replays available for viewing after a session begins? +Mixpanel looks for the `$mp_replay_id` property on your events in order to determine which replay it belongs to. If you have instrumented both Replays and Events using the Mixpanel JavaScript SDK, the `$mp_replay_id` will automatically be added to events sent by the SDK. -There is about a ~1 minute delay between when recordings are captured and when they appear in Mixpanel. +For CDP implementations, look below for instructions on how to configure the SDKs together. To get the relevant Session Replay properties from the SDK, use `mixpanel.get_session_recording_properties()`. [See documentation](/docs/tracking-methods/sdks/javascript#get-replay-properties). ### Why does it say the player failed to load? @@ -137,17 +78,9 @@ For extensions like uBlock, you can navigate to "My Filters" in the extension se @@||mxpnl.com^$domain=mxpnl.com ``` -### Why can't I view Replays from my Insights or Funnels chart? - -Mixpanel looks for the `$mp_replay_id` property on your events in order to determine which replay it belongs to. If you have instrumented both Replays and Events using the Mixpanel JavaScript SDK, the `$mp_replay_id` will automatically be added to events sent by the SDK. - -For CDP implementations, look below for instructions on how to configure the SDKs together. To get the relevant Session Replay properties from the SDK, use `mixpanel.get_session_recording_properties()`. [See documentation](/docs/tracking-methods/sdks/javascript#get-replay-properties). - -#### Server Side Stitching (Beta) - -Mixpanel can infer the replay an event happened in by looking at the distinct ID and time that the replay ocurred. This is especially useful if you have events coming in from multiple sources, like your server or via warehouse import and it doesn't make sense to pass around the value of `mixpanel.get_session_recording_properties()`. NOTE: we still recommend including these properties on your client side events to guarantee accuracy. +### How do Session Replays work when navigating between pages that are full page loads? -In order for Server Side Stitching to work, just ensure that the Mixpanel Javascript SDK calls `identify()` at some point with the user's unique Distinct ID. [See managing user identity](/docs/tracking-methods/sdks/javascript#managing-user-identity). +If your web application relies on full page loads (where the entire page is reloaded when navigating from one page to another), a new Session Replay recording `$mp_replay_id` will be created when navigating to each page. This occurs because the Mixpanel instance is reloaded again when navigating between pages. ### Can I use Session Replay with a CDP? @@ -289,103 +222,3 @@ Once that is added, you can add a new Mixpanel tag to your workspace which turns Here's a screenshot of a working session replay tag for a visual comparison: - -### How does Session Replay affect my website's performance? - -Mixpanel leverages the open-source library, [rrweb](https://github.com/rrweb-io/rrweb), to power Session Replay. Both rrweb and Mixpanel are designed with the highest standards of performance in mind. - -How the SDK works on your site – the gist: -* Initial Snapshot: When recording starts, rrweb takes a snapshot of the entire webpage's structure (the DOM), assigning unique IDs to each element for change tracking. -* Change Detection: Asynchronously monitors any changes that occur to the DOM using MutationObserver, minimizing work so that we don't need to keep taking full snapshots. -* User Interactions: Listens for actions like clicks and mouse movements and throttles any high frequency events. -* Collection & Delivery: Mixpanel collects the recording data and sends it to our servers in batches every 10 seconds. -* Optimized Compression: Before sending, Mixpanel will compress the payload using the asynchronous CompressionStream API. This will optimize bandwidth while not blocking the UI thread. - -We've tested the SDK extensively and it generally has minimal impact on how your website performs. The initial snapshot takes a bit of work, and naturally, more complex and interactive pages generate more data for rrweb and Mixpanel to handle. So, it's always a good practice to do some performance testing after you've implemented Session Replay, just to be sure everything's running smoothly. - -### How do Session Replays work when navigating between pages that are full page loads? - -If your web application relies on full page loads (where the entire page is reloaded when navigating from one page to another), a new Session Replay recording `$mp_replay_id` will be created when navigating to each page. This occurs because the Mixpanel instance is reloaded again when navigating between pages. - - - - -## Appendix: 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: ''}) -``` -``` -
This text is masked!
-``` -Example code below for blocking elements: -``` -mixpanel.init(YOUR_PROJECT_TOKEN, {record_block_selector: '.sensitive-data'}) -``` -``` - -``` - -### 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.