Skip to content

Commit

Permalink
Merge pull request #5267 from vector-im/sync-analytics-plan
Browse files Browse the repository at this point in the history
Sync analytics plan
  • Loading branch information
bmarty authored Mar 1, 2022
2 parents ec786af + e650707 commit 1b1a9bf
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ data class Interaction(
) : VectorAnalyticsEvent {

enum class Name {
/**
* User tapped on Add to Home button on Room Details screen.
*/
MobileRoomAddHome,

/**
* User tapped on Leave Room button on Room Details screen.
*/
MobileRoomLeave,

/**
* User tapped the already selected space from the space list.
*/
Expand All @@ -52,8 +62,8 @@ data class Interaction(
SpacePanelSwitchSpace,

/**
* User clicked the create room button in the + context menu of the room
* list header in Element Web/Desktop.
* User clicked the create room button in the add existing room to space
* dialog in Element Web/Desktop.
*/
WebAddExistingToSpaceDialogCreateRoomButton,

Expand Down Expand Up @@ -153,6 +163,12 @@ data class Interaction(
*/
WebRoomListHeaderPlusMenuCreateRoomItem,

/**
* User clicked the explore rooms button in the + context menu of the
* room list header in Element Web/Desktop.
*/
WebRoomListHeaderPlusMenuExploreRoomsItem,

/**
* User adjusted their favourites using the context menu on a room tile
* in the room list in Element Web/Desktop.
Expand Down Expand Up @@ -189,6 +205,12 @@ data class Interaction(
*/
WebRoomListRoomsSublistPlusMenuCreateRoomItem,

/**
* User clicked the explore rooms button in the + context menu of the
* rooms sublist in Element Web/Desktop.
*/
WebRoomListRoomsSublistPlusMenuExploreRoomsItem,

/**
* User interacted with leave action in the general tab of the room
* settings dialog in Element Web/Desktop.
Expand All @@ -214,14 +236,26 @@ data class Interaction(
WebSettingsSidebarTabSpacesCheckbox,

/**
* User clicked the create room button in the + context menu of the room
* list header in Element Web/Desktop.
* User clicked the explore rooms button in the context menu of a space
* in Element Web/Desktop.
*/
WebSpaceContextMenuExploreRoomsItem,

/**
* User clicked the home button in the context menu of a space in
* Element Web/Desktop.
*/
WebSpaceContextMenuHomeItem,

/**
* User clicked the new room button in the context menu of a space in
* Element Web/Desktop.
*/
WebSpaceContextMenuNewRoomItem,

/**
* User clicked the create room button in the + context menu of the room
* list header in Element Web/Desktop.
* User clicked the new room button in the context menu on the space
* home in Element Web/Desktop.
*/
WebSpaceHomeCreateRoomButton,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ data class JoinedRoom(
) : VectorAnalyticsEvent {

enum class Trigger {
/**
* Room joined via an invite.
*/
Invite,

/**
* Room joined via a push/desktop notification.
*/
Expand All @@ -54,6 +59,16 @@ data class JoinedRoom(
*/
RoomDirectory,

/**
* Room joined via its preview.
*/
RoomPreview,

/**
* Room joined via the /join slash command.
*/
SlashCommand,

/**
* Room joined via the space hierarchy view.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ data class MobileScreen(
*/
Room,

/**
* The room addresses screen shown from the Room Details screen.
*/
RoomAddresses,

/**
* The screen shown when tapping the name of a room from the Room
* screen.
Expand Down Expand Up @@ -132,6 +137,16 @@ data class MobileScreen(
*/
RoomNotifications,

/**
* The roles permissions screen shown from the Room Details screen.
*/
RoomPermissions,

/**
* Screen that displays room preview if user hasn't joined yet
*/
RoomPreview,

/**
* The screen that allows you to search for messages/files in a specific
* room.
Expand Down Expand Up @@ -180,21 +195,67 @@ data class MobileScreen(
*/
Settings,

/**
* The advanced settings screen (developer mode, rageshake, push
* notification rules)
*/
SettingsAdvanced,

/**
* The settings screen to change the default notification options.
*/
SettingsDefaultNotifications,

/**
* The settings screen with general profile settings.
*/
SettingsGeneral,

/**
* The Help and About screen
*/
SettingsHelp,

/**
* The settings screen with list of the ignored users.
*/
SettingsIgnoredUsers,

/**
* The experimental features settings screen,
*/
SettingsLabs,

/**
* The settings screen with legals information
*/
SettingsLegals,

/**
* The settings screen to manage notification mentions and keywords.
*/
SettingsMentionsAndKeywords,

/**
* The notifications settings screen.
*/
SettingsNotifications,

/**
* The preferences screen (theme, language, editor preferences, etc.
*/
SettingsPreferences,

/**
* The global security settings screen.
*/
SettingsSecurity,

/**
* The calls settings screen.
*/
SettingsVoiceVideo,

/**
* The sidebar shown on mobile with spaces, settings etc.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ import im.vector.app.features.analytics.itf.VectorAnalyticsEvent
* Triggered when the user changes rooms.
*/
data class ViewRoom(
/**
* active space when user navigated to the room.
*/
val activeSpace: ActiveSpace? = null,
/**
* Whether the room is a DM.
*/
val isDM: Boolean? = null,
/**
* Whether the room is a Space.
*/
val isSpace: Boolean? = null,
/**
* The reason for the room change if known.
*/
Expand Down Expand Up @@ -179,10 +191,36 @@ data class ViewRoom(
Widget,
}

enum class ActiveSpace {

/**
* Active space is Home.
*/
Home,

/**
* Active space is a meta space.
*/
Meta,

/**
* Active space is a private space.
*/
Private,

/**
* Active space is a public space.
*/
Public,
}

override fun getName() = "ViewRoom"

override fun getProperties(): Map<String, Any>? {
return mutableMapOf<String, Any>().apply {
activeSpace?.let { put("activeSpace", it.name) }
isDM?.let { put("isDM", it) }
isSpace?.let { put("isSpace", it) }
trigger?.let { put("trigger", it.name) }
viaKeyboard?.let { put("viaKeyboard", it) }
}.takeIf { it.isNotEmpty() }
Expand Down

0 comments on commit 1b1a9bf

Please sign in to comment.