Log when SIA integration is enabled

This commit is contained in:
Moez Bhatti
2018-07-12 16:42:50 -04:00
parent 57b371400e
commit 9b833befc7
4 changed files with 18 additions and 5 deletions
@@ -40,10 +40,11 @@ class AnalyticsManagerImpl @Inject constructor(context: Context) : AnalyticsMana
amplitude.trackSessionEvents(true)
}
override fun track(event: String, vararg properties: Pair<String, String>) {
override fun track(event: String, vararg properties: Pair<String, Any>) {
val propertiesJson = JSONObject(properties
.associateBy { pair -> pair.first }
.mapValues { pair -> pair.value.second })
.also { Timber.v("$event: $it") }
amplitude.logEvent(event, propertiesJson)