NTP-36068 | Mehul | events for apply and remove discount added (#15340)
This commit is contained in:
@@ -1105,6 +1105,54 @@ class NaviBbpsAnalytics private constructor() {
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
fun onAppliedDiscountClicked(
|
||||
offerDataList: List<OfferData>?,
|
||||
source: String,
|
||||
initialSource: String,
|
||||
coinBurnData: CoinBurnData?,
|
||||
sessionAttribute: Map<String, String>,
|
||||
billCategoryEntity: BillCategoryEntity,
|
||||
) {
|
||||
NaviTrackEvent.trackEventOnClickStream(
|
||||
eventName = "NaviBBPS_Bill_AppliedDiscount_Clicked",
|
||||
eventValues =
|
||||
mapOf(
|
||||
NAVI_BBPS_COIN_CALLOUT_VISIBLE to
|
||||
isEligibleForCoinBurn(coinBurnData).toString(),
|
||||
NAVI_BBPS_OFFER_LIST_SIZE to offerDataList?.size.toString(),
|
||||
NAVI_BBPS_SESSION_ID to sessionAttribute[NAVI_BBPS_SESSION_ID].orEmpty(),
|
||||
NAVI_BBPS_SOURCE to source,
|
||||
NAVI_BBPS_INITIAL_SOURCE to initialSource,
|
||||
NAVI_BBPS_CATEGORY_NAME to billCategoryEntity.title,
|
||||
NAVI_BBPS_CATEGORY_ID to billCategoryEntity.categoryId,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
fun onRemoveDiscountClicked(
|
||||
offerDataList: List<OfferData>?,
|
||||
source: String,
|
||||
initialSource: String,
|
||||
coinBurnData: CoinBurnData?,
|
||||
sessionAttribute: Map<String, String>,
|
||||
billCategoryEntity: BillCategoryEntity,
|
||||
) {
|
||||
NaviTrackEvent.trackEventOnClickStream(
|
||||
eventName = "NaviBBPS_Bill_RemoveDiscount_Clicked",
|
||||
eventValues =
|
||||
mapOf(
|
||||
NAVI_BBPS_COIN_CALLOUT_VISIBLE to
|
||||
isEligibleForCoinBurn(coinBurnData).toString(),
|
||||
NAVI_BBPS_OFFER_LIST_SIZE to offerDataList?.size.toString(),
|
||||
NAVI_BBPS_SESSION_ID to sessionAttribute[NAVI_BBPS_SESSION_ID].orEmpty(),
|
||||
NAVI_BBPS_SOURCE to source,
|
||||
NAVI_BBPS_INITIAL_SOURCE to initialSource,
|
||||
NAVI_BBPS_CATEGORY_NAME to billCategoryEntity.title,
|
||||
NAVI_BBPS_CATEGORY_ID to billCategoryEntity.categoryId,
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
inner class ContactList {
|
||||
|
||||
@@ -593,10 +593,32 @@ fun PayBillScreenV2(
|
||||
payBillViewModelV2::onAmountValueChanged,
|
||||
scrollState = scrollState,
|
||||
coinBurnData = coinBurnData,
|
||||
onAppliedDiscountClicked =
|
||||
payBillViewModelV2::onAppliedDiscountClicked,
|
||||
onRemoveDiscountClicked =
|
||||
payBillViewModelV2::onRemoveDiscountClicked,
|
||||
onAppliedDiscountClicked = {
|
||||
payBillViewModelV2.onAppliedDiscountClicked()
|
||||
naviBbpsAnalytics.onAppliedDiscountClicked(
|
||||
offerDataList = offerDataList,
|
||||
source = source,
|
||||
initialSource = initialSource,
|
||||
coinBurnData = coinBurnData,
|
||||
sessionAttribute =
|
||||
payBillViewModelV2
|
||||
.getNaviBbpsSessionAttributes(),
|
||||
billCategoryEntity = billCategoryEntity,
|
||||
)
|
||||
},
|
||||
onRemoveDiscountClicked = {
|
||||
payBillViewModelV2.onRemoveDiscountClicked()
|
||||
naviBbpsAnalytics.onRemoveDiscountClicked(
|
||||
offerDataList = offerDataList,
|
||||
source = source,
|
||||
initialSource = initialSource,
|
||||
coinBurnData = coinBurnData,
|
||||
sessionAttribute =
|
||||
payBillViewModelV2
|
||||
.getNaviBbpsSessionAttributes(),
|
||||
billCategoryEntity = billCategoryEntity,
|
||||
)
|
||||
},
|
||||
isAppliedDiscountClicked = isCoinDiscountApplied,
|
||||
sortedOfferList = sortedOfferList,
|
||||
onOfferClicked = {
|
||||
@@ -734,14 +756,46 @@ fun PayBillScreenV2(
|
||||
.orEmpty(),
|
||||
coinUtilisationPropertiesV2 =
|
||||
coinUtilisationProperties,
|
||||
onAppliedDiscountClicked =
|
||||
payBillViewModelV2::
|
||||
onAppliedDiscountClicked,
|
||||
onAppliedDiscountClicked = {
|
||||
payBillViewModelV2
|
||||
.onAppliedDiscountClicked()
|
||||
naviBbpsAnalytics
|
||||
.onAppliedDiscountClicked(
|
||||
offerDataList =
|
||||
offerDataList,
|
||||
source = source,
|
||||
initialSource =
|
||||
initialSource,
|
||||
coinBurnData =
|
||||
coinBurnData,
|
||||
sessionAttribute =
|
||||
payBillViewModelV2
|
||||
.getNaviBbpsSessionAttributes(),
|
||||
billCategoryEntity =
|
||||
billCategoryEntity,
|
||||
)
|
||||
},
|
||||
isCoinDiscountAppliedClicked =
|
||||
isCoinDiscountApplied,
|
||||
onRemoveDiscountClicked =
|
||||
payBillViewModelV2::
|
||||
onRemoveDiscountClicked,
|
||||
onRemoveDiscountClicked = {
|
||||
payBillViewModelV2
|
||||
.onRemoveDiscountClicked()
|
||||
naviBbpsAnalytics
|
||||
.onRemoveDiscountClicked(
|
||||
offerDataList =
|
||||
offerDataList,
|
||||
source = source,
|
||||
initialSource =
|
||||
initialSource,
|
||||
coinBurnData =
|
||||
coinBurnData,
|
||||
sessionAttribute =
|
||||
payBillViewModelV2
|
||||
.getNaviBbpsSessionAttributes(),
|
||||
billCategoryEntity =
|
||||
billCategoryEntity,
|
||||
)
|
||||
},
|
||||
offerData = offerDataList,
|
||||
isApplied =
|
||||
paymentAmount
|
||||
|
||||
Reference in New Issue
Block a user