Skip to content

Commit abffbe5

Browse files
author
Hugo Delaby
authored
[rum] add service, env, version to init example (DataDog#8370)
1 parent 5a6feb8 commit abffbe5

File tree

1 file changed

+20
-0
lines changed
  • content/en/real_user_monitoring/browser

1 file changed

+20
-0
lines changed

content/en/real_user_monitoring/browser/_index.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ datadogRum.init({
4040
applicationId: '<DATADOG_APPLICATION_ID>',
4141
clientToken: '<DATADOG_CLIENT_TOKEN>',
4242
site: 'datadoghq.com',
43+
// service: 'my-web-application',
44+
// env: 'production',
45+
// version: '1.0.0',
4346
sampleRate: 100,
47+
trackInteractions:true,
4448
});
4549
```
4650

@@ -54,13 +58,19 @@ datadogRum.init({
5458
applicationId: '<DATADOG_APPLICATION_ID>',
5559
clientToken: '<DATADOG_CLIENT_TOKEN>',
5660
site: 'datadoghq.eu',
61+
// service: 'my-web-application',
62+
// env: 'production',
63+
// version: '1.0.0',
5764
sampleRate: 100,
65+
trackInteractions:true,
5866
});
5967
```
6068

6169
{{% /tab %}}
6270
{{< /tabs >}}
6371

72+
**Note**: The `trackInteractions` initialization parameter enables the automatic collection of user clicks in your application. **Sensitive and private data** contained on your pages may be included to identify the elements interacted with.
73+
6474
## Bundle Setup
6575

6676
Paste the generated code snippet into the head tag (in front of any other script tags) of every HTML page you want to monitor in your application. Including the script tag higher and synchronized ensures Datadog RUM can collect all performance data and errors.
@@ -79,7 +89,11 @@ Paste the generated code snippet into the head tag (in front of any other script
7989
clientToken: '<CLIENT_TOKEN>',
8090
applicationId: '<APPLICATION_ID>',
8191
site: 'datadoghq.com',
92+
// service: 'my-web-application',
93+
// env: 'production',
94+
// version: '1.0.0',
8295
sampleRate: 100,
96+
trackInteractions:true,
8397
});
8498
</script>
8599
```
@@ -98,14 +112,20 @@ Paste the generated code snippet into the head tag (in front of any other script
98112
clientToken: '<CLIENT_TOKEN>',
99113
applicationId: '<APPLICATION_ID>',
100114
site: 'datadoghq.eu',
115+
// service: 'my-web-application',
116+
// env: 'production',
117+
// version: '1.0.0',
101118
sampleRate: 100,
119+
trackInteractions:true,
102120
});
103121
</script>
104122
```
105123

106124
{{% /tab %}}
107125
{{< /tabs >}}
108126

127+
**Note**: The `trackInteractions` initialization parameter enables the automatic collection of user clicks in your application. **Sensitive and private data** contained on your pages may be included to identify the elements interacted with.
128+
109129
**Note**: The `window.DD_RUM` check is used to prevent issues if a loading failure occurs with the RUM SDK.
110130

111131
## Initialization parameters

0 commit comments

Comments
 (0)