You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are integrating Firebase Analytics into our application as we are moving from Google Analytics to Firebase Analytics. We initialize the FIRApp instance when user logs into the application and we want to delete the FIRApp instance when user logs out of the application.
We are doing this because in our application user can switch environments (Production/Staging/QA) and we do not want to capture Production Analytics when they switch environment to say Staging. So we only initialize the default FIRApp instance when we detect that user logs into the Production Environment and delete the default FIRApp instance when they logout. We are assuming that once the default FIRApp is deleted, the tracking should stop. But when we look at the analytics, it seems to capture the screens even when the user has deleted the FIRApp instance. I haven't seen any events being captured, but screens are being captured when I delete the FIRApp instance while the app is still running. I can see the screen_views being reported in debug view.
Steps to reproduce:
On firebase console, choose an app and go to Analytics --> Debug View
Now in iOS code, Initialize the default FIRApp instance using [FIRApp config]; on a particular event say click of "Enable Analytics Button".
Start navigating across the application and you will see that debug view will show screens being reported.
Now delete the default FIRApp instance using [FIRApp defaultApp] deleteApp:^(BOOL success){}]; on a click of another button say "Disable Analytics Button". This should happen while application is still running and is not restarted or killed.
Start navigating across the application and in sometime you will see the screens being still captured in the debug view.
Hi @bbhagat , looks like there's another way to disable analytics event, which is by using [FirAnalytics setAnalyticsCollectionEnabled:false];. If the app detected that you're using Prod environment, you may re-enable it, or vise versa. Check out this documentation. Let us know if this is not the case.
Thanks for the information. I was able to stop the analytics event from getting captured after setting the flag that you mentioned above.
Is it possible to tell us (or document) the expected behavior of the deleteApp method? One can easily assume that deleteApp will delete the app and no events will be reported in future.
[READ] Step 1: Are you in the right place?
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3:
We are integrating Firebase Analytics into our application as we are moving from Google Analytics to Firebase Analytics. We initialize the FIRApp instance when user logs into the application and we want to delete the FIRApp instance when user logs out of the application.
We are doing this because in our application user can switch environments (Production/Staging/QA) and we do not want to capture Production Analytics when they switch environment to say Staging. So we only initialize the default FIRApp instance when we detect that user logs into the Production Environment and delete the default FIRApp instance when they logout. We are assuming that once the default FIRApp is deleted, the tracking should stop. But when we look at the analytics, it seems to capture the screens even when the user has deleted the FIRApp instance. I haven't seen any events being captured, but screens are being captured when I delete the FIRApp instance while the app is still running. I can see the screen_views being reported in debug view.
Steps to reproduce:
[FIRApp config];
on a particular event say click of "Enable Analytics Button".[FIRApp defaultApp] deleteApp:^(BOOL success){}];
on a click of another button say "Disable Analytics Button". This should happen while application is still running and is not restarted or killed.Relevant Code:
The text was updated successfully, but these errors were encountered: