@amplitude/plugin-session-replay-browser 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -51,9 +51,11 @@ const sessionReplayTracking = sessionReplayPlugin({
|
|
|
51
51
|
|
|
52
52
|
#### Options
|
|
53
53
|
|
|
54
|
-
|Name|Type|Default|Description|
|
|
55
|
-
|
|
56
|
-
|`sampleRate`|`number`|`undefined`|Use this option to control how many sessions will be selected for replay collection. A selected session will be collected for replay, while sessions that are not selected will not. <br></br>The number should be a decimal between 0 and 1, ie `0.
|
|
54
|
+
|Name|Type|Default|Required|Description|
|
|
55
|
+
|-|-|-|-|-|
|
|
56
|
+
|`sampleRate`|`number`|`undefined`|Yes|Use this option to control how many sessions will be selected for replay collection. A selected session will be collected for replay, while sessions that are not selected will not. <br></br>The number should be a decimal between 0 and 1, ie `0.01`, representing the fraction of sessions you would like to have randomly selected for replay collection. Over a large number of sessions, `0.01` would select `1%` of those sessions.|
|
|
57
|
+
|`privacyConfig`|`object`|`undefined`|No| Supports advanced masking configs with CSS selectors.|
|
|
58
|
+
|`debugMode`|`boolean`|`false`|No| Adds additional debug event property to help debug instrumentation issues (such as mismatching apps). Only recommended for debugging initial setup, and not recommended for production.|
|
|
57
59
|
|
|
58
60
|
### 3. Install plugin to Amplitude SDK
|
|
59
61
|
|
|
@@ -72,3 +74,14 @@ In your application code, add the class `.amp-mask` to any __non-input element__
|
|
|
72
74
|
|
|
73
75
|
#### 3. Block non-text elements
|
|
74
76
|
In your application code, add the class `.amp-block` to any element you would like to have blocked from the collection of the replay. The element will appear in the replay as a placeholder with the same dimensions.
|
|
77
|
+
|
|
78
|
+
#### 4. Block elements by CSS selectors.
|
|
79
|
+
In the SDK initialization code, you can configure the SDK to block elements based on CSS selectors.
|
|
80
|
+
```typescript
|
|
81
|
+
const sessionReplayTracking = sessionReplayPlugin({
|
|
82
|
+
sampleRate: 0.01,
|
|
83
|
+
privacyConfig: {
|
|
84
|
+
blockSelector: ['.ignoreClass', '#ignoreId']
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amplitude/plugin-session-replay-browser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Amplitude Inc",
|
|
6
6
|
"homepage": "https://github.com/amplitude/Amplitude-TypeScript",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"files": [
|
|
57
57
|
"lib"
|
|
58
58
|
],
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "f07f2bf6aaf2817ded4f18eda548d5c2778ee75c"
|
|
60
60
|
}
|