Get Firebase analytics collection enable status - ios

For firebase analytics, we can enable/disable analytics collection by calling
- (void)setAnalyticsCollectionEnabled:(BOOL)analyticsCollectionEnabled
But how can we get the enable status of Firebase analytics? Is there a method like:
- (BOOL)isAnalyticsCollectionEnabled

Unfortunately you can't. Analytics are enabled by default, so you can perfectly track this yourself. From Firebase documentation:
Sets whether analytics collection is enabled for this app on this device. This setting is persisted across app sessions. By default it is enabled.
But, if your code eventually loses track of the current state, you should probably set it again to the desired on/off status just to be extra sure ;-)

Related

Firebase DebugView events not being filtered out from Analytics data

According to the Firebase documentation, enabling debug mode on iOS with -FIRDebugEnabled should also exclude events from appearing in the main analytics reports:
I know that I've configured -FIRDebugEnabled correctly because I see the events in Firebase's DebugView. However, after an hour or so they also appear in my overall analytics data, which is not desirable. I've tried searching through the Firebase analytics pages for an option to exclude this data or find a query to remove debug events, but I haven't found anything.
I'd like to know if I'm missing something in order to ensure that debug events only appear in DebugView and not in the main Analytics section, as the documentation implies.
It turns out, you have to use a filter in the Google Analytics property settings in order to get this functionality:
Go to the Admin settings page (in Google Analytics, not from Firebase).
Click on "Data Settings" for your property.
Click on "Data Filters."
Click "Create Filter."
Choose "Developer Traffic."
Set the filter to "active" and then click "create."
I think the Firebase documentation is outdated, since it doesn't happen automatically.

Disable crashlytics/Fabric at runtime in iOS

I want to disable the crashlytics at run time in iOS app.
I could see it is possible using the latest Firebase api. How to do this with old Fabric/Crashlytics api?
Update: My app will get locked if the user goes to background, if the app is locked then without user authentication I shouldn't call any api(http request, accessing database). So I want to restrict the crashlytics api as well. When the app comes to foreground, crashlytics/fabric calling the http request so I want to avoid this if the user is not authenticated.
Fabric/Firebaser here - you can conditionally choose to initialize or skip the initialization of Fabric with an opt-in flag set by your user, but there isn't a (supported) way to totally disable Crashlytics from running when it has already been initialized. There is a way, however, to control your submission behavior with Crashlytics, but might not suit your use case. Also, check out these docs for more information on the opt-in/opt-out mentioned above.

When does Firebase Analytics track my users?

I'm working on a new version of my app that implements a new online mode, the old offline mode however will still be accessible. I chose to use Firestore as my database and I just noticed that Google tracks on what VC my users are without me having to set up anything regarding analytics.
While calls to Firebase just happen if the user chose to use the online mode I still use the same VC for both modes and that means that even if the user is in offline mode Firebase gets imported. My question is now when it is that google tracks the user on the VC. So if the user just gets tracked if the VC makes a call, or as soon as I import Firebase into the VC class. Or stated differently if I will just see the users using online mode in the analytics dashboard, or all my users.
(sorry for my english :) )
Google Analytics for Firebase automatically tracks screen views in your app. You can temporarily disable analytics in your app and then reenable in your code, or you can permanently disable it.

Firebase custom event for ios "notification_open" not showing on dashboard

I know that notification_open is used by Firebase on Android but not on ios.
Can I use notification_open as a custom event name on iOS app?
You shouldn't use preserved event names in Automatically collected events, after I change to something like ios_notification_open, it shows up in Firebase Analytics dashboard

Is it necessary to give Opt-In/Opt-Out UIAlertView for using Google Analytics in ios?

I am using Google Analytics in my ios App so is it necessary to show this(see Image) kind of Alert box to user so that he can opt out for sending data to analytics.
As we are sending data to 3rd party( Google), I just want to make sure we are not violating any Apple policies.
Thanks
In sample purpose the google analytics show this message. In real time no need of this, in every 30 minutes the session automatically cleared. If you want to close the session in manually use optout for stop the tracking else part no need of this.
If you are use the analytics and submit the app in appstore , the apple does not reject your app. I used google anaytics in my apps. The app also availabe in app store

Resources