uxcam / react-native-ux-cam

54 stars 10 forks source link

UIViewController / unknown screen name #59

Closed Aximem closed 2 years ago

Aximem commented 2 years ago

We have defined:
RNUxcam.setAutomaticScreenNameTagging(false);

And, in our navigation (from react-navigation) we call tagScreenName on each state change:

const getActiveRouteName = (state: any): string => {
    const route = state.routes[state.index];
    if (route.state) {
      // Dive into nested navigators
      return getActiveRouteName(route.state);
    }
    return route.name;
  };
...
<NavigationContainer
      onStateChange={(state) => {
        RNUxcam.tagScreenName(getActiveRouteName(state));
      }}>
      ...
</NavigationContainer>

If we log what is added to tagScreenName we always get our navigation's screen name (Profile, Settings, etc.).
But, if we check the UXCam dashboard, in Heatmaps and Screen Flow we have massively "UIViewController" screen name reported on iOS and, to a lesser extent, "unknown" screen name on Android.

PierreWCS commented 2 years ago

Any updates ?

We have the same problem here, on our dashboard there is 1300 UIViewController events and we don't understand where it's from !

kacianoghelere commented 2 years ago

Same here, although in our case tagScreenName works perfectly on Android :(

DFDIEGOH commented 2 years ago

Hi @kacianoghelere, @PierreWCS , @Aximem - The UIViewController screen name normally happens when you are no using the proper way for disabling the automatic screen tagging. The proper way is to do the following:

RNUxcam.optIntoSchematicRecordings(); // Add this line to enable iOS screen recordings
 const configuration = {
    userAppKey: 'YOUR API KEY',
    enableAutomaticScreenNameTagging: false, ------> This is how it should be setup
    enableImprovedScreenCapture: true
 }
RNUxcam.startWithConfiguration(configuration);

Additionally, "unknown" screen names appear when you are not tagging the first screen that loads properly in your application, normally when this is starting up. You could try and add a name tag in your app.js and it should remove the "unknown" screen name from the dashboard.

Please let me know if you have further questions in this regard

kacianoghelere commented 2 years ago

Hi @kacianoghelere, @PierreWCS , @Aximem - The UIViewController screen name normally happens when you are no using the proper way for disabling the automatic screen tagging. The proper way is to do the following:

RNUxcam.optIntoSchematicRecordings(); // Add this line to enable iOS screen recordings
 const configuration = {
    userAppKey: 'YOUR API KEY',
    enableAutomaticScreenNameTagging: false, ------> This is how it should be setup
    enableImprovedScreenCapture: true
 }
RNUxcam.startWithConfiguration(configuration);

Additionally, "unknown" screen names appear when you are not tagging the first screen that loads properly in your application, normally when this is starting up. You could try and add a name tag in your app.js and it should remove the "unknown" screen name from the dashboard.

Please let me know if you have further questions in this regard

@DFDIEGOH Thanks man, turning off enableAutomaticScreenNameTagging worked perfectly!

DFDIEGOH commented 2 years ago

Great to hear that @kacianoghelere We will be here in case you have further questions

jeferson-sb commented 1 year ago

@DFDIEGOH " You could try and add a name tag in your app.js and it should remove the "unknown" screen name from the dashboard."

Can you explain more on how exactly can I tag the booting screen? I'm also facing this issue.

jeferson-sb commented 10 months ago

ping @DFDIEGOH or @rohitmakwanauxcam

DFDIEGOH commented 10 months ago

Hi @jeferson-sb - Apologize for the delay. Basically, This is a tagging of the screens issue where you will need to tag the first screen in your application. Normally this is the entry point of your application using the tagScreenName API that comes with the UXCam SDK. Here you will find more information in this regard: https://developer.uxcam.com/docs/screens#why-do-i-have-a-lot-of-unknowns-screens