添加埋点
This commit is contained in:
@@ -293,6 +293,11 @@ static NSString * const kKBVipReviewListCellId = @"kKBVipReviewListCellId";
|
||||
|
||||
#pragma mark - Action
|
||||
- (void)onTapClose{
|
||||
[[KBMaiPointReporter sharedReporter] reportClickWithEventName:@"click_vip_close_btn"
|
||||
pageId:@"vip_pay"
|
||||
elementId:@"close_btn"
|
||||
extra:nil
|
||||
completion:nil];
|
||||
[self.navigationController popViewControllerAnimated:true];
|
||||
}
|
||||
|
||||
@@ -303,6 +308,15 @@ static NSString * const kKBVipReviewListCellId = @"kKBVipReviewListCellId";
|
||||
[KBHUD showInfo:KBLocalized(@"Please select a product")];
|
||||
return;
|
||||
}
|
||||
NSMutableDictionary *extra = [NSMutableDictionary dictionary];
|
||||
if ([plan.productId isKindOfClass:NSString.class] && plan.productId.length > 0) {
|
||||
extra[@"product_id"] = plan.productId;
|
||||
}
|
||||
[[KBMaiPointReporter sharedReporter] reportClickWithEventName:@"click_vip_pay_btn"
|
||||
pageId:@"vip_pay"
|
||||
elementId:@"pay_btn"
|
||||
extra:extra.copy
|
||||
completion:nil];
|
||||
NSString *productId = plan.productId;
|
||||
if (productId.length == 0) {
|
||||
[KBHUD showInfo:KBLocalized(@"Product unavailable")];
|
||||
@@ -326,6 +340,11 @@ static NSString * const kKBVipReviewListCellId = @"kKBVipReviewListCellId";
|
||||
}
|
||||
|
||||
- (void)onTapRestoreButton {
|
||||
[[KBMaiPointReporter sharedReporter] reportClickWithEventName:@"click_vip_restore_btn"
|
||||
pageId:@"vip_pay"
|
||||
elementId:@"restore_btn"
|
||||
extra:nil
|
||||
completion:nil];
|
||||
[KBHUD show];
|
||||
__weak typeof(self) weakSelf = self;
|
||||
[[KBStoreKitBridge shared] restorePurchasesWithCompletion:^(BOOL success, NSString * _Nullable message) {
|
||||
@@ -386,6 +405,18 @@ static NSString * const kKBVipReviewListCellId = @"kKBVipReviewListCellId";
|
||||
if (self.selectedIndex == indexPath.item) { return; }
|
||||
NSInteger old = self.selectedIndex;
|
||||
self.selectedIndex = indexPath.item;
|
||||
|
||||
KBPayProductModel *plan = (indexPath.item < self.plans.count) ? self.plans[indexPath.item] : nil;
|
||||
NSMutableDictionary *extra = [NSMutableDictionary dictionary];
|
||||
extra[@"index"] = @(indexPath.item);
|
||||
if ([plan.productId isKindOfClass:NSString.class] && plan.productId.length > 0) {
|
||||
extra[@"product_id"] = plan.productId;
|
||||
}
|
||||
[[KBMaiPointReporter sharedReporter] reportClickWithEventName:@"click_vip_select_plan"
|
||||
pageId:@"vip_pay"
|
||||
elementId:@"plan_item"
|
||||
extra:extra.copy
|
||||
completion:nil];
|
||||
|
||||
KBVipSubscribeCell *newCell = (KBVipSubscribeCell *)[collectionView cellForItemAtIndexPath:indexPath];
|
||||
[newCell applySelected:YES animated:YES];
|
||||
|
||||
Reference in New Issue
Block a user