Google Analytics Screens tracking last for 30 mins only

Viewed 380

I was able to integrate firebase analytics @react-native-firebase/analytics@12.0.0, I used logScreenView for screen tracking

import analytics from '@react-native-firebase/analytics';
import { NavigationContainer } from '@react-navigation/native';

<NavigationContainer
  ref={navigationRef}
  onStateChange={async (state) => {
    const previousRouteName = routeNameRef.current;
    const currentRouteName = getActiveRouteName(state);

    if (previousRouteName !== currentRouteName) {
      await analytics().logScreenView({
        screen_name: currentRouteName,
        screen_class: currentRouteName,
      });
    }

My issue is those tracking of screen lasts for 30 mins only on google analytics dashboard, and couldn't find the right way to filter those reports for longer duration

enter image description here

and want to know if there is a way to add those page/screen on Pages and Screens tab along side MainActivity

enter image description here

1 Answers

I think you could switch filter option to 'Page title and screen name' in GA console. To custom screen name, you have to use logScreenView with 2 params. (screen_name, screen_class) refs: https://reactnavigation.org/docs/screen-tracking/

in my team, using screen_class as route name and screen_name as meaning of page title with route param. (like page_detail_01, page_detail_02 ...)

Related