TP-39520 add config version in all ap clickstream events (#7652)

This commit is contained in:
Hitesh Kumar
2023-08-29 14:25:33 +05:30
committed by GitHub
parent 71a6bc90ca
commit 4c1b77dd95
3 changed files with 8 additions and 0 deletions

View File

@@ -20,3 +20,4 @@ const val IMAGE_FILE_EXTENSION = ".jpeg"
const val DEEPLINK_URL = "deeplinkUrl"
const val HI_FI_LP_SeeHow_Click = "HI_FI_LP_SeeHow_Click"
const val SCREEN_NAME_CAMEL_CASE = "screenName"
const val CONFIG_VERSION_CAMEL_CASE = "configVersion"

View File

@@ -64,6 +64,8 @@ fun handleGlobalErrorEvent(
errorFields: GenericErrorBottomSheetFields?,
queryMap: MutableMap<String, String?> = mutableMapOf()
) {
val extrasMap = mutableMapOf<String, String>()
extrasMap[APP_CONFIG_VERSION] = queryMap[APP_CONFIG_VERSION].orEmpty()
errorEventHandler.onGlobalError(
reason = errorFields?.title,
source = queryMap[APP_PLATFORM_SCREEN_ID],
@@ -74,6 +76,7 @@ fun handleGlobalErrorEvent(
flowName =
"${queryMap[APP_PLATFORM_APPLICATION_TYPE].orEmpty()}_${methodName}_${queryMap[APP_PLATFORM_SCREEN_ID]}",
methodName = "${queryMap[APP_PLATFORM_APPLICATION_TYPE].orEmpty()}_${methodName}",
extras = extrasMap,
journeySource = APP_PLATFORM_SHORT_FORM
)
}

View File

@@ -10,6 +10,7 @@ package com.navi.common.uitron.model.action
import android.os.Parcelable
import androidx.lifecycle.SavedStateHandle
import com.google.gson.annotations.SerializedName
import com.navi.analytics.utils.CONFIG_VERSION_CAMEL_CASE
import com.navi.analytics.utils.NaviTrackEvent
import com.navi.analytics.utils.SCREEN_NAME
import com.navi.analytics.utils.SCREEN_NAME_CAMEL_CASE
@@ -57,6 +58,9 @@ data class AnalyticsActionV2(
}
}
handle.get<String>(SCREEN_NAME_CAMEL_CASE)?.let { properties[SCREEN_NAME] = it }
handle.get<String>(CONFIG_VERSION_CAMEL_CASE)?.let {
properties[CONFIG_VERSION_CAMEL_CASE] = it
}
NaviTrackEvent.trackEvent(
eventName = event,
eventValues = properties,