-
Notifications
You must be signed in to change notification settings - Fork 151
Description
We have a use case where we want to start tracking with AnalyticsBrowser using in-memory storage only—this lets us handle tracking before the user has consented to persistent storage. Once the user gives consent (e.g., via a cookie banner), we’d like to switch to using localStorage and cookies for persistence.
The issue we’re facing is that the disableClientPersistence flag and the storage providers seem to be fixed after calling load(), and from what I understand, reloading the library isn’t recommended. This makes it tricky to upgrade the storage behavior mid-session based on consent.
Is there a way to support this kind of opt-in persistence flow with AnalyticsBrowser? Or would it be possible to add support for dynamically switching the storage strategy after initialization?
Thanks!