Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase Analytics google_analytics_automatic_screen_reporting_enabled not working #2225

Open
kkim5 opened this issue Dec 3, 2020 · 56 comments
Assignees

Comments

@kkim5
Copy link

kkim5 commented Dec 3, 2020

Environment

  • Android Studio version: 4.1.1
  • Firebase Component: Analytics
  • Component version: 18.0.0 ( using bom:26.1.0)

Steps to reproduce:

I added meta-data google_analytics_automatic_screen_reporting_enabled to false in AndroidManifest.xml to disable screen view event. Yesterday screen_view was not sent as I expected but today with the same codebase, it's keep sending screen_view event. I checked on logcat using adb logcat -v time -s FA FA-SVC) as well as DebugView.

Relevant Code:

<meta-data
            android:name="google_analytics_automatic_screen_reporting_enabled"
            android:value="false" />
@google-oss-bot
Copy link
Contributor

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@vivekvijayan91
Copy link

vivekvijayan91 commented Dec 23, 2020

This happened to me too, using firebase-bom:26.2.0.

@hameno
Copy link

hameno commented Dec 23, 2020

Can confirm, events are sent automatically with the property set to false

@piotr767
Copy link

It also doesn't work with firebase-bom:26.1.1 (that includes firebase-analytics 18.0.0). This seems to be a regression because it worked about a month ago with that same firebase-analytics version: #1976. Does it depend on some configuration downloaded from Firebase servers?

@vibhorj
Copy link

vibhorj commented Jan 5, 2021

happening with me as well,

build.gradle (:app)

dependencies {
// Add these 2 lines for Firebase
implementation platform('com.google.firebase:firebase-bom:26.2.0')
// Declare the dependencies for the desired Firebase products without specifying versions
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-analytics-ktx'

AndroidManifest.xml <meta-data android:name="google_analytics_automatic_screen_reporting_enabled" android:value="false" />

@piotr767
Copy link

piotr767 commented Jan 6, 2021

It seems to depend on particular device or system version.

I created a simple Android TV app that lets you test if automatic screen reporting is disabled: https://github.com/piotr767/firebase-analytics-test.
You just need to paste the google-services.json for your Firebase project.

When I run it on Android TV emulator with API 28 image it works correctly (no automatic screen events are reported) but when I run it on my physical Android TV device with API 28 it doesn't work (all screen events are reported).
I saw it working correctly on my physical device about a month ago though.

@eburley are there any system settings / configs that can affect this option?

@sonphan12
Copy link

sonphan12 commented Mar 12, 2021

Any update on this issue?

@ersen-lw
Copy link

ersen-lw commented Mar 22, 2021

I am encountering the same issue. Android platform is reporting many (not set) screen view events.

I can reproduce the issue on debug builds and release builds (obfuscated).
On DebugView I can see two screen_view events being tracked. The first is an Activity that hosts a Fragment.
The screen event for the Activity (NavigationActivity) does not have the firebase_screen parameter hence the (not set) that is being seen.

image

I also noticed that this NavigationActivity screen_view event also has this property.

image

Which is a good way to debug and check if you are encountering this issue.

Dependencies

I am not using BoM.

    implementation "com.google.firebase:firebase-messaging:21.0.0"
    implementation 'com.google.firebase:firebase-analytics:18.0.0'
    implementation 'com.google.firebase:firebase-crashlytics:17.3.0'
+--- com.google.firebase:firebase-analytics:18.0.0
|    +--- com.google.android.gms:play-services-measurement:18.0.0
|    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
|    |    +--- com.google.android.gms:play-services-ads-identifier:17.0.0
|    |    |    \--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|    |    +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|    |    +--- com.google.android.gms:play-services-measurement-base:18.0.0
|    |    |    \--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|    |    +--- com.google.android.gms:play-services-measurement-impl:18.0.0
|    |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |    +--- androidx.core:core:1.0.0 -> 1.3.2 (*)
|    |    |    +--- com.google.android.gms:play-services-ads-identifier:17.0.0 (*)
|    |    |    +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|    |    |    +--- com.google.android.gms:play-services-measurement-base:18.0.0 (*)
|    |    |    \--- com.google.android.gms:play-services-stats:17.0.0 (*)
|    |    \--- com.google.android.gms:play-services-stats:17.0.0 (*)
|    +--- com.google.android.gms:play-services-measurement-api:18.0.0
|    |    +--- com.google.android.gms:play-services-ads-identifier:17.0.0 (*)
|    |    +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|    |    +--- com.google.android.gms:play-services-measurement-base:18.0.0 (*)
|    |    +--- com.google.android.gms:play-services-measurement-sdk-api:18.0.0
|    |    |    +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|    |    |    \--- com.google.android.gms:play-services-measurement-base:18.0.0 (*)
|    |    +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
|    |    +--- com.google.firebase:firebase-common:19.3.0 -> 19.4.0 (*)
|    |    +--- com.google.firebase:firebase-components:16.0.0 -> 16.0.1 (*)
|    |    +--- com.google.firebase:firebase-installations:16.3.2 -> 16.3.4 (*)
|    |    +--- com.google.firebase:firebase-installations-interop:16.0.0 (*)
|    |    \--- com.google.firebase:firebase-measurement-connector:18.0.0 (*)
|    \--- com.google.android.gms:play-services-measurement-sdk:18.0.0
|         +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|         +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|         +--- com.google.android.gms:play-services-measurement-base:18.0.0 (*)
|         \--- com.google.android.gms:play-services-measurement-impl:18.0.0 (*)

AndroidManifest

<application .....

        <meta-data
            android:name="google_analytics_automatic_screen_reporting_enabled"
            android:value="false" />

    </application>

Screen Log Call

            firebaseAnalyticsTracker.logEvent(
                FirebaseAnalytics.Event.SCREEN_VIEW,
                Bundle().apply {
                    putString(FirebaseAnalytics.Param.SCREEN_NAME, screenName)
                    putString(FirebaseAnalytics.Param.SCREEN_CLASS, codeName)
                }
            )

I am going to try use BoM now and report back my findings.

@ersen-lw
Copy link

ersen-lw commented Mar 22, 2021

I have changed the code to use BOM:26.7.0. This pulled in version 18.0.2 of the Firebase Analytics SDK. The issue still occurs with this change.

    implementation platform('com.google.firebase:firebase-bom:26.7.0')
    implementation "com.google.firebase:firebase-messaging"
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'com.google.firebase:firebase-crashlytics'
+--- com.google.firebase:firebase-analytics -> 18.0.2
|    +--- com.google.android.gms:play-services-measurement:18.0.2
|    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
|    |    +--- com.google.android.gms:play-services-ads-identifier:17.0.0
|    |    |    \--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|    |    +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|    |    +--- com.google.android.gms:play-services-measurement-base:18.0.2
|    |    |    \--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|    |    +--- com.google.android.gms:play-services-measurement-impl:18.0.2
|    |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |    +--- androidx.core:core:1.0.0 -> 1.3.2 (*)
|    |    |    +--- com.google.android.gms:play-services-ads-identifier:17.0.0 (*)
|    |    |    +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|    |    |    +--- com.google.android.gms:play-services-measurement-base:18.0.2 (*)
|    |    |    \--- com.google.android.gms:play-services-stats:17.0.0 (*)
|    |    \--- com.google.android.gms:play-services-stats:17.0.0 (*)
|    +--- com.google.android.gms:play-services-measurement-api:18.0.2
|    |    +--- com.google.android.gms:play-services-ads-identifier:17.0.0 (*)
|    |    +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|    |    +--- com.google.android.gms:play-services-measurement-base:18.0.2 (*)
|    |    +--- com.google.android.gms:play-services-measurement-sdk-api:18.0.2
|    |    |    +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|    |    |    \--- com.google.android.gms:play-services-measurement-base:18.0.2 (*)
|    |    +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
|    |    +--- com.google.firebase:firebase-common:19.3.0 -> 19.5.0 (*)
|    |    +--- com.google.firebase:firebase-components:16.0.0 -> 16.1.0 (*)
|    |    +--- com.google.firebase:firebase-installations:16.3.2 -> 16.3.5 (*)
|    |    +--- com.google.firebase:firebase-installations-interop:16.0.0 -> 16.0.1 (*)
|    |    \--- com.google.firebase:firebase-measurement-connector:18.0.0 (*)
|    \--- com.google.android.gms:play-services-measurement-sdk:18.0.2
|         +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|         +--- com.google.android.gms:play-services-basement:17.0.0 -> 17.1.1 (*)
|         +--- com.google.android.gms:play-services-measurement-base:18.0.2 (*)
|         \--- com.google.android.gms:play-services-measurement-impl:18.0.2 (*)

@ersen-lw
Copy link

ersen-lw commented Mar 22, 2021

Not sure if the following will help. I went back to the original PR where I first implemented the manual screen tracking. I checked it and on this old version the manual screen tracking was working.

Here is an image of the DebugEvents screen. Compare with the one I posted above. Only one screen event is logged.

image

Here is the dependency tree for this version of analytics (17.5.0)

+--- com.google.firebase:firebase-analytics:17.5.0
|    +--- com.google.android.gms:play-services-measurement:17.5.0
|    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
|    |    +--- com.google.android.gms:play-services-ads-identifier:17.0.0
|    |    |    \--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    +--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    +--- com.google.android.gms:play-services-measurement-base:17.5.0
|    |    |    \--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    +--- com.google.android.gms:play-services-measurement-impl:17.5.0
|    |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |    +--- androidx.core:core:1.0.0 -> 1.3.1 (*)
|    |    |    +--- com.google.android.gms:play-services-ads-identifier:17.0.0 (*)
|    |    |    +--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |    +--- com.google.android.gms:play-services-measurement-base:17.5.0 (*)
|    |    |    \--- com.google.android.gms:play-services-stats:17.0.0 (*)
|    |    \--- com.google.android.gms:play-services-stats:17.0.0 (*)
|    +--- com.google.android.gms:play-services-measurement-api:17.5.0
|    |    +--- com.google.android.gms:play-services-ads-identifier:17.0.0 (*)
|    |    +--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    +--- com.google.android.gms:play-services-measurement-base:17.5.0 (*)
|    |    +--- com.google.android.gms:play-services-measurement-impl:17.5.0 (*)
|    |    +--- com.google.android.gms:play-services-measurement-sdk-api:17.5.0
|    |    |    +--- com.google.android.gms:play-services-basement:17.0.0 (*)
|    |    |    \--- com.google.android.gms:play-services-measurement-base:17.5.0 (*)
|    |    +--- com.google.android.gms:play-services-tasks:17.0.0 (*)
|    |    +--- com.google.firebase:firebase-common:19.3.0 (*)
|    |    +--- com.google.firebase:firebase-components:16.0.0 (*)
|    |    +--- com.google.firebase:firebase-installations:16.3.2 (*)
|    |    +--- com.google.firebase:firebase-installations-interop:16.0.0 (*)
|    |    \--- com.google.firebase:firebase-measurement-connector:18.0.0 (*)
|    \--- com.google.android.gms:play-services-measurement-sdk:17.5.0
|         +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|         +--- com.google.android.gms:play-services-basement:17.0.0 (*)
|         +--- com.google.android.gms:play-services-measurement-base:17.5.0 (*)
|         \--- com.google.android.gms:play-services-measurement-impl:17.5.0 (*)

Plugin Dependencies

'com.google.gms:google-services:4.3.3'
'com.android.tools.build:gradle:4.0.1'
Gradle 6.6

@ersen-lw
Copy link

ersen-lw commented Mar 23, 2021

It seems to depend on particular device or system version.

I created a simple Android TV app that lets you test if automatic screen reporting is disabled: https://github.com/piotr767/firebase-analytics-test.
You just need to paste the google-services.json for your Firebase project.

When I run it on Android TV emulator with API 28 image it works correctly (no automatic screen events are reported) but when I run it on my physical Android TV device with API 28 it doesn't work (all screen events are reported).
I saw it working correctly on my physical device about a month ago though.

@eburley are there any system settings / configs that can affect this option?

I am noticing this is well. Samsung S10 running Android 10 and Pixel 2 running Android 11, I encounter the issue yet on a emulator running the same Android version, it seems to be working.

I have some data from the analytics itself that may help.

The app has been using version 18.0.0 (Non BoM).
When filtering the data, it seems the problem is occurring on Android 8 and over.
The minimum Android version supported is Android 6.0. There has been no (not set) events reported on Android 6 and 7 devices and there is users on these versions.

@berendn
Copy link

berendn commented Mar 23, 2021

@ersen-lw I did the same check in Firebase Analytics and filtered the screen_view events on OS with version. All versions* had (not set) values.
image
(for some reason the header of the column is always Screen class)
*I used the version numbers from the Crashlytics Operating system filter
firebase-bom:26.7.0

@eliasassuncao
Copy link

I'm having the same problem, even putting the value in the manifest, it still sends the screen_view automatically.

@cassioalmeida2
Copy link

Estou passando pelo mesmo problema utilizando o e ele continua enviando evento automaticamente.

@cchcc
Copy link

cchcc commented Apr 4, 2021

It still happens in bom 26.7.0.
Any progress?

@AdriCardenas
Copy link

Same issue here. I cannot disable auto screen reporting with the metadata. Even if i send the screen_view event i see the log duplicate with auto screen event and the manual event.

@berendn
Copy link

berendn commented Apr 13, 2021

Still happens in BoM 27.0.0

@jamerdoo
Copy link

Same issue here...
any solution?

@munyeong48
Copy link

The gradle version that can be used to block automatic screen view right now is as follows.
implementation 'com.google.firebase:firebase-analytics:17.5.0'
implementation 'com.google.firebase:firebase-analytics:17.6.0'
implementation platform('com.google.firebase:firebase-bom:25.8.0')
implementation platform('com.google.firebase:firebase-bom:25.13.0')

@Daniel-Dudek
Copy link

Hello to all,

The new version of Firebase Bom: 28.0.1 containing the Firebase Analytics: 19.0.0.0 version correctly disables the automatic screen_view event that we want to remove.

Here is the data collection for the last 30 min:

image
As you can see the event is from the custom app. The event that I collect is page view with the parameters that I want

image
Here are all the events that have been launched and not the screen_view one :)

@jinyanliu
Copy link

I think it's broken again on Firebase Bom: 28.0.1 and 28.1.0. When I first added google_analytics_automatic_screen_reporting_enabled and set it to false, and upgraded firebase bom to 28.0.1, it worked like the above comment. But today when I checked it, both on 28.0.1 and 28.1.0, they are still logged...

@maxbeaudoin
Copy link

I'm having this problem with com.google.firebase:firebase-bom:28.1.0

@ersen-lw
Copy link

ersen-lw commented Jun 28, 2021

I have observed the same issue.

When I tried 28.0.1, the manual screen tracking was working, however, today I noticed manual tracking has stopped working where certain Activities started to be logged.
I tried 28.2.0 and the same problem occurs.

@TaewonKimPayPay
Copy link

Still does not work with firebase-analytics version 19.0.0

@markshim1
Copy link

Any update?

@hameno
Copy link

hameno commented Jul 20, 2021

@rlazo @eburley ??? it's been more than 6 months

@allenktv
Copy link

allenktv commented Aug 9, 2021

Apologies for the miscommunication, there were issues on our end and the potential fix will instead be out on the next release, scheduled for August 19th.

@MadihaAthar-zz
Copy link

MadihaAthar-zz commented Aug 17, 2021

@allenktv is it fixed ?
please share bom version in which it is fixed ?

@G00fY2
Copy link

G00fY2 commented Aug 20, 2021

Looks like there was no Android release yesterday. Any new ETA?

I assume this issue has a somewhat high priority for many of us, cause it basically breaks the manual screen tracking.

@allenktv
Copy link

The potential fix has been released. Please download the latest version to see if the issue has been resolved. Thanks!

@nicolasguillen-comparis

Still the same issue with 19.0.1.

@G00fY2
Copy link

G00fY2 commented Aug 23, 2021

Can confirm, the issue still exists.

@seanKenkeremath
Copy link

Also still seeing the issue. Our app requires manual screen tracking so we are hoping for a fix soon

@davyskiba
Copy link

I'm also still seeing the issue, is there any foreseeable date for the fix?

@JBlaz
Copy link

JBlaz commented Aug 27, 2021

Yeah, a fix would be great, I spent that last two days thinking I was doing something wrong only to find this thread and confirm I am as smart as I thought I was. This makes using Path exploration extremely difficult to use (at least for our application) and in some cases totally useless.

@ersen-lw
Copy link

ersen-lw commented Sep 3, 2021

I tried com.google.firebase:firebase-bom:28.4.0 and experienced the same issues. Activities are being automatically tracked.

@bishiboosh
Copy link

@allenktv any news about that ? This is a huge blocker for us

@allenktv
Copy link

Our team is looking into the issue now

@allenktv allenktv removed their assignment Sep 10, 2021
@allenktv
Copy link

Please assign the issue to @chriseman

@chriseman
Copy link

Can someone here that is experiencing the issue recreate the issue while capturing the logs and comment the logs below. Please omit any sensitive information.

Commands to debug:
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb shell setprop debug.firebase.analytics.app com.your.app.package
adb logcat -v time -s FA FA-SVC

https://firebase.google.com/docs/analytics/debugview

@TLatTXR
Copy link

TLatTXR commented Sep 29, 2021

We are still seeing the same issue on the Unity SDK for Android on the latest version 8.3.0.

/FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAULT]
I/FirebaseCrashlytics: Initializing Firebase Crashlytics 17.4.1
I/FirebaseInitProvider: FirebaseApp initialization successful

No other logs to note about Firebase other than it does initialize and track all of Firebase's automatic calls even if we have the <meta-data android:name="google_analytics_automatic_screen_reporting_enabled" android:value="false" /> call in the manifest.

@GiorgosCH
Copy link

Hi, Do we have any updates about this issue?
Thanks

@chriseman
Copy link

Hi, Do we have any updates about this issue? Thanks

@GiorgosCH

We need more information about the issue if you are capable please do the following.

Recreate the issue while capturing the logs and comment the logs below. Please omit any sensitive information.

Commands to debug:
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb shell setprop debug.firebase.analytics.app com.your.app.package
adb logcat -v time -s FA FA-SVC

https://firebase.google.com/docs/analytics/debugview

@GiorgosCH
Copy link

Hi @chriseman,

I am talking about this specific treat issue "Firebase Analytics google_analytics_automatic_screen_reporting_enabled not working #2225". Don't get why I need to provide you details about something that is broken from Dec 2020 and well explained in this treat.

At the moment I see different behavior in my android app logs and looks like the automated screen_view event is not anymore being logged but I would like to get also the confirmation from someone else or even better from Firebase.

Thanks a lot
George

@chriseman
Copy link

Hi @chriseman,

I am talking about this specific treat issue "Firebase Analytics google_analytics_automatic_screen_reporting_enabled not working #2225". Don't get why I need to provide you details about something that is broken from Dec 2020 and well explained in this treat.

At the moment I see different behavior in my android app logs and looks like the automated screen_view event is not anymore being logged but I would like to get also the confirmation from someone else or even better from Firebase.

Thanks a lot George

That is good to hear George.

For those users that are still experiencing the issue please recreate the issue while capturing the logs and comment the logs below. Please omit any sensitive information. This will help up us solve the general issue.

Commands to debug:
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb shell setprop debug.firebase.analytics.app com.your.app.package
adb logcat -v time -s FA FA-SVC

https://firebase.google.com/docs/analytics/debugview

@ersen-lw
Copy link

Hi all, I checked the DebugView today and I am no longer seeing any automatic screen events, only the ones I manually track 🎉 .

I didn't update the SDK and still using com.google.firebase:firebase-bom:28.3.1

@avalanchas
Copy link

I decided to send logs for this issue and sat down to reproduce this, but - much like other commentors before me - cannot do it anymore, neither with standalone analytics: >= 19.x or firebase-bom >= 28.x

what happened here? Does it turn out to have been a server issue, that was therefore fixed "silently"? Would love a quick comment from the team on this, and an info where I can access a changelog for server releases if possible?

@seanKenkeremath
Copy link

Also wondering what happened here. I'm glad the issue seems to be fixed, but I'd like the peace of mind to know the issue was specifically identified, reproduced and fixed. Otherwise I worry about it randomly starting to happen again

@lukas1
Copy link

lukas1 commented Nov 30, 2021

Hi all, I checked the DebugView today and I am no longer seeing any automatic screen events, only the ones I manually track 🎉 .

Not sure if related, but now I don't see ANY events, unless I ENABLE automatic screen reporting 🤦

@rahul-pandey-30057486
Copy link

Hi All ,
I have applied few things:
firebase_analytics: ^9.0.3
firebase_core : ^1.10.0

  1. Initialised the Firebase in main
  2. For Android you have to add in manifest.
  3. For iOS FirebaseScreenReportingEnabled = No.

Then automatic screen capturing ll not performed. As a developer you can customise screen name.

Happy Coding :)
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests