Flutterfire: [Firebase Analytics] setCurrentScreen("Analytics Demo") translates to general screen_view in dashboard

Created on 13 Oct 2019  路  1Comment  路  Source: FirebaseExtended/flutterfire

Describe the bug
Running the example code "Analytics Demo" also triggers that function:

  Future<void> _testSetCurrentScreen() async {
    await analytics.setCurrentScreen(
      screenName: 'Analytics Demo',
      screenClassOverride: 'AnalyticsDemo',
    );
    setMessage('setCurrentScreen succeeded');
  }

The result in the dashboard of Firebase Analytics is only the event "screen_view" which is kind of way too general and doesnt include the name "Analytics Demo".

To Reproduce
Steps to reproduce the behavior:

Run the example code (https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_analytics/example/lib) and check the Firebase Analytics console (DebugView, StreamView or later on Events)

Expected behavior
I would expect that i see event names supplied with setCurrentScreen("Analytics Demo") call. Here "Analytics Demo" instead of "screen_view" in the console.

Additional context
i debugged the underlying code in firebase_analytics.dart and my supplied screenNames were in fact correctly submitted to:

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,
    });
  }

So the invokeMethod() call gets all the correct data. What happens then is beyond my knowledge ;-)

bug

Most helpful comment

After digging some more, i noticed that the supplied screenName is just a parameter for the general event screen_view. You can drill down into the screen_views and see the user supplied screenNames. So everything fine, i just didnt get how the Analytics GUI works. Sorry for the noise, but perhaps someone having the same problems can learn from my answer here.

But it would be anyway nice to log the supplied user data in the debugView. This way it would be really a debugView. Just seeing the event _screen_name_ doesnt cut it for a "debug" view in my oppinion.

>All comments

After digging some more, i noticed that the supplied screenName is just a parameter for the general event screen_view. You can drill down into the screen_views and see the user supplied screenNames. So everything fine, i just didnt get how the Analytics GUI works. Sorry for the noise, but perhaps someone having the same problems can learn from my answer here.

But it would be anyway nice to log the supplied user data in the debugView. This way it would be really a debugView. Just seeing the event _screen_name_ doesnt cut it for a "debug" view in my oppinion.

Was this page helpful?
0 / 5 - 0 ratings