track In App Purchase Event
fun trackInAppPurchaseEvent(iAPPurchaseInfoMap: HashMap<Analytics.IAPPurchaseInfo, String>, iapType: Analytics.IAPType)
Tracks an in-app purchase event.
Parameters
i APPurchase Info Map
Enum hash map where the key is {@link IAPPurchaseInfo} and the value is the purchase information of the product.
iap Type
Type of in-app purchase being used, from the enum value.
Example: Google IAP
val map = EnumMap<IAPPurchaseInfo, String>(IAPPurchaseInfo::class.java)
map[IAPPurchaseInfo.PRODUCT_ID] = "Provide product id from the purchase made"
map[IAPPurchaseInfo.PRODUCT_TITLE] = "Provide product title from the purchase made"
map[IAPPurchaseInfo.PRODUCT_DESCRIPTION] = "Provide product description from the purchase made"
map[IAPPurchaseInfo.PRODUCT_PRICE] = "Provide product price from the purchase made"
map[IAPPurchaseInfo.PRODUCT_CURRENCY_CODE] = "Provide currency code of the purchase"
map[IAPPurchaseInfo.GOOGLE_PURCHASE_DATA] = "Provide purchaseData object of the purchase"
map[IAPPurchaseInfo.GOOGLE_PURCHASE_SIGNATURE] = "Provide purchaseSignature of the purchase"
Content copied to clipboard
Example: Amazon IAP
val map = EnumMap<IAPPurchaseInfo, String>(IAPPurchaseInfo::class.java)
map[IAPPurchaseInfo.PRODUCT_ID] = "Provide product id from the purchase made"
map[IAPPurchaseInfo.PRODUCT_TITLE] = "Provide product title from the purchase made"
map[IAPPurchaseInfo.PRODUCT_DESCRIPTION] = "Provide product description from the purchase made"
map[IAPPurchaseInfo.PRODUCT_PRICE] = "Provide product price from the purchase made"
map[IAPPurchaseInfo.PRODUCT_CURRENCY_CODE] = "Provide currency code of the purchase"
map[IAPPurchaseInfo.AMAZON_USER_ID] = "Provide amazon user id of the purchase"
map[IAPPurchaseInfo.AMAZON_PURCHASE_TOKEN] = "Provide purchaseToken from the receipt of the purchase"
Content copied to clipboard