Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Track qr-code analytics #WPB-11679 🍒 (#3565) 🍒 #3669

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ class SelfUserProfileViewModel @Inject constructor(
private val notificationManager: WireNotificationManager,
private val globalDataStore: GlobalDataStore,
private val qualifiedIdMapper: QualifiedIdMapper,
<<<<<<< HEAD
private val anonymousAnalyticsManager: AnonymousAnalyticsManager
=======
private val analyticsManager: AnonymousAnalyticsManager
>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664))
) : ViewModel() {

var userProfileState by mutableStateOf(SelfUserProfileState(userId = selfUserId, isAvatarLoading = true))
Expand Down Expand Up @@ -310,6 +314,7 @@ class SelfUserProfileViewModel @Inject constructor(
}

fun trackQrCodeClick() {
<<<<<<< HEAD
anonymousAnalyticsManager.sendEvent(AnalyticsEvent.QrCode.Click(!userProfileState.teamName.isNullOrBlank()))
}

Expand All @@ -319,6 +324,9 @@ class SelfUserProfileViewModel @Inject constructor(
createTeamButtonClicked = true
)
)
=======
analyticsManager.sendEvent(AnalyticsEvent.QrCode.Click(!userProfileState.teamName.isNullOrBlank()))
>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664))
}

sealed class ErrorCodes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ class SelfUserProfileViewModelArrangement {
lateinit var qualifiedIdMapper: QualifiedIdMapper

@MockK
<<<<<<< HEAD
lateinit var anonymousAnalyticsManager: AnonymousAnalyticsManager
=======
lateinit var analyticsManager: AnonymousAnalyticsManager
>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664))

private val viewModel by lazy {
SelfUserProfileViewModel(
Expand All @@ -121,7 +125,11 @@ class SelfUserProfileViewModelArrangement {
notificationManager = notificationManager,
globalDataStore = globalDataStore,
qualifiedIdMapper = qualifiedIdMapper,
<<<<<<< HEAD
anonymousAnalyticsManager = anonymousAnalyticsManager
=======
analyticsManager = analyticsManager
>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664))
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import com.wire.android.feature.analytics.model.AnalyticsEventConstants.CONTRIBU
import com.wire.android.feature.analytics.model.AnalyticsEventConstants.MESSAGE_ACTION_KEY
import com.wire.android.feature.analytics.model.AnalyticsEventConstants.QR_CODE_SEGMENTATION_USER_TYPE_PERSONAL
import com.wire.android.feature.analytics.model.AnalyticsEventConstants.QR_CODE_SEGMENTATION_USER_TYPE_TEAM
<<<<<<< HEAD
import com.wire.android.feature.analytics.model.AnalyticsEventConstants.MIGRATION_DOT_ACTIVE
import com.wire.android.feature.analytics.model.AnalyticsEventConstants.MODAL_BACK_TO_WIRE_CLICKED
import com.wire.android.feature.analytics.model.AnalyticsEventConstants.MODAL_CONTINUE_CLICKED
Expand All @@ -42,6 +43,8 @@ import com.wire.android.feature.analytics.model.AnalyticsEventConstants.PERSONAL
import com.wire.android.feature.analytics.model.AnalyticsEventConstants.PERSONAL_TEAM_CREATION_FLOW_STARTED_EVENT
import com.wire.android.feature.analytics.model.AnalyticsEventConstants.STEP_MODAL_CREATE_TEAM
import com.wire.android.feature.analytics.model.AnalyticsEventConstants.USER_PROFILE_OPENED
=======
>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664))

interface AnalyticsEvent {
/**
Expand Down Expand Up @@ -235,6 +238,7 @@ interface AnalyticsEvent {
}
}
}
<<<<<<< HEAD

data class UserProfileOpened(val isMigrationDotActive: Boolean) : AnalyticsEvent {
override val key: String = USER_PROFILE_OPENED
Expand Down Expand Up @@ -322,6 +326,8 @@ interface AnalyticsEvent {
}
}
}
=======
>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664))
}

object AnalyticsEventConstants {
Expand Down Expand Up @@ -382,6 +388,7 @@ object AnalyticsEventConstants {
const val QR_CODE_SEGMENTATION_USER_TYPE = "user_type"
const val QR_CODE_SEGMENTATION_USER_TYPE_PERSONAL = "personal"
const val QR_CODE_SEGMENTATION_USER_TYPE_TEAM = "team"
<<<<<<< HEAD

/**
* user profile
Expand All @@ -404,4 +411,6 @@ object AnalyticsEventConstants {
const val MODAL_LEAVE_CLICKED = "modal_leave-clicked"
const val MODAL_BACK_TO_WIRE_CLICKED = "modal_back-to-wire-clicked"
const val MODAL_OPEN_TEAM_MANAGEMENT_CLICKED = "modal_open-tm-clicked"
=======
>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664))
}