首页搜索改造及打招呼弹窗的埋点统计

This commit is contained in:
chenguilong
2022-12-01 15:53:35 +08:00
committed by fengshuo
parent 5f3eb53b0a
commit ad3c7285ee
8 changed files with 35 additions and 1 deletions

View File

@@ -93,7 +93,17 @@ UIKIT_EXTERN NSString *const StatisticsServiceEventRoom_wishlist_pop_click; ///
UIKIT_EXTERN NSString *const StatisticsServiceEventRoom_wishlist_panel_show; ///礼物心愿面板曝光
UIKIT_EXTERN NSString *const StatisticsServiceEventRoom_wishlist_panel_click; ///礼物心愿面板赠送点击
UIKIT_EXTERN NSString *const StatisticsServiceEventRoom_wishlist_panel_close_click; ///礼物心愿面板关闭点击
///
#pragma mark - 首页搜索
UIKIT_EXTERN NSString *const StatisticsServiceEventRoom_allinsearch_entry_click; ///词条点击-统计点击时对应词条的名称
UIKIT_EXTERN NSString *const StatisticsServiceEventRoom_allinsearch_entry_room_click; ///统计点击时对应房间的名称
UIKIT_EXTERN NSString *const StatisticsServiceEventRoom_search_input_click; ///统计用户输入搜索框并搜索的内容
UIKIT_EXTERN NSString *const StatisticsServiceEventRoom_search_intercept_pop_show; ///统计弹窗奖励内容的名称
UIKIT_EXTERN NSString *const StatisticsServiceEventRoom_search_intercept_pop_click; ///搜索劫持结果弹窗关闭
#pragma mark - 打招呼弹窗
UIKIT_EXTERN NSString *const StatisticsServiceEventRoom_sayhi_pop_show; ///打招呼弹窗曝光-统计弹窗主播的id
UIKIT_EXTERN NSString *const StatisticsServiceEventRoom_sayhi_pop_find_click; ///打招呼弹窗去找TA点击-统计进房房间的id
UIKIT_EXTERN NSString *const StatisticsServiceEventRoom_sayhi_pop_voice_click; ///打招呼弹窗播放声音秀点击
/// 埋点事件
/// @param eventKey key
+ (void)trackEventWithKey:(NSString *)eventKey;

View File

@@ -89,6 +89,16 @@ NSString *const StatisticsServiceEventRoom_wishlist_pop_click = @"wishlist_pop_c
NSString *const StatisticsServiceEventRoom_wishlist_panel_show = @"wishlist_panel_show"; ///
NSString *const StatisticsServiceEventRoom_wishlist_panel_click = @"wishlist_panel_click"; ///
NSString *const StatisticsServiceEventRoom_wishlist_panel_close_click = @"wishlist_panel_close_click"; ///
#pragma mark -
NSString *const StatisticsServiceEventRoom_allinsearch_entry_click = @"allinsearch_entry_click"; ///-
NSString *const StatisticsServiceEventRoom_allinsearch_entry_room_click = @"allinsearch_entry_room_click"; ///
NSString *const StatisticsServiceEventRoom_search_input_click = @"search_input_click"; ///
NSString *const StatisticsServiceEventRoom_search_intercept_pop_show = @"search_intercept_pop_show"; ///
NSString *const StatisticsServiceEventRoom_search_intercept_pop_click = @"search_intercept_pop_click"; ///
#pragma mark -
NSString *const StatisticsServiceEventRoom_sayhi_pop_show = @"sayhi_pop_show"; ///-id
NSString *const StatisticsServiceEventRoom_sayhi_pop_find_click = @"sayhi_pop_find_click"; ///TA-id
NSString *const StatisticsServiceEventRoom_sayhi_pop_voice_click = @"sayhi_pop_voice_click"; ///
///
/// @param eventKey key

View File

@@ -11,6 +11,7 @@
#import "XPMacro.h"
#import "NetImageView.h"
#import "TTPopup.h"
#import "StatisticsServiceHelper.h"
@interface XPHomeSearchAwardView()
@@ -85,6 +86,7 @@
}
- (void)onCloseBtnClick:(UIButton *)sender {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_search_intercept_pop_click];
[TTPopup dismiss];
}

View File

@@ -10,6 +10,7 @@
#import "NSArray+Safe.h"
#import "ThemeColor.h"
#import "XPMacro.h"
#import "StatisticsServiceHelper.h"
///view
#import "XPSearchListTableViewCell.h"
#import "XPHomeRedommendCollectionViewCell.h"
@@ -110,6 +111,7 @@
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
if (self.recommendArray.count > 0) {
HomeRecommendRoomModel * recommend = [self.recommendArray safeObjectAtIndex1:indexPath.row];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_allinsearch_entry_room_click eventAttributes:@{@"roomTitle" :recommend.title}];
if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeSearchRelateViewEnterRoom:)]) {
[self.delegate xPHomeSearchRelateViewEnterRoom:recommend.roomUid];
}

View File

@@ -15,6 +15,7 @@
#import "ThemeColor.h"
#import "XPHomeSearchNavView.h"
#import "TTPopup.h"
#import "StatisticsServiceHelper.h"
///View
#import "XPHomeSearchViewController.h"
#import "XPRoomSearchRecordViewController.h"
@@ -124,6 +125,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
[textField resignFirstResponder];
[self.presenter getSearchHijack:textField.text];
[self.recordVc storeSearchRecord:textField.text];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_search_input_click eventAttributes:@{@"searchWord":textField.text}];
} else {
[self showErrorToast:@"请输入需要搜索的内容"];
}
@@ -136,6 +138,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
[view.searchTextField resignFirstResponder];
[self.presenter getSearchHijack:view.searchTextField.text];
[self.recordVc storeSearchRecord:view.searchTextField.text];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_search_input_click eventAttributes:@{@"searchWord":view.searchTextField.text}];
} else {
[self showErrorToast:@"请输入需要搜索的内容"];
}
@@ -215,6 +218,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
XPHomeSearchAwardView *view = [[XPHomeSearchAwardView alloc] init];
view.data = data.awardVo;
[TTPopup popupView:view style:TTPopupStyleAlert];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_search_intercept_pop_show eventAttributes:@{@"searchWord":data.awardVo.awardName}];
} else {
[self searchVCLoadData:key];
}

View File

@@ -13,6 +13,7 @@
#import "AccountInfoStorage.h"
#import "TTPopup.h"
#import "NSArray+Safe.h"
#import "StatisticsServiceHelper.h"
///View
#import "XPHomeAttentionCollectionViewCell.h"
#import "XPHomeSearchRecordCell.h"
@@ -207,6 +208,7 @@ NSString * const XPConstSearchRecordStoreKey = @"XPConstSearchRecordStoreKey";
}
} else if (collectionView == self.everyOneCollectionView) {
HomeEveryOneSearchModel *model = [self.everyoneSearchList safeObjectAtIndex1:indexPath.row];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_allinsearch_entry_click eventAttributes:@{@"searchWord" :model.word}];
if (self.delegate && [self.delegate respondsToSelector:@selector(xPRoomSearchRecordViewControllerEveryoneSearch: sid:)]) {
[self.delegate xPRoomSearchRecordViewControllerEveryoneSearch:model.word sid:model.sid];
}

View File

@@ -8,6 +8,7 @@
#import "XPNewUserGreetRoomAlertView.h"
///Third
#import <Masonry/Masonry.h>
#import "StatisticsServiceHelper.h"
///Tool
#import "ThemeColor.h"
#import "NetImageView.h"
@@ -159,6 +160,7 @@
- (void)startButtonAction:(UIButton *)sender {
[TTPopup dismiss];
if (self.greetInfo.roomUid.length > 0) {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_sayhi_pop_find_click eventAttributes:@{@"roomUid": self.greetInfo.roomUid}];
[XPRoomViewController openRoom:self.greetInfo.roomUid fromNick:self.greetInfo.sayHelloUserNickname fromType:UserEnterRoomFromType_New_User_Greet fromUid:self.greetInfo.roomUid viewController:self.currentVC];
}
}
@@ -195,6 +197,7 @@
}];
}];
}
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_sayhi_pop_voice_click];
} else {
self.isPlaying = NO;
sender.selected = NO;

View File

@@ -254,6 +254,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
config.contentView = alertView;
config.maskBackgroundAlpha = 0.8;
[TTPopup popupWithConfig:config];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_sayhi_pop_show eventAttributes:@{@"uid":greetInfo.roomUid}];
} else {
[self.presenter getShortCutRecommendRoom];
}