From dd8cf39082593b3ec611c740af2968dfd9d8f71b Mon Sep 17 00:00:00 2001 From: bmarty Date: Mon, 22 Aug 2022 00:04:01 +0000 Subject: [PATCH] Sync analytics plan --- .../features/analytics/plan/Interaction.kt | 48 +++++++++++++++++ .../analytics/plan/PermissionChanged.kt | 53 +++++++++++++++++++ .../app/features/analytics/plan/ViewRoom.kt | 5 ++ 3 files changed, 106 insertions(+) create mode 100644 vector/src/main/java/im/vector/app/features/analytics/plan/PermissionChanged.kt 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 deb9088259..6336faa74c 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 @@ -117,6 +117,12 @@ data class Interaction( */ WebLeftPanelExploreRoomsButton, + /** + * User clicked on the avatar uploader in the profile settings of + * Element Web/Desktop. + */ + WebProfileSettingsAvatarUploadButton, + /** * User interacted with pin to sidebar checkboxes in the quick settings * menu of Element Web/Desktop. @@ -279,6 +285,18 @@ data class Interaction( */ WebRoomListRoomsSublistPlusMenuExploreRoomsItem, + /** + * User clicked on the button to return to the user onboarding list in + * the room list in Element Web/Desktop. + */ + WebRoomListUserOnboardingButton, + + /** + * User clicked on the button to close the user onboarding button in the + * room list in Element Web/Desktop. + */ + WebRoomListUserOnboardingIgnoreButton, + /** * User interacted with leave action in the general tab of the room * settings dialog in Element Web/Desktop. @@ -349,6 +367,36 @@ data class Interaction( * Web/Desktop. */ WebUserMenuThemeToggleButton, + + /** + * User clicked on the send DM CTA in the header of the new user + * onboarding page in Element Web/Desktop. + */ + WebUserOnboardingHeaderSendDm, + + /** + * User clicked on the action of the download apps task on the new user + * onboarding page in Element Web/Desktop. + */ + WebUserOnboardingTaskDownloadApps, + + /** + * User clicked on the action of the enable notifications task on the + * new user onboarding page in Element Web/Desktop. + */ + WebUserOnboardingTaskEnableNotifications, + + /** + * User clicked on the action of the find people task on the new user + * onboarding page in Element Web/Desktop. + */ + WebUserOnboardingTaskSendDm, + + /** + * User clicked on the action of the your profile task on the new user + * onboarding page in Element Web/Desktop. + */ + WebUserOnboardingTaskSetupProfile, } enum class InteractionType { diff --git a/vector/src/main/java/im/vector/app/features/analytics/plan/PermissionChanged.kt b/vector/src/main/java/im/vector/app/features/analytics/plan/PermissionChanged.kt new file mode 100644 index 0000000000..9f463a4107 --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/analytics/plan/PermissionChanged.kt @@ -0,0 +1,53 @@ +/* + * 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 changes a permission status. + */ +data class PermissionChanged( + /** + * Whether the permission has been granted by the user. + */ + val granted: Boolean, + /** + * The name of the permission. + */ + val permission: Permission, +) : VectorAnalyticsEvent { + + enum class Permission { + /** + * Permissions related to sending notifications have changed. + */ + Notification, + } + + override fun getName() = "PermissionChanged" + + override fun getProperties(): Map? { + return mutableMapOf().apply { + put("granted", granted) + put("permission", permission.name) + }.takeIf { it.isNotEmpty() } + } +} 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 d2f30eec9b..f6a724304b 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 @@ -152,6 +152,11 @@ data class ViewRoom( */ RoomList, + /** + * Room accessed via a shortcut. + */ + Shortcut, + /** * Room accessed via a slash command in Element Web/Desktop like /goto. */