Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions config/_default/menus/main.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7676,6 +7676,11 @@ menu:
parent: rum_session_replay
identifier: rum_session_replay_browser
weight: 502
- name: Setup
url: real_user_monitoring/session_replay/browser/setup_and_configuration
parent: rum_session_replay_browser
identifier: rum_session_replay_browser_setup
weight: 101
- name: Privacy Options
url: real_user_monitoring/session_replay/browser/privacy_options
parent: rum_session_replay_browser
Expand Down Expand Up @@ -7947,6 +7952,11 @@ menu:
parent: pa_session_replay
identifier: pa_session_replay_browser
weight: 303
- name: Setup
url: product_analytics/session_replay/browser/setup_and_configuration
parent: pa_session_replay_browser
identifier: pa_session_replay_browser_setup
weight: 101
- name: Privacy Options
url: product_analytics/session_replay/browser/privacy_options
parent: pa_session_replay_browser
Expand Down
63 changes: 11 additions & 52 deletions content/en/product_analytics/session_replay/browser/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Session Replay expands your user experience monitoring by allowing you to captur

The RUM Browser SDK is [open source][1] and leverages the open source [rrweb][2] project.

## Session Replay recorder
## How the Session Replay recorder works

The Session Replay recorder is part of the RUM Browser SDK. The recorder takes a snapshot of the browser's DOM and CSS by tailing and recording events happening on a web page (such as DOM modification, mouse move, clicks, and input events) along with these events' timestamps.

Expand All @@ -38,58 +38,19 @@ To reduce Session Replay's network impact and ensure the Session Replay recorder

## Setup

Session Replay is available in the RUM Browser SDK. To start collecting data for Session Replay, set up [Datadog RUM Browser Monitoring][4] by creating a RUM application, generating a client token generation, and initializing the RUM Browser SDK. For setup in mobile environments, see [Mobile Session Replay][5].
Learn how to [set up and configure Browser Session Replay][4].

<div class="alert alert-info">Session Replay is supported by SDK version 3.6.0 or later.</div>
## Privacy options

## Usage
See [Privacy Options][5].

Starting with v5.0.0 of the RUM Browser SDK, the Session Replay starts recording automatically when calling `init()`. To conditionally start the recording, use the `startSessionReplayRecordingManually` init parameter and call `startSessionReplayRecording()`.
## Troubleshooting

For example, to only record authenticated user sessions:

```javascript
window.DD_RUM.init({
applicationId: '<DATADOG_APPLICATION_ID>',
clientToken: '<DATADOG_CLIENT_TOKEN>',
site: '<DATADOG_SITE>',
// service: 'my-web-application',
// env: 'production',
// version: '1.0.0',
sessionSampleRate: 100,
sessionReplaySampleRate: 100,
startSessionReplayRecordingManually: true,
...
});

if (user.isAuthenticated) {
window.DD_RUM.startSessionReplayRecording();
}
```

To stop the Session Replay recording, call `stopSessionReplayRecording()`.

<div class="alert alert-warning">When using a version of the RUM Browser SDK older than v5.0.0, Session Replay recording does not begin automatically. Call <code>startSessionReplayRecording()</code> to begin recording.</div>

## Disable Session Replay

To stop session recordings, set `sessionReplaySampleRate` to `0`. This stops collecting data for the [Browser RUM & Session Replay plan][6].

<div class="alert alert-warning">If you're using a version of the RUM Browser SDK previous to v5.0.0, set <code>replaySampleRate</code> to <code>0</code>.</div>

## Playback history

You can see who has watched a given session replay by clicking the **watched** count displayed on the player page. This feature allows you to check whether someone you'd like to share the recording with has already watched it.

{{< img src="real_user_monitoring/session_replay/session-replay-playback-history.png" alt="Check who has watched a session's recording" style="width:100%;" >}}

The history includes only playbacks that occurred in the player page or in an embedded player, like in a [Notebook][8] or side panel. Included playbacks also generate an [Audit Trail][7] event. Thumbnail previews are not included in history.

To view your own playback history, check out the [My Watch History][9] playlist.
Learn how to [troubleshoot Browser Session Replay][7].

## Mobile Session Replay

Learn more about the [Session Replay for Mobile][5].
Learn more about the [Session Replay for Mobile][8].

## Further Reading

Expand All @@ -98,9 +59,7 @@ Learn more about the [Session Replay for Mobile][5].
[1]: https://github.com/DataDog/browser-sdk
[2]: https://www.rrweb.io/
[3]: https://github.com/DataDog/browser-sdk/blob/main/packages/rum/BROWSER_SUPPORT.md
[4]: /real_user_monitoring/browser/
[5]: /real_user_monitoring/session_replay/mobile/
[6]: https://www.datadoghq.com/pricing/?product=real-user-monitoring--session-replay#real-user-monitoring--session-replay
[7]: https://docs.datadoghq.com/account_management/audit_trail/
[8]: https://docs.datadoghq.com/notebooks/
[9]: https://app.datadoghq.com/rum/replay/playlists/my-watch-history
[4]: /product_analytics/session_replay/browser/setup_and_configuration
[5]: /product_analytics/session_replay/browser/privacy_options
[7]: /product_analytics/session_replay/browser/troubleshooting
[8]: /product_analytics/session_replay/mobile/
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Browser Session Replay Setup and Configuration
description: Setting up and configuring Mobile Session Replay.
aliases:
further_reading:
- link: '/product_analytics/session_replay/browser'
tag: Documentation
text: Browser Session Replay
- link: '/product_analytics/session_replay/browser/privacy_options'
tag: Documentation
text: Browser Session Replay Privacy Options
- link: '/product_analytics/session_replay/browser/troubleshooting'
tag: Documentation
text: Troubleshoot Browser Session Replay
- link: '/product_analytics/session_replay'
tag: Documentation
text: Session Replay
---

{{< include-markdown "real_user_monitoring/session_replay/browser/setup_and_configuration" >}}
88 changes: 10 additions & 78 deletions content/en/real_user_monitoring/session_replay/browser/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Browser Session Replay
description: Learn about how to capture and visually replay your users' web browsing experience with Session Replay.
aliases:
- /real_user_monitoring/guide/session-replay-getting-started/
- /real_user_monitoring/session_replay/
further_reading:
- link: 'https://www.datadoghq.com/blog/session-replay-datadog/'
tag: 'Blog'
Expand Down Expand Up @@ -40,84 +39,19 @@ To reduce Session Replay's network impact and ensure the Session Replay recorder

## Setup

Session Replay is available in the RUM Browser SDK. To start collecting data for Session Replay, set up [Datadog RUM Browser Monitoring][4] by creating a RUM application, generating a client token generation, and initializing the RUM Browser SDK. For setup in mobile environments, see [Mobile Session Replay][5].
Learn how to [set up and configure Browser Session Replay][4].

<div class="alert alert-info">Session Replay is supported by SDK version 3.6.0 or later.</div>
## Privacy options

## Usage
See [Privacy Options][5].

Starting with v5.0.0 of the RUM Browser SDK, the Session Replay starts recording automatically when calling `init()`. To conditionally start the recording, use the `startSessionReplayRecordingManually` init parameter and call `startSessionReplayRecording()`.
## Troubleshooting

For example, to only record authenticated user sessions:

```javascript
window.DD_RUM.init({
applicationId: '<DATADOG_APPLICATION_ID>',
clientToken: '<DATADOG_CLIENT_TOKEN>',
site: '<DATADOG_SITE>',
// service: 'my-web-application',
// env: 'production',
// version: '1.0.0',
sessionSampleRate: 100,
sessionReplaySampleRate: 100,
startSessionReplayRecordingManually: true,
...
});

if (user.isAuthenticated) {
window.DD_RUM.startSessionReplayRecording();
}
```

To stop the Session Replay recording, call `stopSessionReplayRecording()`.

<div class="alert alert-warning">When using a version of the RUM Browser SDK older than v5.0.0, Session Replay recording does not begin automatically. Call <code>startSessionReplayRecording()</code> to begin recording.</div>

## Force Session Replay

In some scenarios, you may want to begin recording a session after it has already started, even if it was initially sampled out of replay. For instance, you might want to force Session Replay on a newly deployed page for closer monitoring, or start recording after detecting an error to ensure complete replay data.

To force Session Replay recording for the rest of the current session, call `startSessionReplayRecording({ force: true })`

When using the force option, the session is upgraded to a replayed session for the remainder of its duration, regardless of its initial sampling decision.

<div class="alert alert-warning">The force option only upgrades an existing session to a replayed one if it is already being sampled. In other words, if sampling hasn't started yet, using the force option does not initiate one, and no replay is recorded.</div>

## Disable Session Replay

To stop session recordings, set `sessionReplaySampleRate` to `0`. This stops collecting data for the [Browser RUM & Session Replay plan][6].

<div class="alert alert-warning">If you're using a version of the RUM Browser SDK previous to v5.0.0, set <code>replaySampleRate</code> to <code>0</code>.</div>

## Retention

By default, Session Replay data is retained for 30 days.

To extend retention to 15 months, you can enable _Extended Retention_ on individual session replays. These sessions must be non-active (the user has completed their experience).

Extended Retention only applies to Session Replay and does not include associated events. The 15 months start when Extended Retention is enabled, not when the session is collected.

You can disable Extended Retention at any time. If the session replay is still within its default 30 days of retention, the replay expires at the end of the initial 30 day window. If you disable Extended Retention on a session replay that is older than 30 days, the replay immediately expires.

{{< img src="real_user_monitoring/session_replay/session-replay-extended-retention.png" alt="Enable extended retention" style="width:100%;" >}}

Refer to the below diagram to understand what data is retained with extended retention.

{{< img src="real_user_monitoring/session_replay/replay-extended-retention.png" alt="Diagram of what data is retained with extended retention" style="width:100%;" >}}

## Playback history

You can see who has watched a given session replay by clicking the **watched** count displayed on the player page. This feature allows you to check whether someone you'd like to share the recording with has already watched it.

{{< img src="real_user_monitoring/session_replay/session-replay-playback-history.png" alt="Check who has watched a session's recording" style="width:100%;" >}}

The history includes only playbacks that occurred in the player page or in an embedded player, like in a [Notebook][8] or side panel. Included playbacks also generate an [Audit Trail][7] event. Thumbnail previews are not included in history.

To view your own playback history, check out the [My Watch History][9] playlist.
Learn how to [troubleshoot Browser Session Replay][7].

## Mobile Session Replay

Learn more about the [Session Replay for Mobile][5].
Learn more about the [Session Replay for Mobile][8].

## Further Reading

Expand All @@ -126,9 +60,7 @@ Learn more about the [Session Replay for Mobile][5].
[1]: https://github.com/DataDog/browser-sdk
[2]: https://www.rrweb.io/
[3]: https://github.com/DataDog/browser-sdk/blob/main/packages/rum/BROWSER_SUPPORT.md
[4]: /real_user_monitoring/browser/
[5]: /real_user_monitoring/session_replay/mobile/
[6]: https://www.datadoghq.com/pricing/?product=real-user-monitoring--session-replay#real-user-monitoring--session-replay
[7]: https://docs.datadoghq.com/account_management/audit_trail/
[8]: https://docs.datadoghq.com/notebooks/
[9]: https://app.datadoghq.com/rum/replay/playlists/my-watch-history
[4]: /real_user_monitoring/session_replay/browser/setup_and_configuration
[5]: /real_user_monitoring/session_replay/browser/privacy_options
[7]: /real_user_monitoring/session_replay/browser/troubleshooting
[8]: /real_user_monitoring/session_replay/mobile/
Loading
Loading