matomo-org / matomo-sdk-ios

Matomo iOS, tvOS and macOS SDK: a Matomo tracker written in Swift
MIT License
388 stars 164 forks source link

Reset Session and IDs #417

Closed t-unit closed 1 month ago

t-unit commented 2 years ago

Currently there seems to be no way to reset session information (sessionsCount, firstVisit, ...) as well as the visitor id. I would propose some functionality that enables deleting all stored data in the user defaults for a given MatomoTracker instance that keeps the instance usable and in correct state afterwards.

One use case for this is binding the session information to a user and not to the device. E.g. calling reset after user-logout and not keeping the session count etc.

Happy to supply PR with the proposed feature.

SW-Vincent commented 1 year ago

Hi, just a question about this topic : what is the default behaviour of a session then ?

brototyp commented 1 month ago

This was implemented in #434 and will be in the next release