From 9c0474d55992040bfefaac836d083007ba595acc Mon Sep 17 00:00:00 2001 From: fengshuo <963787902@qq.com> Date: Tue, 25 Oct 2022 16:47:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=86=8D=E4=BD=BF=E7=94=A8=E7=99=BE?= =?UTF-8?q?=E5=BA=A6=E7=BB=9F=E8=AE=A1=E4=BD=BF=E7=94=A8=E5=8F=8B=E7=9B=9F?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile | 2 -- Podfile.lock | 6 +----- .../Base/Tool/StatisticsService/StatisticsService.m | 12 ++++++++---- .../Tool/StatisticsService/StatisticsServiceHelper.h | 7 ++++++- .../Tool/StatisticsService/StatisticsServiceHelper.m | 6 ++++++ xplan-ios/Global/XPConstant.m | 2 +- .../XPRoomFunctionContainerView.m | 5 +++++ .../View/WishGift/View/XPWishGiftViewController.m | 4 ++++ 8 files changed, 31 insertions(+), 13 deletions(-) diff --git a/Podfile b/Podfile index 86444868..5b49a51b 100644 --- a/Podfile +++ b/Podfile @@ -29,8 +29,6 @@ target 'xplan-ios' do #持久化存储 pod 'SSKeychain' pod 'Base64' - #统计 - pod 'BaiduMobStatCodeless', '~> 5.3.5' #文字自动滚动 pod 'MarqueeLabel-ObjC' #声网 diff --git a/Podfile.lock b/Podfile.lock index ac2268ed..0fd0a919 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -15,7 +15,6 @@ PODS: - AFNetworking/UIKit (4.0.1): - AFNetworking/NSURLSession - AgoraRtcEngine_iOS (3.0.1.1) - - BaiduMobStatCodeless (5.3.5) - Base64 (1.1.2) - CocoaAsyncSocket (7.6.5) - FFPopup (1.1.5) @@ -91,7 +90,6 @@ PODS: DEPENDENCIES: - AFNetworking - AgoraRtcEngine_iOS (~> 3.0.1) - - BaiduMobStatCodeless (~> 5.3.5) - Base64 - CocoaAsyncSocket - FFPopup @@ -141,7 +139,6 @@ SPEC REPOS: trunk: - AFNetworking - AgoraRtcEngine_iOS - - BaiduMobStatCodeless - Base64 - FFPopup - HappyDNS @@ -179,7 +176,6 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce AgoraRtcEngine_iOS: 8ccceaaecff2e80ab28fcd33f3dfd2b417eb5365 - BaiduMobStatCodeless: b3c73335cc1a5d464540111ff08857fc33cae656 Base64: cecfb41a004124895a7bcee567a89bae5a89d49b CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 FFPopup: a208dcee8db3e54ec4a88fcd6481f6f5d85b7a83 @@ -219,6 +215,6 @@ SPEC CHECKSUMS: YYText: 5c461d709e24d55a182d1441c41dc639a18a4849 YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928 -PODFILE CHECKSUM: 034aba5260596f012774aa92cf2207105b5af99f +PODFILE CHECKSUM: 45b39f2f1f2dc3c34a960cba0c8214df5d55635c COCOAPODS: 1.11.3 diff --git a/xplan-ios/Base/Tool/StatisticsService/StatisticsService.m b/xplan-ios/Base/Tool/StatisticsService/StatisticsService.m index 9d8c8fc9..82865d4f 100644 --- a/xplan-ios/Base/Tool/StatisticsService/StatisticsService.m +++ b/xplan-ios/Base/Tool/StatisticsService/StatisticsService.m @@ -6,7 +6,7 @@ // #import "StatisticsService.h" -#import +#import @implementation StatisticsService @@ -31,7 +31,11 @@ if (event == nil || event.length == 0) { return; } - [[BaiduMobStat defaultStat] logEvent:event eventLabel:describe attributes:attributes]; + if (attributes.allKeys.count > 0) { + [MobClick event:event attributes:attributes]; + } else { + [MobClick event:event label:describe]; + } } @@ -42,7 +46,7 @@ if (event == nil || event.length == 0) { return; } - [[BaiduMobStat defaultStat] eventStart:event eventLabel:describe]; + [MobClick beginEvent:event label:describe]; } @@ -53,7 +57,7 @@ if (event == nil || event.length == 0){ return; } - [[BaiduMobStat defaultStat] eventEnd:event eventLabel:describe]; + [MobClick endEvent:event label:describe]; } @end diff --git a/xplan-ios/Base/Tool/StatisticsService/StatisticsServiceHelper.h b/xplan-ios/Base/Tool/StatisticsService/StatisticsServiceHelper.h index 64b7d481..fe2d2d9c 100644 --- a/xplan-ios/Base/Tool/StatisticsService/StatisticsServiceHelper.h +++ b/xplan-ios/Base/Tool/StatisticsService/StatisticsServiceHelper.h @@ -87,7 +87,12 @@ UIKIT_EXTERN NSString *const StatisticsServiceEventcollection_editbutton_complet UIKIT_EXTERN NSString *const StatisticsServiceEventcollection_entry; ///我的收藏页面访问,统计用户默认落入的tab分类 UIKIT_EXTERN NSString *const StatisticsServiceEventcollection_selectall_click; ///全选按钮点击 UIKIT_EXTERN NSString *const StatisticsServiceEventcollection_delete_click; ///删除按钮点击 - +///许愿礼物 +UIKIT_EXTERN NSString *const StatisticsServiceEventRoom_wishlist_pop_show; ///礼物心愿气泡曝光 +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; ///礼物心愿面板关闭点击 /// /// 埋点事件 /// @param eventKey key diff --git a/xplan-ios/Base/Tool/StatisticsService/StatisticsServiceHelper.m b/xplan-ios/Base/Tool/StatisticsService/StatisticsServiceHelper.m index 0978a591..689e9832 100644 --- a/xplan-ios/Base/Tool/StatisticsService/StatisticsServiceHelper.m +++ b/xplan-ios/Base/Tool/StatisticsService/StatisticsServiceHelper.m @@ -83,6 +83,12 @@ NSString *const StatisticsServiceEventcollection_editbutton_complete_click = @"c NSString *const StatisticsServiceEventcollection_entry = @"collection_entry"; ///我的收藏页面访问,统计用户默认落入的tab分类 NSString *const StatisticsServiceEventcollection_selectall_click = @"collection_selectall_click"; ///全选按钮点击 NSString *const StatisticsServiceEventcollection_delete_click = @"collection_delete_click"; ///删除按钮点击 +#pragma mark - 心愿礼物 +NSString *const StatisticsServiceEventRoom_wishlist_pop_show = @"wishlist_pop_show"; ///礼物心愿气泡曝光 +NSString *const StatisticsServiceEventRoom_wishlist_pop_click = @"wishlist_pop_click"; ///礼物心愿气泡点击 +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"; ///礼物心愿面板关闭点击 /// 埋点事件 /// @param eventKey key diff --git a/xplan-ios/Global/XPConstant.m b/xplan-ios/Global/XPConstant.m index 61e56bb3..5ef89b90 100644 --- a/xplan-ios/Global/XPConstant.m +++ b/xplan-ios/Global/XPConstant.m @@ -75,7 +75,7 @@ NSString * const KeyWithType(KeyType type) { @(KeyType_NetEase) : @"82a8d602aacbbb27a1c0fc809052286e", @(KeyType_APNSCer) : @"yinyouApnsDebug", @(keyType_YiDunBussinessId) : @"be58dfa4a664540006f0ed1f752d604a", - @(keyType_UMengAppKey) : @"5ff6bc6dadb42d5826a1cbc4", + @(keyType_UMengAppKey) : @"61b065e8e014255fcba606d1", @(keyType_UMengAppChannel) : @"App Store", @(KeyType_FacePwdEncode) : @"1ea53d260ecf11e7b56e00163e046a26", @(KeyType_SudGameAppID) : @"1467745235064848385", diff --git a/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m b/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m index ca4111e2..359d8b5e 100644 --- a/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m +++ b/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m @@ -1677,6 +1677,7 @@ vc.delegate = self; vc.modalPresentationStyle = UIModalPresentationOverFullScreen; [self.delegate.getCurrentNav presentViewController:vc animated:YES completion:nil]; + [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_wishlist_pop_click]; } - (void)configWishGiftEnter { @@ -1745,6 +1746,10 @@ } [self.wishGiftVC getWishGiftListSuccess:array]; } + + if (attachment.second == Custom_Message_Sub_Wish_Gift_Open) { + [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_wishlist_pop_show]; + } } #pragma mark - Getters And Setters diff --git a/xplan-ios/Main/Room/View/WishGift/View/XPWishGiftViewController.m b/xplan-ios/Main/Room/View/WishGift/View/XPWishGiftViewController.m index 7cb706a3..399a9663 100644 --- a/xplan-ios/Main/Room/View/WishGift/View/XPWishGiftViewController.m +++ b/xplan-ios/Main/Room/View/WishGift/View/XPWishGiftViewController.m @@ -12,6 +12,7 @@ #import "ThemeColor.h" #import "NetImageView.h" #import "XPMacro.h" +#import "StatisticsServiceHelper.h" ///View #import "XPWishGiftInfoView.h" ///Model @@ -178,6 +179,7 @@ NSString * giftId = [NSString stringWithFormat:@"%ld", info.giftId]; [self.delegate xPWishGiftViewControllerSendClick:giftId]; } + [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_wishlist_panel_click eventAttributes:@{@"giftName" : info.giftName.length > 0 ? info.giftName : @""}]; } #pragma mark - XPWishGiftProtocol @@ -198,6 +200,7 @@ NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12], NSForegroundColorAttributeName:[ThemeColor textThirdColor]}]; [attribute addAttribute:NSForegroundColorAttributeName value:[ThemeColor colorWithHexString:@"#FFC300"] range:[title rangeOfString:number]]; self.assistNumLabel.attributedText = attribute; + [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_wishlist_panel_show]; } - (void)getWishGiftListSuccess:(NSArray *)list { @@ -223,6 +226,7 @@ #pragma mark - Event Response - (void)disMissView { + [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventRoom_wishlist_panel_close_click]; [self dismissViewControllerAnimated:YES completion:nil]; }