This commit is contained in:
Benoit Marty 2021-11-25 22:40:59 +01:00
parent 9b7650e5db
commit f05ed4c6cc
2 changed files with 2 additions and 7 deletions

View File

@ -60,7 +60,7 @@ class AnalyticsAccountDataViewModel @AssistedInject constructor(
} }
companion object : MavericksViewModelFactory<AnalyticsAccountDataViewModel, DummyState> by hiltMavericksViewModelFactory() { companion object : MavericksViewModelFactory<AnalyticsAccountDataViewModel, DummyState> by hiltMavericksViewModelFactory() {
private const val ANALYTICS_EVENT_TYPE = "im.vector.analytics"; private const val ANALYTICS_EVENT_TYPE = "im.vector.analytics"
} }
init { init {

View File

@ -127,19 +127,14 @@ class DefaultVectorAnalytics @Inject constructor(
posthog = PostHog.Builder(context, config.postHogApiKey, config.postHogHost) posthog = PostHog.Builder(context, config.postHogApiKey, config.postHogHost)
// Record certain application events automatically! (off/false by default) // Record certain application events automatically! (off/false by default)
// .captureApplicationLifecycleEvents() // .captureApplicationLifecycleEvents()
// Record screen views automatically! (off/false by default) // Record screen views automatically! (off/false by default)
// .recordScreenViews() // .recordScreenViews()
// Capture deep links as part of the screen call. (off by default) // Capture deep links as part of the screen call. (off by default)
// .captureDeepLinks() // .captureDeepLinks()
// Maximum number of events to keep in queue before flushing (default 20) // Maximum number of events to keep in queue before flushing (default 20)
// .flushQueueSize(20) // .flushQueueSize(20)
// Max delay before flushing the queue (30 seconds) // Max delay before flushing the queue (30 seconds)
// .flushInterval(30, TimeUnit.SECONDS) // .flushInterval(30, TimeUnit.SECONDS)
// Enable or disable collection of ANDROID_ID (true) // Enable or disable collection of ANDROID_ID (true)
.collectDeviceId(false) .collectDeviceId(false)
.logLevel(getLogLevel()) .logLevel(getLogLevel())
@ -175,7 +170,7 @@ class DefaultVectorAnalytics @Inject constructor(
if (this == null) return null if (this == null) return null
return Properties().apply { return Properties().apply {
this@toPostHogProperties.forEach { putValue(it.key, it.value) } putAll(this@toPostHogProperties)
} }
} }
} }