添加埋点

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

@@ -111,6 +111,13 @@ static NSString * const kMySkinCellId = @"kMySkinCellId";
- (void)onToggleEdit {
self.editingMode = !self.editingMode;
NSDictionary *extra = @{@"editing": @(self.isEditingMode)};
[[KBMaiPointReporter sharedReporter] reportClickWithEventName:@"click_my_skin_toggle_edit"
pageId:@"my_skin"
elementId:@"toggle_edit"
extra:extra
completion:nil];
//
[self.kb_rightButton setTitle:(self.isEditingMode ? KBLocalized(@"Cancel") : KBLocalized(@"Editor"))
forState:UIControlStateNormal];
@@ -154,6 +161,13 @@ static NSString * const kMySkinCellId = @"kMySkinCellId";
NSArray<NSIndexPath *> *selectedIndexPaths = [[self.collectionView indexPathsForSelectedItems] sortedArrayUsingSelector:@selector(compare:)];
if (selectedIndexPaths.count == 0) return;
NSDictionary *preExtra = @{@"selected_count": @(selectedIndexPaths.count)};
[[KBMaiPointReporter sharedReporter] reportClickWithEventName:@"click_my_skin_delete_btn"
pageId:@"my_skin"
elementId:@"delete_btn"
extra:preExtra
completion:nil];
NSMutableArray<NSString *> *themeIds = [NSMutableArray arrayWithCapacity:selectedIndexPaths.count];
for (NSIndexPath *ip in selectedIndexPaths) {
if (ip.item >= self.data.count) { continue; }
@@ -245,6 +259,16 @@ static NSString * const kMySkinCellId = @"kMySkinCellId";
//
KBMyTheme *theme = self.data[indexPath.item];
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
NSMutableDictionary *extra = [NSMutableDictionary dictionary];
if ([theme.themeId isKindOfClass:NSString.class] && theme.themeId.length > 0) {
extra[@"theme_id"] = theme.themeId;
}
extra[@"index"] = @(indexPath.item);
[[KBMaiPointReporter sharedReporter] reportClickWithEventName:@"click_my_skin_theme_card"
pageId:@"my_skin"
elementId:@"theme_card"
extra:extra.copy
completion:nil];
KBSkinDetailVC *vc = [[KBSkinDetailVC alloc] init];
vc.themeId = theme.themeId;
[self.navigationController pushViewController:vc animated:true];