Files
yinmeng-ios/xplan-ios/Base/Tool/StatisticsService/StatisticsServiceHelper.h
2021-09-27 20:16:27 +08:00

43 lines
1.4 KiB
Objective-C

//
// StatisticsServiceHelper.h
// xplan-ios
//
// Created by 冯硕 on 2021/9/27.
//项目中埋点的数据 尽可能的使用这个类 进行参数的构建 在getTrackEventDescripWithKey 方法中配置相对应的event 和 decribe
/// 在.m中 生成一个key 在.h中 exten 即可
#import <Foundation/Foundation.h>
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
+ (void)trackEventWithKey:(NSString *)eventKey;
/// 埋点事件带参数
/// @param eventKey key
/// @param eventAttributes 参数
+ (void)trackEventWithKey:(NSString *)eventKey eventAttributes:(NSDictionary * _Nullable)eventAttributes;
/// 统计时长 开始
/// @param eventKey key
+ (void)trackEventStartWithKey:(NSString *)eventKey;
/// 统计时长 结束
/// @param eventKey key
+ (void)trackEventEndWithKey:(NSString *)eventKey;
@end
NS_ASSUME_NONNULL_END