Skip to content

Commit ee4d4d4

Browse files
committed
Update Session Replay setup pages
1 parent d95df4b commit ee4d4d4

File tree

4 files changed

+362
-224
lines changed

4 files changed

+362
-224
lines changed

config/_default/menus/main.en.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7676,6 +7676,11 @@ menu:
76767676
parent: rum_session_replay
76777677
identifier: rum_session_replay_browser
76787678
weight: 502
7679+
- name: Setup
7680+
url: real_user_monitoring/session_replay/browser/setup_and_configuration
7681+
parent: rum_session_replay_browser
7682+
identifier: rum_session_replay_browser_setup
7683+
weight: 101
76797684
- name: Privacy Options
76807685
url: real_user_monitoring/session_replay/browser/privacy_options
76817686
parent: rum_session_replay_browser
@@ -7947,6 +7952,11 @@ menu:
79477952
parent: pa_session_replay
79487953
identifier: pa_session_replay_browser
79497954
weight: 303
7955+
- name: Setup
7956+
url: product_analytics/session_replay/browser/setup_and_configuration
7957+
parent: pa_session_replay_browser
7958+
identifier: pa_session_replay_browser_setup
7959+
weight: 101
79507960
- name: Privacy Options
79517961
url: product_analytics/session_replay/browser/privacy_options
79527962
parent: pa_session_replay_browser

content/en/real_user_monitoring/session_replay/browser/_index.md

Lines changed: 10 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: Browser Session Replay
33
description: Learn about how to capture and visually replay your users' web browsing experience with Session Replay.
44
aliases:
55
- /real_user_monitoring/guide/session-replay-getting-started/
6-
- /real_user_monitoring/session_replay/
76
further_reading:
87
- link: 'https://www.datadoghq.com/blog/session-replay-datadog/'
98
tag: 'Blog'
@@ -40,84 +39,19 @@ To reduce Session Replay's network impact and ensure the Session Replay recorder
4039

4140
## Setup
4241

43-
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].
42+
Learn how to [set up and configure Browser Session Replay][4].
4443

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

47-
## Usage
46+
See [Privacy Options][5].
4847

49-
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()`.
48+
## Troubleshooting
5049

51-
For example, to only record authenticated user sessions:
52-
53-
```javascript
54-
window.DD_RUM.init({
55-
applicationId: '<DATADOG_APPLICATION_ID>',
56-
clientToken: '<DATADOG_CLIENT_TOKEN>',
57-
site: '<DATADOG_SITE>',
58-
// service: 'my-web-application',
59-
// env: 'production',
60-
// version: '1.0.0',
61-
sessionSampleRate: 100,
62-
sessionReplaySampleRate: 100,
63-
startSessionReplayRecordingManually: true,
64-
...
65-
});
66-
67-
if (user.isAuthenticated) {
68-
window.DD_RUM.startSessionReplayRecording();
69-
}
70-
```
71-
72-
To stop the Session Replay recording, call `stopSessionReplayRecording()`.
73-
74-
<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>
75-
76-
## Force Session Replay
77-
78-
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.
79-
80-
To force Session Replay recording for the rest of the current session, call `startSessionReplayRecording({ force: true })`
81-
82-
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.
83-
84-
<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>
85-
86-
## Disable Session Replay
87-
88-
To stop session recordings, set `sessionReplaySampleRate` to `0`. This stops collecting data for the [Browser RUM & Session Replay plan][6].
89-
90-
<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>
91-
92-
## Retention
93-
94-
By default, Session Replay data is retained for 30 days.
95-
96-
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).
97-
98-
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.
99-
100-
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.
101-
102-
{{< img src="real_user_monitoring/session_replay/session-replay-extended-retention.png" alt="Enable extended retention" style="width:100%;" >}}
103-
104-
Refer to the below diagram to understand what data is retained with extended retention.
105-
106-
{{< img src="real_user_monitoring/session_replay/replay-extended-retention.png" alt="Diagram of what data is retained with extended retention" style="width:100%;" >}}
107-
108-
## Playback history
109-
110-
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.
111-
112-
{{< img src="real_user_monitoring/session_replay/session-replay-playback-history.png" alt="Check who has watched a session's recording" style="width:100%;" >}}
113-
114-
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.
115-
116-
To view your own playback history, check out the [My Watch History][9] playlist.
50+
Learn how to [troubleshoot Browser Session Replay][7].
11751

11852
## Mobile Session Replay
11953

120-
Learn more about the [Session Replay for Mobile][5].
54+
Learn more about the [Session Replay for Mobile][8].
12155

12256
## Further Reading
12357

@@ -126,9 +60,7 @@ Learn more about the [Session Replay for Mobile][5].
12660
[1]: https://github.com/DataDog/browser-sdk
12761
[2]: https://www.rrweb.io/
12862
[3]: https://github.com/DataDog/browser-sdk/blob/main/packages/rum/BROWSER_SUPPORT.md
129-
[4]: /real_user_monitoring/browser/
130-
[5]: /real_user_monitoring/session_replay/mobile/
131-
[6]: https://www.datadoghq.com/pricing/?product=real-user-monitoring--session-replay#real-user-monitoring--session-replay
132-
[7]: https://docs.datadoghq.com/account_management/audit_trail/
133-
[8]: https://docs.datadoghq.com/notebooks/
134-
[9]: https://app.datadoghq.com/rum/replay/playlists/my-watch-history
63+
[4]: /real_user_monitoring/session_replay/browser/setup_and_configuration
64+
[5]: /real_user_monitoring/session_replay/browser/privacy_options
65+
[7]: /real_user_monitoring/session_replay/browser/troubleshooting
66+
[8]: /real_user_monitoring/session_replay/mobile/
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
---
2+
title: Browser Session Replay Setup and Configuration
3+
description: Learn about how to capture and visually replay your users' web browsing experience with Session Replay.
4+
further_reading:
5+
- link: 'https://www.datadoghq.com/blog/session-replay-datadog/'
6+
tag: 'Blog'
7+
text: 'Use Datadog Session Replay to view real-time user journeys'
8+
- link: 'https://www.datadoghq.com/blog/reduce-customer-friction-funnel-analysis/'
9+
tag: 'Blog'
10+
text: 'Use funnel analysis to understand and optimize key user flows'
11+
- link: 'https://www.datadoghq.com/blog/zendesk-session-replay-integration/'
12+
tag: 'Blog'
13+
text: 'Visually replay user-facing issues with Zendesk and Datadog Session Replay'
14+
- link: '/product_analytics/analytics_explorer'
15+
tag: 'Documentation'
16+
text: 'Visualize your Product Analytics data in the Analytics Explorer'
17+
- link: '/integrations/content_security_policy_logs'
18+
tag: 'Documentation'
19+
text: 'Detect and aggregate CSP violations with Datadog'
20+
---
21+
22+
23+
## Setup
24+
25+
To set up Mobile Session Replay for Browser:
26+
27+
### Step 1 - Setup the Browser SDK
28+
29+
Make sure you've set up the [RUM Browser SDK][1].
30+
31+
### Step 2 - Enable Session Replay
32+
33+
To enable session replay you have to specify the session replay sample rate. It must be a number between 0.0 and 100.0, where 0 indicates that no replays are recorded and 100 means that all RUM sessions include a replay.
34+
35+
This sample rate is applied in addition to the RUM sample rate. For example, if RUM uses a sample rate of 80% and Session Replay uses a sample rate of 20%, it means that out of all user sessions, 80% are included in RUM, and within those sessions, only 20% have replays.
36+
See [Browser RUM & Session Replay sessions][2] for more information.
37+
38+
{{< tabs >}}
39+
{{% tab "NPM" %}}
40+
41+
```javascript
42+
import { datadogRum } from '@datadog/browser-rum';
43+
44+
datadogRum.init({
45+
...
46+
sessionReplaySampleRate: 100,
47+
...
48+
});
49+
50+
```
51+
52+
{{% /tab %}}
53+
{{% tab "CDN async" %}}
54+
55+
```javascript
56+
<script>
57+
window.DD_RUM.onReady(function() {
58+
window.DD_RUM.init({
59+
...
60+
sessionReplaySampleRate: 100,
61+
...
62+
});
63+
})
64+
</script>
65+
```
66+
67+
{{% /tab %}}
68+
{{% tab "CDN sync" %}}
69+
70+
```javascript
71+
<script>
72+
window.DD_RUM && window.DD_RUM.init({
73+
...
74+
sessionReplaySampleRate: 100,
75+
...
76+
});
77+
</script>
78+
```
79+
80+
**Note:** Bellow version v5.0.0, Session Replay does not start automatically and you need to call [`startSessionReplayRecording()`][3] API
81+
82+
{{% /tab %}}
83+
{{< /tabs >}}
84+
85+
## Additional configuration
86+
87+
### Start or stop the recording manually
88+
89+
By default, Session Replay starts recording automatically.
90+
However, if you prefer to manually start recording at a specific point in your application, you can use the option `startSessionReplayRecordingManually` parameter as shown below, and later call [`startSessionReplayRecording()`][3].
91+
You can also use [`stopSessionReplayRecording()`][4] to stop the recording anytime.
92+
93+
{{< tabs >}}
94+
{{% tab "NPM" %}}
95+
96+
```javascript
97+
import { datadogRum } from '@datadog/browser-rum';
98+
99+
datadogRum.init({
100+
...
101+
startSessionReplayRecordingManually: true,
102+
...
103+
});
104+
105+
datadogRum.startSessionReplayRecording()
106+
// Do something
107+
datadogRum.stopSessionReplayRecording()
108+
```
109+
110+
{{% /tab %}}
111+
{{% tab "CDN async" %}}
112+
113+
```javascript
114+
<script>
115+
window.DD_RUM.onReady(function() {
116+
window.DD_RUM.init({
117+
...
118+
startSessionReplayRecordingManually: true,
119+
...
120+
});
121+
122+
window.DD_RUM.startSessionReplayRecording()
123+
// Do something
124+
window.DD_RUM.stopSessionReplayRecording()
125+
})
126+
</script>
127+
```
128+
129+
{{% /tab %}}
130+
{{% tab "CDN sync" %}}
131+
132+
```javascript
133+
<script>
134+
window.DD_RUM && window.DD_RUM..init({
135+
...
136+
startSessionReplayRecordingManually: true,
137+
...
138+
});
139+
140+
window.DD_RUM && window.DD_RUM.startSessionReplayRecording();
141+
// Do something
142+
window.DD_RUM && window.DD_RUM.stopSessionReplayRecording();
143+
</script>
144+
```
145+
146+
{{% /tab %}}
147+
{{< /tabs >}}
148+
149+
**Note** In some scenarios, you may want to begin recording, even if it was initially sampled out of replay. To force Session Replay recording for the rest of the current session, call [`startSessionReplayRecording({ force: true })`][3]
150+
151+
### Privacy options
152+
153+
Session Replay provides privacy controls to ensure organizations of any scale do not expose sensitive or personal data.
154+
See [Privacy Options][5].
155+
156+
### Connect Session Replay To Your Third-Party Tools
157+
158+
You can access the Session Replay URL to use in integrations, live from the browser where the session is taking place.
159+
See [Connect Session Replay To Your Third-Party Tools][6].
160+
161+
[1]: /real_user_monitoring/browser/setup/
162+
[2]: /real_user_monitoring/guide/sampling-browser-plans/
163+
[3]: https://datadoghq.dev/browser-sdk/interfaces/_datadog_browser-rum.RumGlobal.html#startsessionreplayrecording
164+
[4]: https://datadoghq.dev/browser-sdk/interfaces/_datadog_browser-rum.RumGlobal.html#stopsessionreplayrecording
165+
[5]: /real_user_monitoring/session_replay/browser/privacy_options
166+
[6]: /real_user_monitoring/guide/connect-session-replay-to-your-third-party-tools

0 commit comments

Comments
 (0)