Firebase Analytics Events - currentScreen is always screen_view

1,171

Answering my own question and thus wasting the bounty is hard but thats the way it is. Here are my findings:

The user provided screenName in the API gets submitted to the Firebase Analytics Dashboard but you need to drill down on the event "screen_view" to see the actual clicked screen Names you supplied. Unfortunately the user supplied Name wont be shown in the debugView of the Firebase Analytics console which got me on the wrong trail in the first place, thinking that its missing altogether, which is wrong.

tl;dr: screenName is just a parameter of screen_view Event and its right inside the screen_view event which you can drill down on.

Share:
1,171
Logemann
Author by

Logemann

Entrepreneur in the software space located in Osnabrück and Berlin. Likes, has experiences and partly certifications in the following areas: Java, Flutter, Amazon AWS, Docker, Javascript, Firebase, React, Typescript and much more stuff i wont expose here ;-) Professionally you can reach me at okaycloud.de or on my personal profile page at logemann.org

Updated on December 14, 2022

Comments

  • Logemann
    Logemann over 1 year

    On my way implementing firebase analytics into my flutter app, i cant get the proper events to trigger or i dont get how this should work. Lets take the following code:

    firebaseAnalytics.setCurrentScreen(screenName: "Dashboard");
    

    When i trigger this event, in the Firebase Analytics debug view i see this:

    Firebase Analytics DebugView

    The same when i trigger the screen changes automatically via:

    navigatorObservers: [
            FirebaseAnalyticsObserver(analytics: appState.firebaseAnalytics),
          ],
    

    So my question is: Why does Analytics prints out "screen_view" instead of "Dashboard" or any other name i have in my named routes ??

    The screen name is in fact submitted to the inner workings of the API cause i debugged firebase_analytics.dart on that place:

    Future<void> setCurrentScreen(
          {@required String screenName,
          String screenClassOverride = 'Flutter'}) async {
        if (screenName == null) {
          throw ArgumentError.notNull('screenName');
        }
    
        await _channel.invokeMethod<void>('setCurrentScreen', <String, String>{
          'screenName': screenName,
          'screenClassOverride': screenClassOverride,
        });
      }