diff --git a/app/src/main/java/org/openedx/app/analytics/FirebaseAnalytics.kt b/app/src/main/java/org/openedx/app/analytics/FirebaseAnalytics.kt index d1eb8cb18..5f2981c39 100644 --- a/app/src/main/java/org/openedx/app/analytics/FirebaseAnalytics.kt +++ b/app/src/main/java/org/openedx/app/analytics/FirebaseAnalytics.kt @@ -7,7 +7,7 @@ import org.openedx.core.utils.Logger class FirebaseAnalytics(context: Context) : Analytics { private val logger = Logger(TAG) - private var tracker: FirebaseAnalytics = FirebaseAnalytics.getInstance(context) + private val tracker: FirebaseAnalytics = FirebaseAnalytics.getInstance(context) override fun logScreenEvent(screenName: String, params: Map) { tracker.logEvent( diff --git a/app/src/main/java/org/openedx/app/analytics/SegmentAnalytics.kt b/app/src/main/java/org/openedx/app/analytics/SegmentAnalytics.kt index 37a34bc55..ef28e0c4b 100644 --- a/app/src/main/java/org/openedx/app/analytics/SegmentAnalytics.kt +++ b/app/src/main/java/org/openedx/app/analytics/SegmentAnalytics.kt @@ -19,7 +19,7 @@ class SegmentAnalytics(context: Context, config: Config) : Analytics { private val logger = Logger(TAG) // Create an analytics client with the given application context and Segment write key. - private var tracker: SegmentTracker = + private val tracker: SegmentTracker = SegmentAnalyticsBuilder(config.getSegmentConfig().segmentWriteKey, context) { // Automatically track Lifecycle events trackApplicationLifecycleEvents = true