不再使用百度统计使用友盟统计埋点

This commit is contained in:
fengshuo
2022-10-25 16:47:19 +08:00
parent 0116a81f53
commit 9c0474d559
8 changed files with 31 additions and 13 deletions

View File

@@ -29,8 +29,6 @@ target 'xplan-ios' do
#持久化存储
pod 'SSKeychain'
pod 'Base64'
#统计
pod 'BaiduMobStatCodeless', '~> 5.3.5'
#文字自动滚动
pod 'MarqueeLabel-ObjC'
#声网

View File

@@ -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

View File

@@ -6,7 +6,7 @@
//
#import "StatisticsService.h"
#import <BaiduMobStatCodeless/BaiduMobStat.h>
#import <UMCommon/MobClick.h>
@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

View File

@@ -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

View File

@@ -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

View File

@@ -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",

View File

@@ -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

View File

@@ -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];
}