capacitor-community / capacitor-community/firebase-analytics
Docs: What is meant by "clears all analytics data"?
- Dominant language
- Java
- Stars
- 178
- Forks
- 70
- PR merge metrics
- No merged PRs in 30d
Description
**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).
```
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."
Contributor guide
Research direction
Begin with the documentation for `.reset()` and the `FirebaseAnalytics.reset()` entry point described in the issue. Confirm whether browser Google Analytics cookies are in scope, then update the documentation to state the expected behavior and run the documentation checks if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- analytics, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100