添加埋点

This commit is contained in:
2026-01-06 19:25:34 +08:00
parent 1096f24c57
commit c3909d63da
30 changed files with 784 additions and 39 deletions

View File

@@ -202,6 +202,18 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
NSInteger old = self.selectedIndex;
self.selectedIndex = indexPath.item;
KBPayProductModel *item = (indexPath.item < self.data.count) ? self.data[indexPath.item] : nil;
NSMutableDictionary *extra = [NSMutableDictionary dictionary];
extra[@"index"] = @(indexPath.item);
if ([item.productId isKindOfClass:NSString.class] && item.productId.length > 0) {
extra[@"product_id"] = item.productId;
}
[[KBMaiPointReporter sharedReporter] reportClickWithEventName:@"click_points_select_product"
pageId:@"points_recharge"
elementId:@"product_item"
extra:extra.copy
completion:nil];
KBJfPayCell *newCell = (KBJfPayCell *)[collectionView cellForItemAtIndexPath:indexPath];
[newCell applySelected:YES animated:YES];
if (old >= 0 && old < self.data.count) {
@@ -319,6 +331,15 @@ static NSString * const kKBJfPayCellId = @"kKBJfPayCellId";
[KBHUD showInfo:KBLocalized(@"Please select a product")];
return;
}
NSMutableDictionary *extra = [NSMutableDictionary dictionary];
if ([selectedItem.productId isKindOfClass:NSString.class] && selectedItem.productId.length > 0) {
extra[@"product_id"] = selectedItem.productId;
}
[[KBMaiPointReporter sharedReporter] reportClickWithEventName:@"click_points_pay_btn"
pageId:@"points_recharge"
elementId:@"pay_btn"
extra:extra.copy
completion:nil];
NSString *productId = selectedItem.productId;
if (productId.length == 0) {
[KBHUD showInfo:KBLocalized(@"Product unavailable")];