AntBehavior.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. //
  2. // AntBehavior.h
  3. // APRemoteLogging
  4. //
  5. // Created by 卡迩 on 2017/9/27.
  6. // Copyright © 2017年 Alipay. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "ATEvent.h"
  10. /**
  11. * 行为埋点模型
  12. */
  13. @interface AntBehavior : ATEvent
  14. @property (nonatomic, copy) NSString *actionId; /**< 字段9,行为ID*/
  15. @property (nonatomic, copy) NSString *ABTestInfo; /**< 字段10,ABTest信息*/
  16. @property (nonatomic, copy) NSString *refer; /**< 字段11,refer信息(上一个页面的spm+pageId)*/
  17. @property (nonatomic, copy) NSString *appId; /**< 字段12,子应用ID*/
  18. @property (nonatomic, copy) NSString *xpath; /**< 字段14,控件或页面XPath*/
  19. @property (nonatomic, copy) NSString *entityId; /**< 字段15,数据回流ID(scm)*/
  20. @property (nonatomic, copy) NSString *spm/*seed*/; /**< 字段16,spm,原seed字段*/
  21. @property (nonatomic, assign) AntLogLevel logLevel; /**< 字段17,日志等级,可用于控制日志上报*/
  22. @property (nonatomic, copy) NSString *bizType; /**< 字段18,业务类型,可用于控制日志分文件存储以及上报*/
  23. @property (nonatomic, copy) NSString *renderBiz; /**< 字段18,最终落在日志中的业务类型,该值为空时取bizType字段*/
  24. @property (nonatomic, copy) NSString *extParam1; /**< 字段20,扩展字段1*/
  25. @property (nonatomic, copy) NSString *extParam2; /**< 字段21,扩展字段2*/
  26. @property (nonatomic, copy) NSString *extParam3; /**< 字段22,扩展字段3*/
  27. @property (nonatomic, copy) NSDictionary *extParam4;/**< 字段23,扩展字段4,转换成‘key=value^key1=value1’的形式落入日志.*/
  28. @property (nonatomic, copy) NSString *ucId; /**< 字段27,用例编号*/
  29. @end
  30. ////////////////////////////////////////////////////////////////////////////////
  31. @interface AntBehavior (/**Private*/)
  32. @property (nonatomic, strong) NSString *header; /**< 字段1,日志头,默认D-VM*/
  33. @property (nonatomic, strong) NSDate *timestamp; /**< 字段2,客户端日志时间*/
  34. @property (nonatomic, strong) NSString *platformId; /**< 字段3,客户端ProductID. 如 IPHONE_1ND*/
  35. @property (nonatomic, strong) NSString *clientVersion;/**< 字段4,客户端版本*/
  36. @property (nonatomic, strong) NSString *logVersion; /**< 字段5,客户端日志模型版本号*/
  37. @property (nonatomic, strong) NSString *clientId; /**< 字段6,[imei]|[imsi] 客户端ID*/
  38. @property (nonatomic, strong) NSString *sessionId; /**< 字段7,客户端会话ID*/
  39. @property (nonatomic, strong) NSString *userId; /**< 字段8,用户ID*/
  40. @property (nonatomic, strong) NSString *pageStartTime;/**< 字段13,页面打开时间戳,单位ms,64进制*/
  41. @property (nonatomic, strong) NSString *logType; /**< 字段19,日志类型,固定为'c'*/
  42. @property (nonatomic, strong) NSString *sourceId; /**< 字段24,营销来源.*/
  43. @property (nonatomic, strong) NSString *pageStayTime; /**< 字段25,页面停留时长*/
  44. @property (nonatomic, strong) NSString *utdid; /**< 字段26,utdid设备ID*/
  45. @property (nonatomic, copy ) NSString *pageId; /**< 字段28,页面Id,格式为"spmId__utdid__timestampIn64_"*/
  46. @property (nonatomic, copy ) NSString *lastViewId; /**< 字段29,上一个ViewId*/
  47. @property (nonatomic, copy ) NSString *viewId; /**< 字段30,当前ViewId*/
  48. @property (nonatomic, copy ) NSString *trackId; /**< 字段31,当前ACTIONID*/
  49. @property (nonatomic, copy ) NSString *trackToken; /**< 字段32,当前ACTION_TOKEN*/
  50. @property (nonatomic, assign) unsigned long long sampleRate; /**< 字段33,当前抽样率0~1000,代表0.1%~100%*/
  51. @property (nonatomic, strong) NSString *deviceModel; /**< 字段34,手机型号*/
  52. @property (nonatomic, strong) NSString *systemVersion;/**< 字段35,操作系统版本号*/
  53. @property (nonatomic, strong) NSString *networkType; /**< 字段36,网络类型*/
  54. @property (nonatomic, strong) NSString *innerVersion; /**< 字段37,内部版本号*/
  55. @property (nonatomic, strong) NSString *distributionChannel; /**< 字段38,App发布渠道*/
  56. @property (nonatomic, strong) NSString *language; /**< 字段39,App语言*/
  57. @property (nonatomic, strong) NSString *hpVersion; /**< 字段40,hotpatch版本号*/
  58. @property (nonatomic, strong) NSString *cpuCoreNum; /**< 字段41,Android独有,cpu核数*/
  59. @property (nonatomic, strong) NSString *cpuMaxFreq; /**< 字段42.Android独有,CPU MaxFreq,单位MHz*/
  60. @property (nonatomic, strong) NSString *totalMem; /**< 字段43.Android独有,TotalMem,单位MB*/
  61. @property (nonatomic, strong) NSString *foundationExtended; /**< 字段44.全局扩展字段*/
  62. @property (nonatomic, strong) NSString *spmStatus; /**< 字段45,spm状态,标识pageStart,pageEnd是否有效*/
  63. @property (nonatomic, strong) NSString *resolution; /**< 字段46,分辨率*/
  64. @property (nonatomic, strong) NSString *processName; /**< 字段47,Android独有,进程名*/
  65. @property (nonatomic, strong) NSString *logSequenceId;/**< 字段48,日志序列号*/
  66. @property (nonatomic, strong) NSString *logIDFA; /**< 字段49,IDFA值*/
  67. @end
  68. ////////////////////////////////////////////////////////////////////////////////
  69. @interface AntBehavior (Compatibility)
  70. /**
  71. * 生成一个AntBehavior对象,兼容老的埋点接口参数
  72. */
  73. + (AntBehavior *)behaviorWithActionId:(NSString *)actionId
  74. extParams:(NSArray *)extParams
  75. appId:(NSString *)appId
  76. seed:(NSString *)seed
  77. ucId:(NSString *)ucId
  78. bizType:(NSString *)bizType
  79. extInfo:(NSDictionary *)extInfo;
  80. #ifdef SDK_IS4_ALIPAY
  81. /**
  82. * 生成一个AntBehavior对象,兼容老的埋点接口参数
  83. */
  84. + (AntBehavior *)behaviorWithLogDictionary:(NSDictionary *)dict;
  85. #endif
  86. @end