From 0f4deb70670a0417d5039a567ed27161f2ab16bb Mon Sep 17 00:00:00 2001 From: bmarty Date: Mon, 5 Sep 2022 00:03:36 +0000 Subject: [PATCH] Sync analytics plan --- .../features/analytics/plan/Interaction.kt | 51 +++++++++++++++++++ .../features/analytics/plan/MobileScreen.kt | 15 ++++++ .../features/analytics/plan/UserProperties.kt | 28 ++++++++++ .../app/features/analytics/plan/ViewRoom.kt | 5 ++ 4 files changed, 99 insertions(+) diff --git a/vector/src/main/java/im/vector/app/features/analytics/plan/Interaction.kt b/vector/src/main/java/im/vector/app/features/analytics/plan/Interaction.kt index 6336faa74c..1df1b35439 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/plan/Interaction.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/plan/Interaction.kt @@ -40,6 +40,46 @@ data class Interaction( ) : VectorAnalyticsEvent { enum class Name { + /** + * User tapped the All filter in the All Chats filter tab. + */ + MobileAllChatsFilterAll, + + /** + * User tapped the Favourites filter in the All Chats filter tab. + */ + MobileAllChatsFilterFavourites, + + /** + * User tapped the People filter in the All Chats filter tab. + */ + MobileAllChatsFilterPeople, + + /** + * User tapped the Unreads filter in the All Chats filter tab. + */ + MobileAllChatsFilterUnreads, + + /** + * User disabled filters from the all chats layout settings. + */ + MobileAllChatsFiltersDisabled, + + /** + * User enabled filters from the all chats layout settings. + */ + MobileAllChatsFiltersEnabled, + + /** + * User disabled recents from the all chats layout settings. + */ + MobileAllChatsRecentsDisabled, + + /** + * User enabled recents from the all chats layout settings. + */ + MobileAllChatsRecentsEnabled, + /** * User tapped on Add to Home button on Room Details screen. */ @@ -60,6 +100,11 @@ data class Interaction( */ MobileRoomThreadSummaryItem, + /** + * User validated the creation of a new space. + */ + MobileSpaceCreationValidated, + /** * User tapped on the filter button on ThreadList screen. */ @@ -81,6 +126,12 @@ data class Interaction( */ SpacePanelSwitchSpace, + /** + * User tapped an unselected sub space from the space list -> space + * switching should occur. + */ + SpacePanelSwitchSubSpace, + /** * User clicked the create room button in the add existing room to space * dialog in Element Web/Desktop. diff --git a/vector/src/main/java/im/vector/app/features/analytics/plan/MobileScreen.kt b/vector/src/main/java/im/vector/app/features/analytics/plan/MobileScreen.kt index 3ce3dfb578..7ea41e2d78 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/plan/MobileScreen.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/plan/MobileScreen.kt @@ -43,6 +43,11 @@ data class MobileScreen( */ CreateRoom, + /** + * The screen shown to create a new space. + */ + CreateSpace, + /** * The confirmation screen shown before deactivating an account. */ @@ -78,6 +83,11 @@ data class MobileScreen( */ InviteFriends, + /** + * Room accessed via space bottom sheet list. + */ + Invites, + /** * The screen that displays the login flow (when the user already has an * account). @@ -261,6 +271,11 @@ data class MobileScreen( */ Sidebar, + /** + * Room accessed via space bottom sheet list. + */ + SpaceBottomSheet, + /** * Screen that displays the list of rooms and spaces of a space. */ diff --git a/vector/src/main/java/im/vector/app/features/analytics/plan/UserProperties.kt b/vector/src/main/java/im/vector/app/features/analytics/plan/UserProperties.kt index 77be2456cd..d6fa918b8e 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/plan/UserProperties.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/plan/UserProperties.kt @@ -44,6 +44,10 @@ data class UserProperties( * Whether the user has the people space enabled. */ val webMetaSpacePeopleEnabled: Boolean? = null, + /** + * The active filter in the All Chats screen + */ + val allChatsActiveFilter: AllChatsActiveFilter? = null, /** * The selected messaging use case during the onboarding flow. */ @@ -80,6 +84,29 @@ data class UserProperties( WorkMessaging, } + enum class AllChatsActiveFilter { + + /** + * Filters are activated and All is selected + */ + All, + + /** + * Filters are activated and Favourites is selected + */ + Favourites, + + /** + * Filters are activated and People is selected + */ + People, + + /** + * Filters are activated and Unreads is selected + */ + Unreads, + } + fun getProperties(): Map? { return mutableMapOf().apply { webMetaSpaceFavouritesEnabled?.let { put("WebMetaSpaceFavouritesEnabled", it) } @@ -87,6 +114,7 @@ data class UserProperties( webMetaSpaceHomeEnabled?.let { put("WebMetaSpaceHomeEnabled", it) } webMetaSpaceOrphansEnabled?.let { put("WebMetaSpaceOrphansEnabled", it) } webMetaSpacePeopleEnabled?.let { put("WebMetaSpacePeopleEnabled", it) } + allChatsActiveFilter?.let { put("allChatsActiveFilter", it.name) } ftueUseCaseSelection?.let { put("ftueUseCaseSelection", it.name) } numFavouriteRooms?.let { put("numFavouriteRooms", it) } numSpaces?.let { put("numSpaces", it) } diff --git a/vector/src/main/java/im/vector/app/features/analytics/plan/ViewRoom.kt b/vector/src/main/java/im/vector/app/features/analytics/plan/ViewRoom.kt index f6a724304b..366979025a 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/plan/ViewRoom.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/plan/ViewRoom.kt @@ -110,6 +110,11 @@ data class ViewRoom( */ MobileSearchContactDetail, + /** + * Room accessed via space bottom sheet list. + */ + MobileSpaceBottomSheet, + /** * Room accessed via interacting with direct chat item in the space * contact detail screen.