Skip to content

Commit

Permalink
Merge pull request #6700 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 Aug 23, 2022
2 parents f6e3825 + 6a62fb1 commit d85a164
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vector/src/main/java/im/vector/app/features/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import im.vector.app.core.platform.VectorBaseActivity
import im.vector.app.core.utils.deleteAllFiles
import im.vector.app.databinding.ActivityMainBinding
import im.vector.app.features.analytics.VectorAnalytics
import im.vector.app.features.analytics.plan.ViewRoom
import im.vector.app.features.home.HomeActivity
import im.vector.app.features.home.ShortcutsHandler
import im.vector.app.features.notifications.NotificationDrawerManager
Expand Down Expand Up @@ -186,8 +187,7 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
} else if (intent.action == ACTION_ROOM_DETAILS_FROM_SHORTCUT) {
val roomId = intent.getStringExtra(EXTRA_ROOM_ID)
if (roomId?.isNotEmpty() == true) {
// TODO Add a trigger Shortcut to the analytics.
navigator.openRoom(this, roomId)
navigator.openRoom(this, roomId, trigger = ViewRoom.Trigger.Shortcut)
}
finish()
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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<String, Any>? {
return mutableMapOf<String, Any>().apply {
put("granted", granted)
put("permission", permission.name)
}.takeIf { it.isNotEmpty() }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit d85a164

Please sign in to comment.