"expo": "45.0.0",
"expo-firebase-analytics": "~7.0.0",
According to the documentation, I wrote a function like this to track the screens:
onReady={() => {
routeNameRef.current = navigationRef.getCurrentRoute().name;
}}
onStateChange={async () => {
const previousRouteName = routeNameRef.current;
const currentRouteName = navigationRef.getCurrentRoute().name;
if (previousRouteName !== currentRouteName) {
await Analytics.logEvent("screen_view", {
currentRouteName,
});
}
routeNameRef.current = currentRouteName;
}}
But when I go into the google analytics console the screens have the parameter “(not set)”
How correctly should I do this?