You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/rum/sdk/harmony/advanced-config.mdx
+23-8Lines changed: 23 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,20 +40,35 @@ const config = new ConfigurationBuilder('<CLIENT_TOKEN>', 'production')
40
40
41
41
## Tracking consent
42
42
43
-
Pass `TrackingConsent` during initialization. You can also update it at runtime with `Flashcat.setTrackingConsent()`.
43
+
To comply with privacy regulations such as GDPR and CCPA, the SDK requires a tracking consent state at initialization (the third argument of `Flashcat.initialize()`), and lets you change it at any time afterwards.
44
+
45
+
### Consent states
46
+
47
+
| State | Behavior | When to use |
48
+
|-------|----------|-------------|
49
+
|`TrackingConsent.GRANTED`| Collects data and sends it to Flashduty | The user has agreed to data collection |
50
+
|`TrackingConsent.NOT_GRANTED`| Collects nothing | The user has declined data collection |
51
+
|`TrackingConsent.PENDING`| Collects data but does not send it | Waiting for the user's decision |
52
+
53
+
<Info>
54
+
When initialized with `TrackingConsent.PENDING`, the SDK writes events to a separate local buffer and sends nothing until consent changes to `GRANTED` — at which point the buffered data is migrated and uploaded automatically. Changing to `NOT_GRANTED` clears the buffer instead.
0 commit comments