* Clears all analytics data for this app from the device and resets the app instance id.
What does "all analytics data" mean? I thought that this would clear the Google Analytics cookies from the web browser, but it does not.
To Reproduce
I'm using an Ionic React app with Capacitor 3 that automatically enables/disables Firebase Analytics when the user logs in (based on a value on the returned user object).
export const activateAnalytics = (status: boolean): void => {
console.log('analytics setup based on status', status);
FirebaseAnalytics.setCollectionEnabled({
enabled: status,
});
if (!status) {
FirebaseAnalytics.reset();
}
};
However, when a user with analytics disabled logs in to the Ionic app from the web, tracking stops as expected (according to Firebase Analytics real-time dashboard), but the GA cookies remain in the browser.
Is this the expected behavior (cookies remain after calling FirebaseAnalytics.reset()? If so, I suggest updating the documentation to say something like, "This does not clear the GA cookies."
In looking at the code, the reset() does not even appear to be implemented for web. I think we should update the documentation to reflect that by removing the green checkbox.
Describe the bug
In the docs for
.reset()
, it states:* Clears all analytics data for this app from the device and resets the app instance id.
What does "all analytics data" mean? I thought that this would clear the Google Analytics cookies from the web browser, but it does not.
To Reproduce
I'm using an Ionic React app with Capacitor 3 that automatically enables/disables Firebase Analytics when the user logs in (based on a value on the returned user object).
However, when a user with analytics disabled logs in to the Ionic app from the web, tracking stops as expected (according to Firebase Analytics real-time dashboard), but the GA cookies remain in the browser.
Is this the expected behavior (cookies remain after calling
FirebaseAnalytics.reset()
? If so, I suggest updating the documentation to say something like, "This does not clear the GA cookies."