Sync analytics plan

This commit is contained in:
bmarty 2022-02-14 00:05:49 +00:00 committed by GitHub
parent d6a08a9249
commit c89a107ca6
2 changed files with 333 additions and 179 deletions

View File

@ -22,9 +22,9 @@ import im.vector.app.features.analytics.itf.VectorAnalyticsScreen
// https://github.com/matrix-org/matrix-analytics-events/
/**
* Triggered when the user changed screen
* Triggered when the user changed screen on Element Android/iOS
*/
data class Screen(
data class MobileScreen(
/**
* How long the screen was displayed for in milliseconds.
*/
@ -33,6 +33,11 @@ data class Screen(
) : VectorAnalyticsScreen {
enum class ScreenName {
/**
* The screen that displays the user's breadcrumbs.
*/
Breadcrumbs,
/**
* The screen shown to create a new (non-direct) room.
*/
@ -43,6 +48,16 @@ data class Screen(
*/
DeactivateAccount,
/**
* The tab on mobile that displays the dialpad.
*/
Dialpad,
/**
* The Favourites tab on mobile that lists your favourite people/rooms.
*/
Favourites,
/**
* The form for the forgot password use case
*/
@ -54,11 +69,15 @@ data class Screen(
Group,
/**
* The Home tab on iOS | possibly the same on Android? | Home page on
* Web
* The Home tab on iOS | possibly the same on Android?
*/
Home,
/**
* The screen shown to share a link to download the app.
*/
InviteFriends,
/**
* The screen that displays the login flow (when the user already has an
* account).
@ -66,100 +85,14 @@ data class Screen(
Login,
/**
* The screen that displays the user's breadcrumbs.
* Legacy: The screen that shows all groups/communities you have joined.
*/
MobileBreadcrumbs,
/**
* The tab on mobile that displays the dialpad.
*/
MobileDialpad,
/**
* The Favourites tab on mobile that lists your favourite people/rooms.
*/
MobileFavourites,
/**
* The screen shown to share a link to download the app.
*/
MobileInviteFriends,
MyGroups,
/**
* The People tab on mobile that lists all the DM rooms you have joined.
*/
MobilePeople,
/**
* The Rooms tab on mobile that lists all the (non-direct) rooms you've
* joined.
*/
MobileRooms,
/**
* The Files tab shown in the global search screen on Mobile.
*/
MobileSearchFiles,
/**
* The Messages tab shown in the global search screen on Mobile.
*/
MobileSearchMessages,
/**
* The People tab shown in the global search screen on Mobile.
*/
MobileSearchPeople,
/**
* The Rooms tab shown in the global search screen on Mobile.
*/
MobileSearchRooms,
/**
* The global settings screen shown in the app.
*/
MobileSettings,
/**
* The settings screen to change the default notification options.
*/
MobileSettingsDefaultNotifications,
/**
* The settings screen to manage notification mentions and keywords.
*/
MobileSettingsMentionsAndKeywords,
/**
* The global security settings screen.
*/
MobileSettingsSecurity,
/**
* The sidebar shown on mobile with spaces, settings etc.
*/
MobileSidebar,
/**
* Screen that displays the list of members of a space
*/
MobileSpaceMembers,
/**
* The bottom sheet that list all space options
*/
MobileSpaceMenu,
/**
* The screen shown to select which room directory you'd like to use.
*/
MobileSwitchDirectory,
/**
* Legacy: The screen that shows all groups/communities you have joined.
*/
MyGroups,
People,
/**
* The screen that displays the registration flow (when the user wants
@ -216,107 +149,87 @@ data class Screen(
*/
RoomUploads,
/**
* The Rooms tab on mobile that lists all the (non-direct) rooms you've
* joined.
*/
Rooms,
/**
* The Files tab shown in the global search screen on Mobile.
*/
SearchFiles,
/**
* The Messages tab shown in the global search screen on Mobile.
*/
SearchMessages,
/**
* The People tab shown in the global search screen on Mobile.
*/
SearchPeople,
/**
* The Rooms tab shown in the global search screen on Mobile.
*/
SearchRooms,
/**
* The global settings screen shown in the app.
*/
Settings,
/**
* The settings screen to change the default notification options.
*/
SettingsDefaultNotifications,
/**
* The settings screen to manage notification mentions and keywords.
*/
SettingsMentionsAndKeywords,
/**
* The global security settings screen.
*/
SettingsSecurity,
/**
* The sidebar shown on mobile with spaces, settings etc.
*/
Sidebar,
/**
* Screen that displays the list of rooms and spaces of a space
*/
SpaceExploreRooms,
/**
* Screen that displays the list of members of a space
*/
SpaceMembers,
/**
* The bottom sheet that list all space options
*/
SpaceMenu,
/**
* The screen shown to create a new direct room.
*/
StartChat,
/**
* The screen shown to select which room directory you'd like to use.
*/
SwitchDirectory,
/**
* A screen that shows information about a room member.
*/
User,
/**
* Element Web showing flow to trust this new device with cross-signing.
*/
WebCompleteSecurity,
/**
* Element Web showing flow to setup SSSS / cross-signing on this
* account.
*/
WebE2ESetup,
/**
* Element Web loading spinner.
*/
WebLoading,
/**
* Element Web device has been soft logged out by the server.
*/
WebSoftLogout,
/**
* Legacy: Element Web User Settings Flair Tab.
*/
WebUserSettingFlair,
/**
* Element Web User Settings Mjolnir (labs) Tab.
*/
WebUserSettingMjolnir,
/**
* Element Web User Settings Appearance Tab.
*/
WebUserSettingsAppearance,
/**
* Element Web User Settings General Tab.
*/
WebUserSettingsGeneral,
/**
* Element Web User Settings Help & About Tab.
*/
WebUserSettingsHelpAbout,
/**
* Element Web User Settings Ignored Users Tab.
*/
WebUserSettingsIgnoredUsers,
/**
* Element Web User Settings Keyboard Tab.
*/
WebUserSettingsKeyboard,
/**
* Element Web User Settings Labs Tab.
*/
WebUserSettingsLabs,
/**
* Element Web User Settings Notifications Tab.
*/
WebUserSettingsNotifications,
/**
* Element Web User Settings Preferences Tab.
*/
WebUserSettingsPreferences,
/**
* Element Web User Settings Security & Privacy Tab.
*/
WebUserSettingsSecurityPrivacy,
/**
* Element Web User Settings Sidebar Tab.
*/
WebUserSettingsSidebar,
/**
* Element Web User Settings Voice & Video Tab.
*/
WebUserSettingsVoiceVideo,
/**
* The splash screen.
*/

View File

@ -0,0 +1,241 @@
/*
* Copyright (c) 2021 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.app.features.analytics.plan
import im.vector.app.features.analytics.itf.VectorAnalyticsEvent
// GENERATED FILE, DO NOT EDIT. FOR MORE INFORMATION VISIT
// https://github.com/matrix-org/matrix-analytics-events/
/**
* Triggered when the user changed screen on Element Web/Desktop
*/
data class WebScreen(
val $current_url: $current_url,
/**
* How long the screen took to load, if applicable.
*/
val durationMs: Int? = null,
) : VectorAnalyticsEvent {
enum class $current_url {
/**
* Screen showing flow to trust this new device with cross-signing.
*/
CompleteSecurity,
/**
* The screen shown to create a new (non-direct) room.
*/
CreateRoom,
/**
* The confirmation screen shown before deactivating an account.
*/
DeactivateAccount,
/**
* Screen showing flow to setup SSSS / cross-signing on this account.
*/
E2ESetup,
/**
* The form for the forgot password use case
*/
ForgotPassword,
/**
* Legacy: The screen that shows information about a specific group.
*/
Group,
/**
* Home page.
*/
Home,
/**
* Screen showing loading spinner.
*/
Loading,
/**
* The screen that displays the login flow (when the user already has an
* account).
*/
Login,
/**
* Legacy: The screen that shows all groups/communities you have joined.
*/
MyGroups,
/**
* The screen that displays the registration flow (when the user wants
* to create an account)
*/
Register,
/**
* The screen that displays the messages and events received in a room.
*/
Room,
/**
* The screen shown when tapping the name of a room from the Room
* screen.
*/
RoomDetails,
/**
* The screen that lists public rooms for you to discover.
*/
RoomDirectory,
/**
* The screen that lists all the user's rooms and let them filter the
* rooms.
*/
RoomFilter,
/**
* The screen that displays the list of members that are part of a room.
*/
RoomMembers,
/**
* The notifications settings screen shown from the Room Details screen.
*/
RoomNotifications,
/**
* The screen that allows you to search for messages/files in a specific
* room.
*/
RoomSearch,
/**
* The settings screen shown from the Room Details screen.
*/
RoomSettings,
/**
* The screen that allows you to see all of the files sent in a specific
* room.
*/
RoomUploads,
/**
* Screen showing device has been soft logged out by the server.
*/
SoftLogout,
/**
* Screen that displays the list of rooms and spaces of a space
*/
SpaceExploreRooms,
/**
* The screen shown to create a new direct room.
*/
StartChat,
/**
* A screen that shows information about a room member.
*/
User,
/**
* Legacy: screen showing User Settings Flair Tab.
*/
UserSettingFlair,
/**
* Screen showing User Settings Mjolnir (labs) Tab.
*/
UserSettingMjolnir,
/**
* Screen showing User Settings Appearance Tab.
*/
UserSettingsAppearance,
/**
* Screen showing User Settings General Tab.
*/
UserSettingsGeneral,
/**
* Screen showing User Settings Help & About Tab.
*/
UserSettingsHelpAbout,
/**
* Screen showing User Settings Ignored Users Tab.
*/
UserSettingsIgnoredUsers,
/**
* Screen showing User Settings Keyboard Tab.
*/
UserSettingsKeyboard,
/**
* Screen showing User Settings Labs Tab.
*/
UserSettingsLabs,
/**
* Screen showing User Settings Notifications Tab.
*/
UserSettingsNotifications,
/**
* Screen showing User Settings Preferences Tab.
*/
UserSettingsPreferences,
/**
* Screen showing User Settings Security & Privacy Tab.
*/
UserSettingsSecurityPrivacy,
/**
* Screen showing User Settings Sidebar Tab.
*/
UserSettingsSidebar,
/**
* Screen showing User Settings Voice & Video Tab.
*/
UserSettingsVoiceVideo,
/**
* The splash screen.
*/
Welcome,
}
override fun getName() = "$pageview"
override fun getProperties(): Map<String, Any>? {
return mutableMapOf<String, Any>().apply {
put("$current_url", $current_url.name)
durationMs?.let { put("durationMs", it) }
}.takeIf { it.isNotEmpty() }
}
}