Issues Tracking screen name manually in Firebase Android and iOS SDK

1,743 views
Skip to first unread message

Ricardo Cristofolini

unread,
Nov 13, 2020, 5:26:14 AM11/13/20
to Firebase Google Group
Hi, All.

We have noticed that Manual Screen tracking doesn't works when we set the SCREEN_NAME and SCREEN_CLASS Parameters as mentioned in the documentation. Also, we tried to pass the custom parameters with the default parameters but it also didn't get along with the SCREEN_VIEW event hit.

We have verified it in the Firebase DebugView and terminal logs where we have not noticed screen_name or screen_class neither the firebase_screen_class has been replaced by the above.

See DebugView screenshot:
 
image (2).png

Furthermore, in Firebase the blog it is stated that (https://firebase.googleblog.com/2020/08/google-analytics-manual-screen-view.html)

"You can log a manual screen_view just like you would any other event in Google Analytics. You can also include the two optional parameters (i) screen_name and (ii) screen_class, as well as any custom event parameters you want to include. The two optional parameters take the place of the firebase_screen and firebase_screen_class event parameters that get passed into automatically collected screen_view events."

Unfortunately, we have noticed that firebase_screen and firebase_screen_class don't effect in Android. We also tried to disable the automatic screen capturing. However, that stopped the SCREEN_VIEW completely even though we have not removed the Screen view event from the code.

The same also happens with iOS where passing a default event AnalyticsEventScreenView with either a default parameter (AnalyticsParameterScreenName) or a custom made "screen_name", does not get passed in the debug view.

Is anyone else having this problem?

Napkyn Inc. | 888.243.4619 | Twitter | LinkedIn | napkyn.com

This email, including any attachments, is for the sole use of the intended recipient and may contain confidential information. If you are not the intended recipient, please immediately notify us by reply email or by telephone, delete this email and destroy any copies. Thank you.


Namrata Bagerwal

unread,
Jul 25, 2023, 7:20:55 PM7/25/23
to Firebase Google Group
Hi team,

Is this issue resolved or any way to resolve this?
I am still facing this issue.

I am sending events with two optional parameters (i) screen_name and (ii) screen_class.

When I enabled debug view in Android Logcat, I see the events are logged as ga_screen(_sn), ga_screen(_sn) where I would have expected them to be screen_name & screen_class.

When I checked events in https://firebase.google.com/docs/analytics/debugview, they are further reported as firebase_screen and firebase_screen_class.
When I look at events in analytics.google.com with filter for platform as android, I see many of the parameters say (not set) including screen_view & screen_name.

I have also looked around few stackoverflow questions, I don't find any possible solution except setting Current Screen in onResume which is not even mentioned in the Firebase analytics documentation and now that setCurrentScreen method has been deprecated.

I don't also find a proper documentation/step by step tutorial for manually tracking screen view events, how to view them on analytics.google.com and analysing and understanding what each parameter means on analytics.google.com Events dashboard.

Any insights on the matter will be much appreciated. Thanks in advance.

Regards,
Namrata

Ricardo Cristofolini

unread,
Jul 31, 2023, 11:24:15 PM7/31/23
to Firebase Google Group
Hi, Namrata.

From my perspective, we're still having issues regarding how to track screen_views. Some approaches that I have been working with clients are:

* Use logEvent and create custom screen_view --> Because adding custom parameters to screen_view events in Android and iOS does not seem to work, this could be one solution as you disable all the default screen_view tracking events.
* Add Global parameters based on the technology you're using --> React Native, for example, allows you to set Global Parameters where you can add scree_name and screen_class for example. That would allow you to have in the Engagement > Pages and Screens that information as expected.

I'm still looking for the best approach here, but let me know what you think of the two I mentioned.

Regards,
Ricardo Cristofolini

Ricardo Cristofolini

unread,
Aug 1, 2023, 1:01:14 PM8/1/23
to Firebase Google Group
To whoever ended up with the same problem, I did a bit more research and found out that, on October 27, 2020, Firebase documentation changed screen_view reserved name rule for both Android and iOS. That means it's possible to add an event called screen_view. That makes me believe that using the Analytics.logEvent("screen_view", []) with the screen_name and screen_class parameters would solve the issue we're having.

However, based on the Flood-it! demo property from Google, there seems to be an implementation that it's working:

Screenshot 2023-08-01 112415.png


Here we have FIRootViewController and FIGameOverViewController for example are screens from iOS (there are no Android views on those). This means that - likely - the developers did not disable the default screen tracking which leads me to 2 options:

1) They either add the game_over, iap, out_of_steps and other custom screen names into the implementation code
2) They add a custom screen_view event manually through the Analytics.logEvent function because we can also see the screen_view event under Engagement > Events:

Screenshot 2023-08-01 112610.png

When added the Screen Path and Class those names can be seen as well (Although they were not registered as custom parameters):

Screenshot 2023-08-01 112958.png

That leads me to the following questions:

* Should we use Analytics.logEvent("screen_view", parameters:[]) to pass the screen class and screen name as custom parameters? or
* Should we use the default screen_view measurement guide to pass screen class and screen name as custom parameters? or
* Should we use both?

I hope this sparks some further details as to what is the best approach here.

Regards,
Ricardo

Alexandre Papanis

unread,
Jul 3, 2024, 4:12:28 PM (13 hours ago) Jul 3
to Firebase Google Group
Hi everyone. I was facing this issue as well. After some changes, I finally make it work!

I have followed these steps:
- Updated Firebase to the most recent version (10.28.1).
- Kept sending screen_view automatically.
- Sent manually screen_view event, however using only the screenName parameter. When I sent the screen_view event along with screenClass parameter, the event never appeared on Firebase. 

Analytics.logEvent(AnalyticsEventScreenView, parameters: [AnalyticsParameterScreenName: "your_screen_name"])

I hope I have helped!

Regards,
Alexandre
Reply all
Reply to author
Forward
0 new messages