Эх сурвалжийг харах

feat: 调整充值埋点事件字段

陈文艺 1 сар өмнө
parent
commit
765d4ec534

+ 1 - 1
Lanu/Manager/Purchase/LNPurchaseManagerOld.swift

@@ -146,7 +146,7 @@ final class RechargeManager: NSObject {
                     
                     let productId = transaction.payment.productIdentifier
                     if let (type, goods) = LNPurchaseManager.shared.goodsFro(productId) {
-                        LNStatisticManager.shared.reportPayment(type: type, amount: goods.coinRechargeAmount, currency: goods.currency, price: goods.amount)
+                        LNStatisticManager.shared.reportPayment(type: type, amount: goods.coinRechargeAmount, currency: goods.currency, price: goods.amount, orderId: orderId)
                     }
                } else {
                    notifyPurchaseResult(err: .receiptVerifyFailed)

+ 2 - 2
Lanu/Manager/Statistic/LNStatisticManager.swift

@@ -119,9 +119,9 @@ extension LNStatisticManager {
         Adjust.trackEvent(event)
     }
     
-    func reportPayment(type: LNCurrencyType, amount: Double, currency: String, price: Double) {
+    func reportPayment(type: LNCurrencyType, amount: Double, currency: String, price: Double, orderId: String) {
         let event = eventFor(.first_payment)
-        event?.addCallbackParameter("user_id", value: myUid)
+        event?.addCallbackParameter("order_id", value: orderId)
         event?.addCallbackParameter("payment_type", value: "\(type.rawValue)")
         event?.addCallbackParameter("payment_amount", value: "\(amount)")
         event?.addCallbackParameter("payment_currency", value: currency)