From 7aceba0b5150dc2805cb445b7e9e7c141faede57 Mon Sep 17 00:00:00 2001 From: Moez Bhatti Date: Mon, 4 Jun 2018 15:49:36 -0400 Subject: [PATCH] Fix amplitude identify usage --- .../java/common/util/AnalyticsManagerImpl.kt | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/presentation/src/withAnalytics/java/common/util/AnalyticsManagerImpl.kt b/presentation/src/withAnalytics/java/common/util/AnalyticsManagerImpl.kt index 2f9a65b1..bf647155 100644 --- a/presentation/src/withAnalytics/java/common/util/AnalyticsManagerImpl.kt +++ b/presentation/src/withAnalytics/java/common/util/AnalyticsManagerImpl.kt @@ -61,22 +61,24 @@ class AnalyticsManagerImpl @Inject constructor(context: Context) : AnalyticsMana mixpanel.registerSuperProperties(properties) // Set the value in Amplitude + val identify = Identify() when (value) { - is Boolean -> Identify().set(key, value) - is BooleanArray -> Identify().set(key, value) - is Double -> Identify().set(key, value) - is DoubleArray -> Identify().set(key, value) - is Float -> Identify().set(key, value) - is FloatArray -> Identify().set(key, value) - is Int -> Identify().set(key, value) - is IntArray -> Identify().set(key, value) - is Long -> Identify().set(key, value) - is LongArray -> Identify().set(key, value) - is String -> Identify().set(key, value) - is JSONArray -> Identify().set(key, value) - is JSONObject -> Identify().set(key, value) + is Boolean -> identify.set(key, value) + is BooleanArray -> identify.set(key, value) + is Double -> identify.set(key, value) + is DoubleArray -> identify.set(key, value) + is Float -> identify.set(key, value) + is FloatArray -> identify.set(key, value) + is Int -> identify.set(key, value) + is IntArray -> identify.set(key, value) + is Long -> identify.set(key, value) + is LongArray -> identify.set(key, value) + is String -> identify.set(key, value) + is JSONArray -> identify.set(key, value) + is JSONObject -> identify.set(key, value) else -> Timber.e("Value of type ${value::class.java} not supported") } + amplitude.identify(identify) } }