eraseLocalHistory
Erases every identity association Visitor Switching has stored on this device, then generates a new anonymous visitor ID and returns it.
Erased data: the hashed identities and the visitor IDs associated with them. No prior association survives the call.
If the erasure can't be stored, this fails with a PersistenceException and nothing is erased, but the new visitor ID is still used until the app is relaunched: it is emitted to subscribers and added to events. On the next launch, the previous visitor ID and every stored association are restored.
If an identity is present (see VisitorIdManager) it is immediately associated with the new visitor ID, so one new association may exist afterwards. To erase without any association remaining, remove the identity from the data layer first.
This is a device-only operation intended for data-deletion requests. It does not remove the identity from the data layer, and it does not delete or alter server-side visitor profiles; those must be handled separately.
Return
The new visitor ID, or a failure if visitor ID handling is disabled.