diff --git a/documentation/ANONYMIZE.md b/documentation/ANONYMIZE.md index 9077744..b4be6f1 100644 --- a/documentation/ANONYMIZE.md +++ b/documentation/ANONYMIZE.md @@ -1,8 +1,18 @@ # Anonymize customer -Anonymize is a feature that allows you to switch users. Typical use-case is user login/logout. +Anonymize will delete all information stored locally and reset the current SDK state. New customer will be generated, install and session start events tracked. Push notification token from the old user will be wiped and tracked for the new user, to make sure the device won't get duplicate push notifications. -Anonymize will delete all stored information and reset the current customer. New customer will be generated, install and session start events tracked. Push notification token from the old user will be wiped and tracked for the new user, to make sure the device won't get duplicate push notifications. +Invoking of this method, SDK is going to: + +* Push notification token is wiped from currently logged customer (also removed from online storage) to prevent of receiving notifications for this customer +* Local repositories and caches are cleared excluding tracked events +* New session start is tracked if `automaticSessionTracking` is enabled +* New customer record is created (new soft ID as `cookie` is generated) +* Previous push notification token is assigned to new customer +* In-app messages, In-app content block and App Inbox are preloaded for new customer +* New `installation` event is tracked for new customer + +Typical use-case for `Exponea.anonymize` usage is user logout. ``` typescript Exponea.anonymize()