37

Is there a way to disable Firebase analytics automatic screen reporting?

I have a few UIViewCOntroller's that i don't want to be reported.

So i want to manage the screen reporting my self.

Setting FirebaseAutomaticScreenReportingEnabled to NO didn't work

Thanks

9 Answers 9

31

For 2018, your Info.plist will have entries like this:

<key>FIREBASE_ANALYTICS_COLLECTION_ENABLED</key>
<string>NO</string>
<key>FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED</key>
<string>YES</string>
<key>FirebaseScreenReportingEnabled</key>
<false/>
  1. Critical: Surprisingly this is in >>> YOUR <<< Info.plist. NOT the OTHER strange plist added by Google!

There are two plists!!!

  1. In this answer I have shown the exact, new, syntax needed - for late 2018.

  2. Edit your plist as "source". Paste in the above. It will not work if you try to use the convenient "value entry" interface in Xcode.

You will at last, finally, see this ...

enter image description here

2019...

Unfortunately, the details of this operation seem to be changing from time to time.

So it is uncertain if this precise procedure still works in all cases and in all variations. Good luck!

8
  • 2
    Note that it says info.plist. As @JeffRegan says above "I spent too long trying to get this to work. Add FirebaseScreenReportingEnabled to your project's Info.plist. Adding it to the GoogleService-Info.plist didn't work". Well...add me to that list :)
    – pbodsk
    Aug 31, 2018 at 13:09
  • 1
    precisely @pbodsk , notice it is YOUR Info.plist! Not the whacky one added by Google. Please note also that I have in this answer put the EXACT, NEW, SYTNAX which you must use.
    – Fattie
    Aug 31, 2018 at 14:11
  • 2
    and it worked perfectly, I could copy and paste your code and all was well, so thank you for this :)
    – pbodsk
    Sep 1, 2018 at 7:45
  • 1
    @Fattie would you know the equivalent of these to Android? Dec 22, 2018 at 10:31
  • 1
    @AsiGivati unfortunately I have not a clue :/ It is a fulltime job keeping up with Firebase' shenanigans. :/
    – Fattie
    Jul 3, 2022 at 15:13
20

You should be able to disable the Automatic Screen reporting by adding the plist flag FirebaseScreenReportingEnabled to Info.plist and set its value to NO (Boolean). Note that the value must be a Boolean and not a String.

Google Analytics for Firebase does NOT support the case of manual-only screen reporting. The plist flag FirebaseAutomaticScreenReportingEnabled has been renamed to FirebaseScreenReportingEnabled to reduce that confusion. We support automatic + manual screen reporting or no screen reporting at all.

4
  • 3
    I try to switch from Google Analytics to Firebase and realized Automatic Screen Reporting in Firebase does not work in all cases. It depends on how the view controllers are managed. In my case it also tracks screens that are invisible to the user because they are temporarily out of window bounds. It should be possible to disable automatic screen tracking and only track manually in order to no corrupt the metrics.
    – Manuel
    Sep 10, 2017 at 3:08
  • 13
    I spent too long trying to get this to work. Add FirebaseScreenReportingEnabled to your project's Info.plist. Adding it to the GoogleService-Info.plist didn't work.
    – JeffRegan
    Sep 27, 2017 at 18:35
  • 2
    Is there also a way to turn off all automatic analytics events? Such as "first_open", "session_start", etc... we have our own system and do not want the additional noise. Thanks.
    – Darko
    Nov 8, 2017 at 7:53
  • Take a look at the "disable analytics collection" doc firebase.google.com/support/guides/disable-analytics
    – AniV
    Nov 8, 2017 at 19:58
15

For 2020

On iOS, set FirebaseAutomaticScreenReportingEnabled to NO in your info.plist. On Android, set google_analytics_automatic_screen_reporting_enabled to false in your manifest.

5

In info.plist file.

Add

FirebaseScreenReportingEnabled

and make sure its value is Boolean

and make it to

NO

.

2
  • It doesn't seem to be possible. The value ends up changing to 0 when Boolean.
    – JCraine
    Jul 14, 2022 at 7:19
  • 0 is false. It's correct. Jul 14, 2022 at 11:06
4

Make Sure that you changed the Type of the Key to "Boolean" (Not a String)

Info.plist

3
  • 1
    I took type as Boolean and entered NO, it automatically takes it as 0 Mar 22, 2022 at 13:30
  • @MacDeveloper Happening here too. Did you ever figure this out?
    – JCraine
    Jul 14, 2022 at 7:20
  • @MacDeveloper 0 means false, try to view the info.plist file in another IDE except for XCode, you will see that it is set to false as required. Jul 29, 2022 at 5:31
3

In case anybody is unfamiliar with editing Info.plist, false value is zero 0

enter image description here

1
  • FirebaseAppDelegateProxyEnabled can break push notifications!
    – Nike Kov
    May 26, 2023 at 12:03
3

For 2022

This worked for me, based on this official blog post (from 2020):

iOS

Inside XCode - in Info.plist set FirebaseScreenReportingEnabled to type Boolean and select the value "NO", which will change to 0 - this is fine.

The Info.plist will then read like this if you open it directly, outside of XCode:

<key>FirebaseAutomaticScreenReportingEnabled</key>
<false/>

Android

Inside AndroidManifest.xml add:

<manifest>
    <application>
        <meta-data
            android:name="google_analytics_automatic_screen_reporting_enabled"
            android:value="false" />
        <!-- ... -->
    </application>
</manifest>

source also docs here

Don't forget to rebuild.

1

your flag FirebaseScreenReportingEnabled in plist should be of type Boolean

1

Swift 4

Firebase Error Console

make sure this two line is Boolean

FirebaseAppDelegateProxyEnabled Boolean No

FirebaseScreenReportingEnabled Boolean No

1
  • FirebaseAppDelegateProxyEnabled can break push notifications!
    – Nike Kov
    May 26, 2023 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.