新人充值、个人中心增加埋点

This commit is contained in:
chenguilong
2022-08-08 13:15:04 +08:00
parent c1f1c5b487
commit bbbdafe641
9 changed files with 104 additions and 0 deletions

View File

@@ -120,6 +120,8 @@
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_recharge_card_show];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_noble_card_show];
}
- (void)viewDidAppear:(BOOL)animated {
@@ -399,12 +401,14 @@
///
- (void)xpMineHeadViewClickAcount {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_recharge_card_click];
[self pushViewControllerWithType:XPMineItemType_Account functionItem:nil];
}
///
- (void)xPMineHeadViewCliekNobleCenter {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventvipEntranceMeClick];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_noble_card_click];
[self pushViewControllerWithType:XPMineItemType_Noble_Center functionItem:nil];
}
@@ -418,6 +422,12 @@
[self.functionArray removeObject:obj];
}
}];
NSMutableArray *array = [NSMutableArray array];
for (XPMineFuntionItemModel *item in self.functionArray) {
[array addObject:item.centerName];
}
NSString *trackName = [array componentsJoinedByString:@","];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_function_show eventAttributes:@{@"functionName" : trackName}];
[self.tableView reloadData];
}
@@ -426,6 +436,12 @@
[self.littleGameArray removeAllObjects];
[self.littleGameArray addObjectsFromArray:items];
[self.tableView reloadData];
NSMutableArray *array = [NSMutableArray array];
for (LittleGameInfoModel *item in self.littleGameArray) {
[array addObject:item.name];
}
NSString *trackName = [array componentsJoinedByString:@","];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_quick_entry_show eventAttributes:@{@"gameName" : trackName}];
}
///banner
@@ -433,6 +449,12 @@
[self.bannerArray removeAllObjects];
[self.bannerArray addObjectsFromArray:items];
[self.tableView reloadData];
NSMutableArray *array = [NSMutableArray array];
for (HomeBannerInfoModel *item in self.bannerArray) {
[array addObject:item.bannerId];
}
NSString *trackName = [array componentsJoinedByString:@","];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_banner_show eventAttributes:@{@"bannerId" : trackName}];
}
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
@@ -461,6 +483,7 @@
make.top.mas_equalTo(kNavigationHeight + 80);
make.size.mas_equalTo(CGSizeMake(74, 88));
}];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventUsercenterNugiftPopShow];
}
self.userRechargeView.endTime = userInfo.limitChargeEndTime;
} else {
@@ -486,9 +509,11 @@
///
- (void)quickMatchLittleGameRoomSuccess:(HomeLittleGameRoomModel *)roomInfo mgId:(NSString *)mgId {
if (roomInfo.isPick && roomInfo.uid.length > 0) {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_quick_entrysuccess_click eventAttributes:@{@"roomUid" : roomInfo.uid}];
[XPRoomViewController openRoom:roomInfo.uid viewController:self];
} else if (roomInfo.needOpenSelfRoom) {
NSString* roomUid = [NSString stringWithFormat:@"%ld", (long)self.userInfo.uid];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_quick_entrysuccess_click eventAttributes:@{@"roomUid" : roomUid}];
[Api getRoomInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if (code == 200) {
RoomInfoModel * roomInfo = [RoomInfoModel modelWithJSON:data.data];
@@ -533,12 +558,14 @@
#pragma mark - XPMineHeadItemTableViewCellDelegate
- (void)xPMineHeadItemTableViewCell:(XPMineHeadItemTableViewCell *)cell didSelectItem:(XPMineFuntionItemModel *)item {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_function_click eventAttributes:@{@"functionName" : item.centerName}];
[self pushViewControllerWithType:item.skipType functionItem:item];
}
#pragma mark - XPHomeBannerTableViewCellDelegate
///banner
- (void)xPHomeBannerTableViewCell:(XPHomeBannerTableViewCell *)view didClickBanner:(HomeBannerInfoModel *)info {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_banner_click eventAttributes:@{@"bannerId" : info.bannerId}];
switch (info.skipType) {
case HomeBannerInfoSkipType_Room:
{
@@ -573,6 +600,7 @@
#pragma mark -
- (void)onNewUserRechargeTap:(UITapGestureRecognizer *)ges {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventUsercenterNugiftPopClick];
XPNewUserRechargeViewController *vc = [[XPNewUserRechargeViewController alloc] initWithNavigation:self.navigationController];
[self.navigationController presentViewController:vc animated:YES completion:nil];
}