Guide
Data Protection
1min
By default, data protection is turned off in the SDK. This means that the SDK will read and write from the browser's storage (localStorage, cookies, etc).
For customers who need to comply with data protection rules, you can enable data protection in the SDK by setting useConsent to true. When this setting is enabled, consent must be given for each session using the SDK using consentGiven with a value set to true.
You can use the following code snippet as an example to enable it:
You can either add values per user session within KlevuConfig.init or by calling the methods available to KlevuConfig as shown above.
Updated 29 Apr 2024
Did this page help you?