@affogatosoftware/recorder 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 +33 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
### Quick Start:
|
|
2
|
+
|
|
3
|
+
Don't forget to replace 'YOUR_API_TOKEN' with your actual api token.
|
|
4
|
+
|
|
5
|
+
#### In your js/ts code:
|
|
6
|
+
```aiignore
|
|
3
7
|
import { Recorder } from '@affogatosoftware/recorder';
|
|
8
|
+
...
|
|
9
|
+
const rec = new Recorder(window, 'YOUR_API_TOKEN', { MaskingLevel.InputPasswordOrEmailAndTextArea });
|
|
10
|
+
rec.start();
|
|
4
11
|
```
|
|
5
12
|
|
|
6
|
-
|
|
13
|
+
#### Put this script tag at the end of the header tag in your index.html:
|
|
14
|
+
```aiignore
|
|
15
|
+
<script type="module">
|
|
16
|
+
import 'https://unpkg.com/@affogatosoftware/recorder/dist/browser/recorder.es.js';
|
|
17
|
+
const rec = new Recorder(window, 'YOUR_API_TOKEN', { MaskingLevel.InputPasswordOrEmailAndTextArea });
|
|
18
|
+
rec.start();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
7
21
|
```
|
|
22
|
+
|
|
23
|
+
#### Or if module scripts don't work for you, do it this way:
|
|
24
|
+
```aiignore
|
|
25
|
+
<script src="https://unpkg.com/@affogatosoftware/recorder/dist/browser/recorder.iife.js"></script>
|
|
8
26
|
<script>
|
|
9
|
-
const
|
|
10
|
-
|
|
27
|
+
const rec = new Recorder(window, 'YOUR_API_TOKEN', { MaskingLevel.InputPasswordOrEmailAndTextArea });
|
|
28
|
+
rec.start();
|
|
11
29
|
</script>
|
|
12
30
|
```
|
|
13
31
|
|
|
32
|
+
### Masking Options
|
|
33
|
+
The masking level that gets passed in when the Recorder object is created will dictate what elements will turn their text into an asterisks (*).
|
|
34
|
+
This can be passed in using the MaskingLevel enum (ex. MaskingLevel.InputAndTextArea) or as a string ("InputAndTextArea").
|
|
35
|
+
|
|
36
|
+
* None: Nothing will get masked. Everything will be recorded and stored. **Make sure you have the user's permission to store potential PII.**
|
|
37
|
+
* All: All text will be masked.
|
|
38
|
+
* InputAndTextArea: All input and text area tags will have their text masked.
|
|
39
|
+
* InputPasswordOrEmailAndTextArea: All input tags of type password and email will have their text masked. All text area tags will ahve their text masked.
|
|
40
|
+
|
|
41
|
+
If you want a safe default that won't require you to make a cookie banner, choose All.
|