mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
making use of the analytics tracker instead of the vector analytics for the smaller tracking subset
This commit is contained in:
parent
6c1cbccff3
commit
0a7c421faa
3 changed files with 10 additions and 10 deletions
|
@ -18,6 +18,7 @@ package im.vector.app.features.analytics
|
||||||
|
|
||||||
import im.vector.app.features.analytics.itf.VectorAnalyticsEvent
|
import im.vector.app.features.analytics.itf.VectorAnalyticsEvent
|
||||||
import im.vector.app.features.analytics.itf.VectorAnalyticsScreen
|
import im.vector.app.features.analytics.itf.VectorAnalyticsScreen
|
||||||
|
import im.vector.app.features.analytics.plan.Identity
|
||||||
|
|
||||||
interface AnalyticsTracker {
|
interface AnalyticsTracker {
|
||||||
/**
|
/**
|
||||||
|
@ -29,4 +30,9 @@ interface AnalyticsTracker {
|
||||||
* Track a displayed screen
|
* Track a displayed screen
|
||||||
*/
|
*/
|
||||||
fun screen(screen: VectorAnalyticsScreen)
|
fun screen(screen: VectorAnalyticsScreen)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update user specific properties
|
||||||
|
*/
|
||||||
|
fun updateUserProperties(identity: Identity)
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
package im.vector.app.features.analytics
|
package im.vector.app.features.analytics
|
||||||
|
|
||||||
import im.vector.app.features.analytics.plan.Identity
|
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
|
|
||||||
interface VectorAnalytics : AnalyticsTracker {
|
interface VectorAnalytics : AnalyticsTracker {
|
||||||
|
@ -59,9 +58,4 @@ interface VectorAnalytics : AnalyticsTracker {
|
||||||
* To be called when application is started
|
* To be called when application is started
|
||||||
*/
|
*/
|
||||||
fun init()
|
fun init()
|
||||||
|
|
||||||
/**
|
|
||||||
* Update user specific properties
|
|
||||||
*/
|
|
||||||
fun updateUserProperties(identity: Identity)
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ import im.vector.app.core.platform.VectorViewModel
|
||||||
import im.vector.app.core.resources.StringProvider
|
import im.vector.app.core.resources.StringProvider
|
||||||
import im.vector.app.core.utils.ensureTrailingSlash
|
import im.vector.app.core.utils.ensureTrailingSlash
|
||||||
import im.vector.app.features.VectorFeatures
|
import im.vector.app.features.VectorFeatures
|
||||||
import im.vector.app.features.analytics.VectorAnalytics
|
import im.vector.app.features.analytics.AnalyticsTracker
|
||||||
import im.vector.app.features.analytics.plan.Identity
|
import im.vector.app.features.analytics.plan.Identity
|
||||||
import im.vector.app.features.login.HomeServerConnectionConfigFactory
|
import im.vector.app.features.login.HomeServerConnectionConfigFactory
|
||||||
import im.vector.app.features.login.LoginConfig
|
import im.vector.app.features.login.LoginConfig
|
||||||
|
@ -78,7 +78,7 @@ class OnboardingViewModel @AssistedInject constructor(
|
||||||
private val homeServerHistoryService: HomeServerHistoryService,
|
private val homeServerHistoryService: HomeServerHistoryService,
|
||||||
private val vectorFeatures: VectorFeatures,
|
private val vectorFeatures: VectorFeatures,
|
||||||
private val onboardingStore: OnboardingStore,
|
private val onboardingStore: OnboardingStore,
|
||||||
private val vectorAnalytics: VectorAnalytics
|
private val analyticsTracker: AnalyticsTracker
|
||||||
) : VectorViewModel<OnboardingViewState, OnboardingAction, OnboardingViewEvents>(initialState) {
|
) : VectorViewModel<OnboardingViewState, OnboardingAction, OnboardingViewEvents>(initialState) {
|
||||||
|
|
||||||
@AssistedFactory
|
@AssistedFactory
|
||||||
|
@ -466,7 +466,7 @@ class OnboardingViewModel @AssistedInject constructor(
|
||||||
private fun handleUpdateUseCase(action: OnboardingAction.UpdateUseCase) {
|
private fun handleUpdateUseCase(action: OnboardingAction.UpdateUseCase) {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
onboardingStore.setUseCase(action.useCase)
|
onboardingStore.setUseCase(action.useCase)
|
||||||
vectorAnalytics.updateUserProperties(
|
analyticsTracker.updateUserProperties(
|
||||||
Identity(ftueUseCaseSelection = action.useCase.toTrackingValue())
|
Identity(ftueUseCaseSelection = action.useCase.toTrackingValue())
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -476,7 +476,7 @@ class OnboardingViewModel @AssistedInject constructor(
|
||||||
private fun resetUseCase() {
|
private fun resetUseCase() {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
onboardingStore.resetUseCase()
|
onboardingStore.resetUseCase()
|
||||||
vectorAnalytics.updateUserProperties(
|
analyticsTracker.updateUserProperties(
|
||||||
Identity(ftueUseCaseSelection = null)
|
Identity(ftueUseCaseSelection = null)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue