microsoft / clarity-apps

Repo for distributing Clarity Apps packages
MIT License
46 stars 2 forks source link

How does `setCurrentScreenName` actually work? #27

Closed gsantiago closed 11 months ago

gsantiago commented 11 months ago

My records only show that they have one screen: MainActivity. Is it correct or it should show all the screens that my setCurrentScreenName called?

In the heat maps, I can see my custom screen names when I toggle the "Components" switch. Then it shows the screens like this: MainActivity/Home, MainActivity/Product, etc.

So, is it correct or am I doing something wrong?

ibradwan commented 11 months ago

Hi @gsantiago,

Whenever you set the current screen name, it will be registered as a UI Component the belongs to the current screen (in your case it's called MainActivity). For single screen apps (like ReactNative), you should primarily focus on Components rather than screens to get the best insights.

Now if you would like to filter on a certain component you can do the following for each scenario:

Dashboard:

image

Heatmaps: As you've already seen, you can toggle on Components and this will allow you to get their heatmaps:

image

Recordings: You can use the same filter mentioned above to filter on the sessions that have these components visible.

gsantiago commented 11 months ago

@ibradwan thank you very much! It's much clear now!

khanh21011999 commented 11 months ago

Hi @ibradwan , thank for your answer but still have some question, in our react native application, i always see it as MainActivity in the recording In heatmap i can see custom screen name like 'MainActivity/LoginScreen"...etc But do we possible show the current react-native screen on the recording? Since everyscreen in recording is MainActivity, then easier to track

ibradwan commented 11 months ago

@khanh21011999 Yes, that's exactly what the setCurrentScreenName function does. Could you please follow the example in the package readme and see if this solves your problem?