添加埋点
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user