forked from organicmaps/organicmaps
[iOS] Fixes in subscription statistic
https://jira.mail.ru/browse/MAPSME-14118
This commit is contained in:
parent
485fb8467c
commit
8f08049ea2
5 changed files with 16 additions and 9 deletions
|
@ -381,7 +381,8 @@ final class CatalogWebViewController: WebViewController {
|
|||
let testGroup = PromoCampaignManager.manager().paidRoutesSubscriptionCampaign.testGroupStatName
|
||||
let stats = InAppPurchase.paidRouteStatistics(serverId: productInfo.id,
|
||||
productId: productId,
|
||||
testGroup: testGroup)
|
||||
testGroup: testGroup,
|
||||
source: kStatWebView)
|
||||
let paymentVC = PaidRouteViewController(name: productInfo.name,
|
||||
author: productInfo.author,
|
||||
imageUrl: URL(string: productInfo.imageUrl ?? ""),
|
||||
|
|
|
@ -74,11 +74,6 @@ class AllPassSubscriptionViewController: BaseSubscriptionViewController {
|
|||
.year: annualDiscountLabel])
|
||||
|
||||
self.preferredContentSize = CGSize(width: 414, height: contentView.frame.height)
|
||||
|
||||
Statistics.logEvent(kStatInappShow, withParameters: [kStatVendor: MWMPurchaseManager.allPassProductIds,
|
||||
kStatPurchase: MWMPurchaseManager.allPassSubscriptionServerId(),
|
||||
kStatProduct: MWMPurchaseManager.allPassProductIds()[0],
|
||||
kStatFrom: source], with: .realtime)
|
||||
}
|
||||
|
||||
@IBAction func onAnnualButtonTap(_ sender: UIButton) {
|
||||
|
|
|
@ -98,6 +98,9 @@ class BaseSubscriptionViewController: MWMViewController {
|
|||
self?.subscriptionManager?.subscribe(to: subscription)
|
||||
}
|
||||
}
|
||||
Statistics.logEvent(kStatInappSelect, withParameters: [kStatPurchase: subscriptionManager?.serverId ?? "",
|
||||
kStatProduct: subscription.productId],
|
||||
with: .realtime)
|
||||
Statistics.logEvent(kStatInappPay, withParameters: [kStatPurchase: subscriptionManager?.serverId ?? ""],
|
||||
with: .realtime)
|
||||
}
|
||||
|
|
|
@ -3,15 +3,18 @@ class PaidRouteStatistics: IPaidRouteStatistics {
|
|||
let productId: String
|
||||
let vendor: String
|
||||
let testGroup: String
|
||||
let source: String
|
||||
|
||||
init(serverId: String,
|
||||
productId: String,
|
||||
vendor: String,
|
||||
testGroup: String) {
|
||||
testGroup: String,
|
||||
source: String) {
|
||||
self.serverId = serverId
|
||||
self.productId = productId
|
||||
self.vendor = vendor
|
||||
self.testGroup = testGroup
|
||||
self.source = source
|
||||
}
|
||||
|
||||
func logPreviewShow() {
|
||||
|
|
|
@ -13,8 +13,13 @@ final class InAppPurchase: NSObject {
|
|||
|
||||
static func paidRouteStatistics(serverId: String,
|
||||
productId: String,
|
||||
testGroup: String) -> IPaidRouteStatistics {
|
||||
return PaidRouteStatistics(serverId: serverId, productId: productId, vendor: BOOKMARKS_VENDOR, testGroup: testGroup)
|
||||
testGroup: String,
|
||||
source: String) -> IPaidRouteStatistics {
|
||||
return PaidRouteStatistics(serverId: serverId,
|
||||
productId: productId,
|
||||
vendor: BOOKMARKS_VENDOR,
|
||||
testGroup: testGroup,
|
||||
source: source)
|
||||
}
|
||||
|
||||
@objc
|
||||
|
|
Loading…
Add table
Reference in a new issue