In order to comply with data privacy regulations, data tracking activity on the Web SDK can be stopped entirely using the method stopWebTracking(). This method will sync data logged prior to when stopWebTracking() was called, and will cause all subsequent calls to the Braze Web SDK for this page and future page loads to be ignored. If you wish to resume data collection at a later point in time, you can use the resumeWebTracking() method in the future to resume data collection.

If you wish to provide users with the option to stop tracking, we recommend building a simple page with two links or buttons, one that calls stopWebTracking() when clicked, and another that calls resumeWebTracking() to allow users to opt back in. You can use these controls to start or stop tracking via other data sub-processors as well.

Note that the Braze SDK does not need to be initialized in order to call stopWebTracking(), allowing you to disable tracking for fully anonymous users.