添加房间埋点
This commit is contained in:
@@ -60,6 +60,26 @@ UIKIT_EXTERN NSString *const StatisticsServiceEventusercenter_banner_click; ///
|
||||
#pragma mark - 活动任务
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventtask_toast_show; ///任务完成toast曝光
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventtask_toast_click; ///任务完成toast点击(跳转活动页
|
||||
#pragma mark - 房间
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventuser_visit_room; ///用户访问房间(进入时统计房间的ID,该房间的停留时长)
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_return_click; ///房间返回按钮点击(右滑返回不统计在内)
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_online_list_click; ///房间在线列表点击
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_collect_icon_click; ///房间收藏按钮点击(统计收藏房间的ID)
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_more_icon_click; ///房间更多按钮点击(统计用户展开面板后的行为:● 举报房间● 收起房间● 退出房间● 分享房间● 为你推荐(统计用户跳转后的房间ID))
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_giftlist_click;///房间榜单点击
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_ranklist_click; ///房间小时榜点击
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_mike_show; ///房间麦位曝光,只统计该房间在麦上的用户及ID
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_mike_click; ///房间麦位点击,统计用户展开面板后的行为:● 送礼物● 私聊● 关注TA● @TA● 关闭● 资料卡
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_banner_show; ///房间banner曝光,统计曝光banner的ID
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_banner_click; ///房间banner点击,统计点击banner的ID
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_pop_show; ///房间pop曝光,统计曝光pop的名称,如新人充值、糖果树、航海冒险
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_pop_click; ///房间pop点击,统计点击pop的名称,如新人充值、糖果树、航海冒险
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_chatbox_click; ///房间聊天框点击
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_music_click; ///房间音乐点击
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_privateletter_click; ///房间私信点击
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_noble_click; ///房间贵族点击
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_gift_click; ///房间送礼点击
|
||||
UIKIT_EXTERN NSString *const StatisticsServiceEventroom_more_tool_click; ///房间底部更多工具栏点击,统计用户展开面板后的行为
|
||||
|
||||
///
|
||||
/// 埋点事件
|
||||
|
@@ -56,6 +56,26 @@ NSString *const StatisticsServiceEventusercenter_banner_click = @"usercenter_ban
|
||||
#pragma mark - 活动任务
|
||||
NSString *const StatisticsServiceEventtask_toast_show = @"task_toast_show"; ///任务完成toast曝光
|
||||
NSString *const StatisticsServiceEventtask_toast_click = @"task_toast_click"; ///任务完成toast点击(跳转活动页
|
||||
#pragma mark - 房间
|
||||
NSString *const StatisticsServiceEventuser_visit_room = @"user_visit_room"; ///用户访问房间(进入时统计房间的ID,该房间的停留时长)
|
||||
NSString *const StatisticsServiceEventroom_return_click = @"room_return_click"; ///房间返回按钮点击(右滑返回不统计在内)
|
||||
NSString *const StatisticsServiceEventroom_online_list_click = @"room_online_list_click"; ///房间在线列表点击
|
||||
NSString *const StatisticsServiceEventroom_collect_icon_click = @"room_collect_icon_click"; ///房间收藏按钮点击(统计收藏房间的ID)
|
||||
NSString *const StatisticsServiceEventroom_more_icon_click = @"room_more_icon_click"; ///房间更多按钮点击(统计用户展开面板后的行为:● 举报房间● 收起房间● 退出房间● 分享房间● 为你推荐(统计用户跳转后的房间ID))
|
||||
NSString *const StatisticsServiceEventroom_giftlist_click = @"room_giftlist_click"; ///房间榜单点击
|
||||
NSString *const StatisticsServiceEventroom_ranklist_click = @"room_ranklist_click"; ///房间小时榜点击
|
||||
NSString *const StatisticsServiceEventroom_mike_show = @"room_mike_show"; ///房间麦位曝光,只统计该房间在麦上的用户及ID
|
||||
NSString *const StatisticsServiceEventroom_mike_click = @"room_mike_click"; ///房间麦位点击,统计用户展开面板后的行为:● 送礼物● 私聊● 关注TA● @TA● 关闭● 资料卡
|
||||
NSString *const StatisticsServiceEventroom_banner_show = @"room_banner_show"; ///房间banner曝光,统计曝光banner的ID
|
||||
NSString *const StatisticsServiceEventroom_banner_click = @"room_banner_click"; ///房间banner点击,统计点击banner的ID
|
||||
NSString *const StatisticsServiceEventroom_pop_show = @"room_pop_show"; ///房间pop曝光,统计曝光pop的名称,如新人充值、糖果树、航海冒险
|
||||
NSString *const StatisticsServiceEventroom_pop_click = @"room_pop_click"; ///房间pop点击,统计点击pop的名称,如新人充值、糖果树、航海冒险
|
||||
NSString *const StatisticsServiceEventroom_chatbox_click = @"room_chatbox_click"; ///房间聊天框点击
|
||||
NSString *const StatisticsServiceEventroom_music_click = @"room_music_click"; ///房间音乐点击
|
||||
NSString *const StatisticsServiceEventroom_privateletter_click = @"room_privateletter_click"; ///房间私信点击
|
||||
NSString *const StatisticsServiceEventroom_noble_click = @"room_noble_click"; ///房间贵族点击
|
||||
NSString *const StatisticsServiceEventroom_gift_click = @"room_gift_click"; ///房间送礼点击
|
||||
NSString *const StatisticsServiceEventroom_more_tool_click = @"room_more_tool_click"; ///房间底部更多工具栏点击,统计用户展开面板后的行为
|
||||
|
||||
/// 埋点事件
|
||||
/// @param eventKey key
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#import "TTPopup.h"
|
||||
#import "XCHUDTool.h"
|
||||
#import "XPMacro.h"
|
||||
#import "StatisticsServiceHelper.h"
|
||||
///Model
|
||||
#import "UserInfoModel.h"
|
||||
#import "RoomInfoModel.h"
|
||||
@@ -391,13 +392,16 @@
|
||||
|
||||
#pragma mark - SDCycleScrollViewDelegate
|
||||
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index {
|
||||
if (self.activityList.count > index) {
|
||||
ActivityInfoModel * info = [self.activityList objectAtIndex:index];
|
||||
if (self.activityList.count > index) {
|
||||
ActivityInfoModel * info = [self.activityList objectAtIndex:index];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_banner_click eventAttributes:@{@"bannerName": info.bannerName}];
|
||||
if ([info.bannerName isEqualToString:@"糖果树"]) {
|
||||
[self candyTreeTapRecognizer];
|
||||
} else if([info.bannerName isEqualToString:@"首充有礼"]) {
|
||||
[self firstRechargeTapRecognizer];
|
||||
} else {
|
||||
} else if ([info.bannerName isEqualToString:@"航海"]) {
|
||||
[self sailingTapRecognizer];
|
||||
} else {
|
||||
if (info.skipType == ActivitySkipType_Room) {
|
||||
[self.hostDelegate exitRoom];
|
||||
[XPRoomViewController openRoom:info.skipUri viewController:self.hostDelegate.getCurrentNav];
|
||||
@@ -418,14 +422,31 @@
|
||||
}
|
||||
}
|
||||
|
||||
/** 图片滚动回调 */
|
||||
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didScrollToIndex:(NSInteger)index {
|
||||
if (self.activityList.count > index) {
|
||||
ActivityInfoModel * info = [self.activityList objectAtIndex:index];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_banner_show eventAttributes:@{@"bannerName": info.bannerName}];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)candyTreeTapRecognizer {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_pop_click eventAttributes:@{@"bannerName": @"糖果树"}];
|
||||
XPCandyTreeViewController * candyTreeVC = [[XPCandyTreeViewController alloc] initWithDelegate:self.hostDelegate];
|
||||
candyTreeVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
[self.hostDelegate.getCurrentNav presentViewController:candyTreeVC animated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)sailingTapRecognizer {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_pop_click eventAttributes:@{@"bannerName": @"航海"}];
|
||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
XPSailingViewController * sailingVC = [[XPSailingViewController alloc] initWithRoomUid:roomUid];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:sailingVC animated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)firstRechargeTapRecognizer {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_pop_click eventAttributes:@{@"bannerName": @"首充有礼"}];
|
||||
XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:self.hostDelegate.getCurrentNav];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:firstRechargeVC animated:YES completion:nil];
|
||||
}
|
||||
@@ -466,26 +487,27 @@
|
||||
[self.playModeView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(itemWidth * 2 + 20, 53));
|
||||
}];
|
||||
for (XPRoomActivityPlayModel *model in self.playModeArray) {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_pop_show eventAttributes:@{@"bannerName": model.name}];
|
||||
}
|
||||
}
|
||||
|
||||
///隐藏更多玩法
|
||||
- (void)xPRoomActivityPlayViewHideMorePlay {
|
||||
self.playModeView.playArray = nil;
|
||||
[self.playModeView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(18, 53));
|
||||
}];
|
||||
if (self.hostDelegate.getRoomInfo.type != RoomType_MiniGame) {
|
||||
self.playModeView.playArray = nil;
|
||||
[self.playModeView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(18, 53));
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
///点击了某个玩法
|
||||
- (void)xPRoomActivityPlayViewDidClickPlay:(XPRoomActivityPlayModel *)model {
|
||||
if (model.playType == RoomActivityPlayTypeSailing) {
|
||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
XPSailingViewController * sailingVC = [[XPSailingViewController alloc] initWithRoomUid:roomUid];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:sailingVC animated:YES completion:nil];
|
||||
[self sailingTapRecognizer];
|
||||
} else if (model.playType == RoomActivityPlayTypeCandyTree) {
|
||||
XPCandyTreeViewController * candyTreeVC = [[XPCandyTreeViewController alloc] initWithDelegate:self.hostDelegate];
|
||||
candyTreeVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
[self.hostDelegate.getCurrentNav presentViewController:candyTreeVC animated:YES completion:nil];
|
||||
[self candyTreeTapRecognizer];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1083,6 +1083,7 @@
|
||||
} else {
|
||||
[self updateContrionEntranceWithRoomUid:roomUid type:@"day"];
|
||||
}
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_giftlist_click eventAttributes:@{@"roomUid" : roomUid}];
|
||||
}
|
||||
|
||||
- (void)onAnchorHourRankButtonAction:(UITapGestureRecognizer *)ges {
|
||||
@@ -1091,6 +1092,7 @@
|
||||
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
|
||||
webView.url = [NSString stringWithFormat:@"%@?roomUid=%@", url, roomUid];
|
||||
[TTPopup popupView:webView style:TTPopupStyleActionSheet];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_ranklist_click eventAttributes:@{@"roomUid" : roomUid}];
|
||||
}
|
||||
|
||||
- (void)datingProgresButtonAction:(UIButton *)sender {
|
||||
@@ -1187,6 +1189,7 @@
|
||||
[UIView animateWithDuration:0.2 animations:^{
|
||||
self.musicEnterButton.hidden = YES;
|
||||
} completion:nil];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_music_click];
|
||||
}
|
||||
|
||||
#pragma mark - 房间话题
|
||||
|
@@ -94,7 +94,7 @@
|
||||
} else {
|
||||
self.inputTextView = [XPRoomSendTextView showTextView:self.superview delegate:self.delegate atUid:nil atNick:nil];
|
||||
}
|
||||
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_chatbox_click];
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
}
|
||||
break;
|
||||
case XPRoomMenuItemType_Gift: {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_gift_click];
|
||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", [self.delegate getRoomInfo].uid];
|
||||
XPSendGiftView * giftView = [[XPSendGiftView alloc] initWithType:SendGiftType_Room uid:roomUid];
|
||||
giftView.delegate = self.delegate;
|
||||
@@ -121,6 +122,7 @@
|
||||
break;
|
||||
case XPRoomMenuItemType_Message:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_privateletter_click];
|
||||
UIViewController * controller = (UIViewController *)self.delegate;
|
||||
XPRoomHalfMessageView *halfMessageView = [[XPRoomHalfMessageView alloc] initWithFrame:CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight) controller:controller];
|
||||
[controller.view addSubview:halfMessageView];
|
||||
@@ -169,6 +171,7 @@
|
||||
break;
|
||||
case XPRoomMenuItemType_Noble: {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventvipEntranceRoomClick];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_noble_click];
|
||||
XPNobleCenterViewController * nobleVC = [[XPNobleCenterViewController alloc] initWithRoomUid:self.delegate.getRoomInfo.uid];
|
||||
[self.delegate.getCurrentNav pushViewController:nobleVC animated:YES];
|
||||
}
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "ThemeColor.h"
|
||||
#import "RtcManager.h"
|
||||
#import "StatisticsServiceHelper.h"
|
||||
///Model
|
||||
#import "XPRoomMoreItemModel.h"
|
||||
#import "RoomInfoModel.h"
|
||||
@@ -230,6 +231,7 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
switch (item.type) {
|
||||
case RoomMoreMenuType_Gift_Value_Close:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeGiftValue"}];
|
||||
if (self.roomInfo.roomModeType == RoomModeType_Open_Blind) {
|
||||
[self showErrorToast:@"相亲模式中不能关闭房间礼物值"];
|
||||
return;
|
||||
@@ -245,16 +247,20 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
}
|
||||
break;
|
||||
case RoomMoreMenuType_Gift_Value_Open:
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openGiftValue"}];
|
||||
[self.presenter openRoomGiftValue:roomUid];
|
||||
break;
|
||||
case RoomMoreMenuType_Message_Screen_Open:
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openScreen"}];
|
||||
[self.presenter updateRoomMessageScreenState:NO roomId:roomId];
|
||||
break;
|
||||
case RoomMoreMenuType_Message_Screen_Close:
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeScreen"}];
|
||||
[self.presenter updateRoomMessageScreenState:YES roomId:roomId];
|
||||
break;
|
||||
case RoomMoreMenuType_Gift_Effect_Open:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openGiftEffect"}];
|
||||
[self showSuccessToast:@"礼物特效已开启"];
|
||||
NSDictionary * dic = @{@"hasAnimationEffect": @(1)};
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomGiftEffectUpdateNotificationKey object:dic];
|
||||
@@ -263,6 +269,7 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
break;
|
||||
case RoomMoreMenuType_Gift_Effect_Close:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeGiftEffect"}];
|
||||
[self showSuccessToast:@"礼物特效已关闭"];
|
||||
NSDictionary * dic = @{@"hasAnimationEffect": @(0)};
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomGiftEffectUpdateNotificationKey object:dic];
|
||||
@@ -271,6 +278,7 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
break;
|
||||
case RoomMoreMenuType_Invite_Fans:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"inviteFans"}];
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.roomInfo.uid];
|
||||
XPRoomInviteFansView * inviteFansView = [[XPRoomInviteFansView alloc]initWithRoomUid:roomUid];
|
||||
@@ -279,6 +287,7 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
break;
|
||||
case RoomMoreMenuType_Room_Setting:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"roomSetting"}];
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
XPRoomSettingViewController * roomsettingVC = [[XPRoomSettingViewController alloc] initWithDelegate:self.hostDelegate];
|
||||
[self.hostDelegate.getCurrentNav pushViewController:roomsettingVC animated:YES];
|
||||
@@ -305,10 +314,12 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
[self.presenter openRoomDating:roomUid];
|
||||
} cancelHandler:^{
|
||||
}];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openRoomDating"}];
|
||||
}
|
||||
break;
|
||||
case RoomMoreMenuType_Room_Dating_Close:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeRoomDating"}];
|
||||
TTAlertConfig * config = [[TTAlertConfig alloc] init];
|
||||
config.title = @"提示";
|
||||
config.message = @"关闭相亲模式?";
|
||||
@@ -322,10 +333,12 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
break;
|
||||
case RoomMoreMenuType_Release_Radio:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"releaseRadio"}];
|
||||
[self.presenter getRoomRadioMessageListWithType:[NSString stringWithFormat:@"%zd", self.roomInfo.type]];
|
||||
}
|
||||
break;
|
||||
case RoomMoreMenuType_Room_trumpet:
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"trumpet"}];
|
||||
[self.presenter getRoomgetUserVipRoomTrumpet:roomUid];
|
||||
break;
|
||||
case RoomMoreMenuType_Room_Across_PK_Open:
|
||||
@@ -344,10 +357,12 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
[self dismissViewControllerAnimated:NO completion:nil];
|
||||
XPAcrossRoomPKViewController * acrossRoomPKVC = [[XPAcrossRoomPKViewController alloc] initWithRoomUid:roomUid];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:acrossRoomPKVC animated:YES completion:nil];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openAcrossPk"}];
|
||||
}
|
||||
break;
|
||||
case RoomMoreMenuType_Room_Across_PK_Close:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeAcrossPk"}];
|
||||
[self showErrorToast:@"正在跨房PK中!"];
|
||||
[self dismissViewControllerAnimated:NO completion:nil];
|
||||
}
|
||||
@@ -357,10 +372,12 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
[self dismissViewControllerAnimated:NO completion:nil];
|
||||
XPAnchorPKViewController * acrossRoomPKVC = [[XPAnchorPKViewController alloc] initWithRoomUid:roomUid];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:acrossRoomPKVC animated:YES completion:nil];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openAnchorPk"}];
|
||||
}
|
||||
break;
|
||||
case RoomMoreMenuType_Room_Anchor_PK_Close:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeAnchorPk"}];
|
||||
if (self.roomInfo.pkState == AcrossRoomPkStateTypePenalty) {
|
||||
if ([self.roomInfo.winUid isEqualToString:[AccountInfoStorage instance].getUid]) {//赢
|
||||
if (self.roomInfo.roundId) {
|
||||
@@ -383,6 +400,7 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
break;
|
||||
case RoomMoreMenuType_Message_Screen_Clear:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"clearScreen"}];
|
||||
TTAlertConfig * config = [[TTAlertConfig alloc] init];
|
||||
config.title = @"提示";
|
||||
config.message = @"确定要清空公屏消息吗?\n(清空后不可恢复哦~)";
|
||||
@@ -411,10 +429,12 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
[self dismissViewControllerAnimated:NO completion:nil];
|
||||
XPRoomPKViewController * roomPKVC = [[XPRoomPKViewController alloc] initWithDelegate:self.hostDelegate];
|
||||
[self.hostDelegate.getCurrentNav pushViewController:roomPKVC animated:YES];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openRoomPk"}];
|
||||
}
|
||||
break;
|
||||
case RoomMoreMenuType_Room_PK_Close:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeRoomPk"}];
|
||||
[self dismissViewControllerAnimated:NO completion:nil];
|
||||
XPRoomPKViewController * roomPKVC = [[XPRoomPKViewController alloc] initWithDelegate:self.hostDelegate];
|
||||
[self.hostDelegate.getCurrentNav pushViewController:roomPKVC animated:YES];
|
||||
@@ -422,6 +442,7 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
break;
|
||||
case RoomMoreMenuType_Room_redPacket:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"redPacket"}];
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
XPRoomSendRedPacketViewController *sendRedPacketVC = [[XPRoomSendRedPacketViewController alloc] initWithDelegate:self.hostDelegate];
|
||||
sendRedPacketVC.roomUid = roomUid;
|
||||
@@ -433,6 +454,7 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
||||
break;
|
||||
case RoomMoreMenuType_Room_Voice:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"voice"}];
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
[RtcManager instance].remoteMuted = !item.isSelected;
|
||||
item.isSelected = [RtcManager instance].isRemoteMuted;
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#import "HttpRequestHelper.h"
|
||||
#import "Api+Room.h"
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
#import "StatisticsServiceHelper.h"
|
||||
///Model
|
||||
#import "RoomInfoModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
@@ -84,6 +85,7 @@
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)backButtonAction:(UIButton *)sender {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_return_click eventAttributes:@{@"roomUid" : @(self.hostDelegate.getRoomInfo.uid)}];
|
||||
[self.hostDelegate miniRoom];
|
||||
}
|
||||
|
||||
@@ -117,6 +119,7 @@
|
||||
}
|
||||
|
||||
- (void)onlineTapRecognizer {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_online_list_click eventAttributes:@{@"roomUid" : @(self.hostDelegate.getRoomInfo.uid)}];
|
||||
XPRoomOnLineViewController * onlineVC = [[XPRoomOnLineViewController alloc] initWithDelegate:self.hostDelegate];
|
||||
[self.hostDelegate.getCurrentNav pushViewController:onlineVC animated:YES];
|
||||
}
|
||||
@@ -273,6 +276,7 @@
|
||||
if (code == 200) {
|
||||
sender.selected= !sender.selected;
|
||||
if ([type isEqualToString:@"1"]) {///收藏的话
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_collect_icon_click eventAttributes:@{@"roomUid" : @(self.hostDelegate.getRoomInfo.uid)}];
|
||||
[XCHUDTool showSuccessWithMessage:@"收藏成功"];
|
||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||
[dic setValue:[AccountInfoStorage instance].getUid forKey:@"uid"];
|
||||
@@ -341,6 +345,7 @@
|
||||
|
||||
#pragma mark - XPRoomRecommendViewDelegate
|
||||
- (void)xPRoomRecommendViewReport {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_icon_click eventAttributes:@{@"reportRoom" : @(self.hostDelegate.getRoomInfo.uid)}];
|
||||
[FFPopup dismissPopupForView:self.recommendRoomView animated:NO];
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
NSString *urlstr = [NSString stringWithFormat:@"%@?reportUid=%ld&source=ROOM", URLWithType(kReportRoomURL),self.hostDelegate.getRoomInfo.uid];
|
||||
@@ -349,21 +354,25 @@
|
||||
}
|
||||
|
||||
- (void)xPRoomRecommendViewMiniRoom {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_icon_click eventAttributes:@{@"miniRoom" : @(self.hostDelegate.getRoomInfo.uid)}];
|
||||
[FFPopup dismissPopupForView:self.recommendRoomView animated:NO];
|
||||
[self.hostDelegate miniRoom];
|
||||
}
|
||||
|
||||
- (void)xPRoomRecommendViewExitRoom {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_icon_click eventAttributes:@{@"exitRoom" : @(self.hostDelegate.getRoomInfo.uid)}];
|
||||
[FFPopup dismissPopupForView:self.recommendRoomView animated:NO];
|
||||
[self.hostDelegate exitRoom];
|
||||
}
|
||||
|
||||
- (void)xPRoomRecommendViewShare {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_icon_click eventAttributes:@{@"shareRoom" : @(self.hostDelegate.getRoomInfo.uid)}];
|
||||
[FFPopup dismissPopupForView:self.recommendRoomView animated:NO];
|
||||
[self showSharePanel];
|
||||
}
|
||||
|
||||
- (void)xPRoomRecommendViewJumpToRoom:(NSString *)roomUid {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_icon_click eventAttributes:@{@"jumpToRoom" : roomUid}];
|
||||
[FFPopup dismissPopupForView:self.recommendRoomView animated:NO];
|
||||
[self.hostDelegate exitRoom];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#import "Api+Room.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "XPRoomMiniManager.h"
|
||||
#import "StatisticsServiceHelper.h"
|
||||
// Models
|
||||
#import "RoomInfoModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
@@ -196,6 +197,7 @@
|
||||
BOOL selfNeedBroadcast = NO;
|
||||
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
|
||||
BOOL leaveMode = roomInfo.leaveMode;
|
||||
NSMutableArray *statisMicArray = [NSMutableArray array];
|
||||
for (int i = 0; i < self.countOfMircoView; i++) {
|
||||
MicroQueueModel * model = [self.micQueue objectForKey:[self indexToPosition:i]];
|
||||
|
||||
@@ -221,8 +223,14 @@
|
||||
selfNeedBroadcast = YES;///个播房房主默认角色为主播
|
||||
}
|
||||
}
|
||||
if (model.userInfo) {
|
||||
NSString *str = [NSString stringWithFormat:@"micIndex:%d,uid:%ld", i, model.userInfo.uid];
|
||||
[statisMicArray addObject:str];
|
||||
}
|
||||
}
|
||||
|
||||
if (statisMicArray.count) {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_show eventAttributes:@{@"roomMicShow": statisMicArray.toJSONString}];
|
||||
}
|
||||
if (leaveMode) {
|
||||
UserInfoModel *owner = [[UserInfoModel alloc] init];
|
||||
owner.avatar = roomInfo.avatar;
|
||||
@@ -520,6 +528,7 @@
|
||||
model.superMangerList = self.hostDelegate.getRoomSuperAdminList;
|
||||
XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:userCardVC animated:YES completion:nil];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"userCard"}];
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#import "SpriteSheetImageManager.h"
|
||||
#import "UIImage+Utils.h"
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
#import "StatisticsServiceHelper.h"
|
||||
///Model
|
||||
#import "UserInfoModel.h"
|
||||
#import "XPUserCardItemModel.h"
|
||||
@@ -738,6 +739,7 @@
|
||||
switch (model.type) {
|
||||
case UserCardItemType_Chat:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"chat"}];
|
||||
[self dismissViewControllerAnimated:YES completion:^{
|
||||
UIViewController * controller = (UIViewController *)self.cardInfo.delegate;
|
||||
XPRoomHalfMessageView *halfMessageView = [[XPRoomHalfMessageView alloc] initWithFrame:CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight) controller:controller];
|
||||
@@ -754,6 +756,7 @@
|
||||
break;
|
||||
case UserCardItemType_Gift:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"sendGift"}];
|
||||
[self dismissViewControllerAnimated:NO completion:nil];
|
||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.cardInfo.roomInfo.uid];
|
||||
XPSendGiftView * giftView = [[XPSendGiftView alloc] initWithType:SendGiftType_Room uid:roomUid];
|
||||
@@ -764,10 +767,12 @@
|
||||
}
|
||||
break;
|
||||
case UserCardItemType_Attention:
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"attention"}];
|
||||
[self.presenter attentionUser:self.cardInfo.uid status:!model.isSelect];
|
||||
break;
|
||||
case UserCardItemType_KickOut:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"kickout"}];
|
||||
// 1、判断是否为防被踢用户
|
||||
if (self.targetUserInfo.userVipInfoVO.preventKick) {
|
||||
//2、判断是否为管理员操作
|
||||
@@ -827,6 +832,7 @@
|
||||
break;
|
||||
case UserCardItemType_Black:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"blacklist"}];
|
||||
// 1、判断是否为防被踢用户
|
||||
if (self.targetUserInfo.userVipInfoVO.preventKick) {
|
||||
//2、判断是否为管理员操作
|
||||
@@ -885,6 +891,7 @@
|
||||
break;
|
||||
case UserCardItemType_Manager:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"manager"}];
|
||||
if (meIsSuperAdmin) {
|
||||
[self.presenter superAdminHandleUser:self.cardInfo.uid opt:@"1" roomUid:roomUid isSet:!model.isSelect];
|
||||
} else {
|
||||
@@ -894,6 +901,7 @@
|
||||
break;
|
||||
case UserCardItemType_Invite_Micro:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"invite_micro"}];
|
||||
if ([AccountInfoStorage instance].getUid.integerValue == self.targetUserInfo.uid) {
|
||||
[self.presenter upMicro:roomId position:model.position userInfo:self.targetUserInfo];
|
||||
} else {
|
||||
@@ -921,6 +929,7 @@
|
||||
break;
|
||||
case UserCardItemType_AtUser:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"atUser"}];
|
||||
if (self.cardInfo.roomInfo.isCloseScreen) {
|
||||
[self showErrorToast:@"房间公屏已关闭"];
|
||||
return;
|
||||
@@ -950,6 +959,7 @@
|
||||
switch (sender.tag) {
|
||||
case UserCardMicroType_UpDown:
|
||||
{
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"downMic"}];
|
||||
if (sender.selected) {
|
||||
if ([self isInSudGame:self.cardInfo.uid]) {
|
||||
if (self.cardInfo.uid.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
@@ -976,12 +986,15 @@
|
||||
}
|
||||
break;
|
||||
case UserCardMicroType_Lock:
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"lockMic"}];
|
||||
[self.presenter microLock:roomUid state:sender.selected position:self.cardInfo.position];
|
||||
break;
|
||||
case UserCardMicroType_Mute:
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"muteMic"}];
|
||||
[self.presenter microMute:roomUid state:sender.selected position:self.cardInfo.position];
|
||||
break;
|
||||
case UserCardMicroType_Clean_Gift_Value:
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"cleanGiftValue"}];
|
||||
[self.presenter cleanUserGiftValue:roomUid micUid:self.cardInfo.uid];
|
||||
break;
|
||||
default:
|
||||
@@ -998,6 +1011,7 @@
|
||||
}
|
||||
|
||||
- (void)closeButtonAction:(UIButton *)sender {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"close"}];
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#import "Api+ArrangeMic.h"
|
||||
#import "Api+Room.h"
|
||||
#import "DESEncrypt.h"
|
||||
#import "StatisticsServiceHelper.h"
|
||||
///Model
|
||||
#import "RoomInfoModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
@@ -805,6 +806,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
||||
//上报进房
|
||||
if (self.roomInfo != nil) {
|
||||
[self.presenter reportUserInterRoom:[NSString stringWithFormat:@"%zd", self.roomInfo.uid]];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventuser_visit_room eventAttributes:@{@"roomUid" : @(self.roomInfo.uid)}];
|
||||
}
|
||||
if (self.giftId.length) {
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"kShowGiftView" object:@{@"giftId": self.giftId}];
|
||||
|
Reference in New Issue
Block a user