Sync analytics plan

This commit is contained in:
bmarty 2023-12-11 00:03:18 +00:00 committed by GitHub
parent 4d5fefa105
commit 7e40b933c0
5 changed files with 201 additions and 0 deletions

View File

@ -39,12 +39,43 @@ data class Composer(
* sent event.
*/
val isReply: Boolean,
/**
* The type of the message.
*/
val messageType: MessageType,
/**
* Whether this message begins a new thread or not.
*/
val startsThread: Boolean? = null,
) : VectorAnalyticsEvent {
enum class MessageType {
/**
* A pin drop location message.
*/
LocationPin,
/**
* A user current location message.
*/
LocationUser,
/**
* A poll message.
*/
Poll,
/**
* A text message.
*/
Text,
/**
* A voice message.
*/
VoiceMessage,
}
override fun getName() = "Composer"
override fun getProperties(): Map<String, Any>? {
@ -52,6 +83,7 @@ data class Composer(
put("inThread", inThread)
put("isEditing", isEditing)
put("isReply", isReply)
put("messageType", messageType.name)
startsThread?.let { put("startsThread", it) }
}.takeIf { it.isNotEmpty() }
}

View File

@ -38,6 +38,11 @@ data class MobileScreen(
*/
Breadcrumbs,
/**
* The screen shown to create a poll.
*/
CreatePollView,
/**
* The screen shown to create a new (non-direct) room.
*/
@ -58,6 +63,11 @@ data class MobileScreen(
*/
Dialpad,
/**
* The screen shown to edit a poll.
*/
EditPollView,
/**
* The Favourites tab on mobile that lists your favourite people/rooms.
*/
@ -88,6 +98,16 @@ data class MobileScreen(
*/
Invites,
/**
* The screen shown to share location.
*/
LocationSend,
/**
* The screen shown to view a shared location.
*/
LocationView,
/**
* The screen that displays the login flow (when the user already has an
* account).

View File

@ -0,0 +1,63 @@
/*
* 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 a poll is created or edited.
*/
data class PollCreation(
/**
* Whether this poll has been created or edited.
*/
val action: Action,
/**
* Whether this poll is undisclosed.
*/
val isUndisclosed: Boolean,
/**
* Number of answers in the poll.
*/
val numberOfAnswers: Int,
) : VectorAnalyticsEvent {
enum class Action {
/**
* Newly created poll
*/
Create,
/**
* Edit of an existing poll
*/
Edit,
}
override fun getName() = "PollCreation"
override fun getProperties(): Map<String, Any>? {
return mutableMapOf<String, Any>().apply {
put("action", action.name)
put("isUndisclosed", isUndisclosed)
put("numberOfAnswers", numberOfAnswers)
}.takeIf { it.isNotEmpty() }
}
}

View File

@ -0,0 +1,43 @@
/*
* 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 a poll has been ended.
*/
data class PollEnd(
/**
* Do not use this. Remove this property when the kotlin type generator
* can properly generate types without proprties other than the event
* name.
*/
val doNotUse: Boolean? = null,
) : VectorAnalyticsEvent {
override fun getName() = "PollEnd"
override fun getProperties(): Map<String, Any>? {
return mutableMapOf<String, Any>().apply {
doNotUse?.let { put("doNotUse", it) }
}.takeIf { it.isNotEmpty() }
}
}

View File

@ -0,0 +1,43 @@
/*
* 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 a poll vote has been cast.
*/
data class PollVote(
/**
* Do not use this. Remove this property when the kotlin type generator
* can properly generate types without proprties other than the event
* name.
*/
val doNotUse: Boolean? = null,
) : VectorAnalyticsEvent {
override fun getName() = "PollVote"
override fun getProperties(): Map<String, Any>? {
return mutableMapOf<String, Any>().apply {
doNotUse?.let { put("doNotUse", it) }
}.takeIf { it.isNotEmpty() }
}
}