microsoft / clarity

A behavioral analytics library that uses dom mutations and user interactions to generate aggregated insights.
https://clarity.microsoft.com
MIT License
2.06k stars 203 forks source link

How to set current screen name using react-native SDK? #402

Open ahmaddehnavi opened 1 year ago

ahmaddehnavi commented 1 year ago

Currently, the clarity only shows the native Android activity name, and what I need is to be able to set currently the visible react-native page name. I'm using react-navigation for navigation.

"react-native-clarity": "^0.0.4", "react-native": "0.71.6", "@react-navigation/native": "6.1.6", "@react-navigation/native-stack": "6.9.12", "@react-navigation/stack": "6.3.16"

danotavio commented 1 year ago

I also need this so much, It's really helpful to create funnel and improve ux strategies with the flows.

bgrgv commented 1 year ago

Facing the same issue, shows only MainActivity and other native names. This is a blocking point for funnels and flows.

ibradwan commented 1 year ago

Thank you for reporting this. We are aware of the issue and have it on our list. Please stay tuned.

anujmpec commented 1 year ago

@ibradwan Please update once it's done.

mym0404 commented 12 months ago

setCurrentScreenName is available now. But it is not working on RN v1.0.0. Dashboard is only showing MainActivity.

danotavio commented 12 months ago

Currently I'm with 1.0.1 and also not showing on Dashboard anything except for MainActivity.

ibradwan commented 11 months ago

Sorry for the inconvenience, the dashboard changes will be released soon. Will update this thread once they are rolled out.

ibradwan commented 11 months ago

The dashboard changes have been released, you should now be able to see the React Native screen names on the session timeline, and you can also filter sessions/heatmaps on your application screens.

roots-ai commented 3 months ago

Still only showing MainActivity https://github.com/microsoft/clarity/issues/562#issuecomment-2142143218

ibradwan commented 3 months ago

What this API currently does on ReactNative is that it adds the name you provide as a component in the current screen. Screenshot 2024-06-03 at 17 34 57

We're planning on an update to this behavior to try to change the native screen name itself (other than leaving it MainActivity), but filtering and segregating on the Component name should give you the same functionaility. While watching a session, you should also see your components in the timeline as well: Screenshot 2024-06-03 at 17 37 21

VikasShashidhar commented 1 month ago

@ibradwan - just to check, when might this be available? We've also run into the same inconvenience. So, any ideas on when it might be available would be helpful. Thanks.

ibradwan commented 1 month ago

Hello @VikasShashidhar,

Thanks for sharing your feedback. We should start re-specing this API very soon to see the possibility of changing its behavior and to allow it on native Android apps as well.

VikasShashidhar commented 1 month ago

Thanks @ibradwan