提交了一部分统计的内容

This commit is contained in:
fengshuo
2021-09-27 20:16:27 +08:00
parent 2b6b0e29ce
commit 54fee4527a
5 changed files with 37 additions and 2 deletions

View File

@@ -13,6 +13,12 @@ NS_ASSUME_NONNULL_BEGIN
@interface StatisticsServiceHelper : NSObject
UIKIT_EXTERN NSString *const StatisticsServiceEventAppLaunch;
#pragma mark - 登录模块的
UIKIT_EXTERN NSString *const StatisticsServiceEventOneClickLoginSuccess; ///一键登录成功
UIKIT_EXTERN NSString *const StatisticsServiceEventLoginPhoneClick;///手机登录
UIKIT_EXTERN NSString *const StatisticsServiceEventLoginQQClick;///QQ登录
UIKIT_EXTERN NSString *const StatisticsServiceEventLoginWXClick;///wx登录
UIKIT_EXTERN NSString *const StatisticsServiceEventLoginRepariSuccess;///注册个人资料保存成功
/// 埋点事件
/// @param eventKey key

View File

@@ -11,6 +11,12 @@
@implementation StatisticsServiceHelper
NSString *const StatisticsServiceEventAppLaunch = @"app_launch";
#pragma mark -
NSString *const StatisticsServiceEventOneClickLoginSuccess = @"one_click_login_succeed";
NSString *const StatisticsServiceEventLoginPhoneClick = @"login_phone_click";
NSString *const StatisticsServiceEventLoginQQClick = @"login_qq_click";///QQ
NSString *const StatisticsServiceEventLoginWXClick = @"login_wx_click";///wx
NSString *const StatisticsServiceEventLoginRepariSuccess = @"login_repari_success";///
///
/// @param eventKey key
@@ -43,6 +49,12 @@ NSString *const StatisticsServiceEventAppLaunch = @"app_launch";
+ (NSString *)getTrackEventDescripWithKey:(NSString *)key {
NSDictionary * dic = @{
StatisticsServiceEventAppLaunch:@"应用启动",
StatisticsServiceEventOneClickLoginSuccess:@"一键登录成功",
StatisticsServiceEventLoginPhoneClick:@"手机登录",
StatisticsServiceEventLoginQQClick:@"qq登录",
StatisticsServiceEventLoginWXClick:@"微信登录",
StatisticsServiceEventLoginRepariSuccess:@"注册时候的个人资料保存成功"
};
NSString * decription = [dic objectForKey:StatisticsServiceEventAppLaunch];
return decription;

View File

@@ -14,6 +14,7 @@
#import "ThemeColor.h"
#import "UIImage+Utils.h"
#import "UIButton+EnlargeTouchArea.h"
#import "StatisticsServiceHelper.h"
///Model
#import "ThirdUserInfo.h"
///P
@@ -201,6 +202,7 @@
}
- (void)complementInfoSuccess {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventLoginRepariSuccess];
UIViewController *vc = self.presentingViewController;
while (vc.presentingViewController) {
vc = vc.presentingViewController;

View File

@@ -18,6 +18,7 @@
#import "XPMacro.h"
#import "ThemeColor.h"
#import "XPConstant.h"
#import "StatisticsServiceHelper.h"
///Present
#import "LoginPresenter.h"
#import "LoginProtocol.h"
@@ -219,9 +220,23 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
if ([view isEqual:self.phoneButtonView]) {
LoginPhoneViewController *inputPhoneVC = [[LoginPhoneViewController alloc] init];
[self.navigationController pushViewController:inputPhoneVC animated:YES];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventLoginPhoneClick];
} else{
ThirdLoginType type = view.tag - 1000;
[self.presenter thirdLoginWithType:type];
///
switch (type) {
case ThirdLoginType_QQ:
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventLoginQQClick];
break;
case ThirdLoginType_WeChat:
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventLoginWXClick];
break;
case ThirdLoginType_Apple:
break;
default:
break;
}
}
} else {
[UIView animateWithDuration:0.5 animations:^{
@@ -283,7 +298,7 @@ typedef NS_ENUM(NSUInteger, XYLoginType) {
dispatch_main_sync_safe(^{
@strongify(self)
// [TTStatisticsService trackEvent:@"one_click_login_succeed" eventDescribe:@"一键登录成功"];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventOneClickLoginSuccess];
// // acessToken
[self hideHUD];
[self dismissViewControllerAnimated:YES completion:nil];