admin
2023-04-21 57e30bc2584b92ce3da3821bd0f6e040f2ad28df
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
//
//  BDAutoTrack- GameTrack.h
//  Applog
//
//  Created by bob on 2019/7/17.
//
 
#import "BDAutoTrack.h"
 
NS_ASSUME_NONNULL_BEGIN
 
FOUNDATION_EXTERN NSString * const kGTGameParameterLevel;
 
/*!
 BDAutoTrack 内置联运游戏上报API
 事件名称都有 gt 前缀
 具体参数参照接口人发送的文档
 */
@interface BDAutoTrack (GameTrack)
 
#pragma mark - AD
/**
 广告按钮点击:gt_ad_button_click
 ad_type     string  广告类型:激励视频、插屏、banner等,直接使用汉字或者英文进行标识
 ad_position_type  string  广告点位类型:按照提供分类接入
 ad_position string  广告点位:复活、翻倍、试用、buff、奖励道具、新道具、减CD等,直接使用文字或者英文进行标识
 触发条件:用户点击app内各广告位button时。
 */
- (void)adButtonClickEventWithADType:(NSString *)adType
                        positionType:(NSString *)positionType
                            position:(NSString *)position
                         otherParams:(nullable NSDictionary *)otherParams;
 
/**
 广告开始展示:gt_ad_show
 ad_type           string  广告类型:激励视频、插屏、banner等,直接使用汉字或者英文进行标识
 ad_position_type  string  广告点位类型:按照提供分类接入
 ad_position       string  广告点位:复活、翻倍、试用、buff、奖励道具、新道具、减CD等,直接使用文字或者英文进行标识
 触发条件:用户点击并观看广告时。穿山甲广告有回调,可以直接获取。
 */
- (void)adShowEventWithADType:(NSString *)adType
                 positionType:(NSString *)positionType
                     position:(NSString *)position
                  otherParams:(nullable NSDictionary *)otherParams;
 
 
/**
 广告结束展示:gt_ad_show_end
 ad_type           string  广告类型:激励视频、插屏、banner等,直接使用汉字或者英文进行标识
 ad_position_type  string  广告点位类型:按照提供分类接入
 ad_position       string  广告点位:复活、翻倍、试用、buff、奖励道具、新道具、减CD等,直接使用文字或者英文进行标识
 result            string  广告观看结果:跳过、成功、失败等,使用英文进行标识.  跳过标记为skip, 成功标记为success,失败为fail
 触发条件:用户观看广告结束时。
 */
- (void)adShowEndEventWithADType:(NSString *)adType
                    positionType:(NSString *)positionType
                        position:(NSString *)position
                          result:(NSString *)result
                     otherParams:(nullable NSDictionary *)otherParams;
 
#pragma mark - Level
/**
 (总等级)升级和经验:gt_levelup
 lev             int 当前玩家等级
 get_exp     int 获得经验
 method      string  获得经验途径:闯关成功、引导完成、领取奖励等,使用汉字或者英文进行标识
 aflev          int 用户获得经验后等级,如获得经验未导致升级,则lev=aflev,如导致升级,则lev<aflev
 触发条件:用户获得经验或者等级发生变化时。
 */
- (void)levelUpEventWithLevel:(NSInteger)level
                          exp:(NSInteger)exp
                       method:(NSString *)method
                   afterLevel:(NSInteger)afterLevel
                  otherParams:(nullable NSDictionary *)otherParams;
 
#pragma mark - play
 
/**
 开始玩法:gt_start_play
 ectype_name string  针对闯关性质玩法,标注关卡名称
 触发条件:用户开始玩法时。
 */
- (void)startPlayEventWithName:(NSString *)ecTypeName
                   otherParams:(nullable NSDictionary *)otherParams;
 
/**
 结束玩法:gt_end_play
 ectype_name string  针对闯关性质玩法,标注关卡名称
 result      string  玩法的结果:未完成、成功、失败等,使用英文进行标识.  未完成标记为uncompleted, 成功标记为success,失败为fail
 duration    int 消耗时间,单位秒
 触发条件:用户结束玩法时,涵盖中途退出、完成但失败和完成且成功。
 */
- (void)endPlayEventWithName:(NSString *)ecTypeName
                      result:(NSString *)result
                     duration:(NSInteger)duration
                  otherParams:(nullable NSDictionary *)otherParams;
 
#pragma mark - coins
 
/**
 获得游戏币:gt_get_coins
 coin_type    string    货币类型:元宝、绑元、金币、银币等,使用文字或者英文进行标识
 method    string    获得途径:观看激励视频、闯关成功、活动奖励等,使用文字或者英文进行标识
 coin_num    int    获得数量
 触发条件:用户获得游戏币,导致游戏币增加时
 */
- (void)getCoinsEventWitType:(NSString *)coinType
                      method:(NSString *)method
                  coinNumber:(NSInteger)number
                 otherParams:(nullable NSDictionary *)otherParams;
 
/**
 消耗游戏币:gt_cost_coins
 coin_type    string    货币类型:元宝、绑元、金币、银币等,使用文字或者英文进行标识
 method    string    消耗途径:复活、购买道具、解锁关卡等,使用文字或者英文进行标识
 coin_num    int    消耗数量
 触发条件:用户消耗游戏币,导致游戏币减少时。
 */
- (void)costCoinsEventWitType:(NSString *)coinType
                       method:(NSString *)method
                   coinNumber:(NSInteger)number
                  otherParams:(nullable NSDictionary *)otherParams;
 
#pragma mark - Purchase
 
/**
 内购充值相关:purchase
 content_type  string  内购充值内容类型
 content_name  string  内购充值内容名称
 content_id    string  内购充值内容id
 content_num   int 内购充值内容的数量
 payment_channel string  支付渠道
 currency      string  支付货币类型
 is_success    string  支付是否成功
 currency_amount int 支付的金额,单位元
 触发条件:用户完成内购充值并获得对应的游戏内货币和道具时
 */
- (void)purchaseEventWithContentType:(NSString *)contentType
                         contentName:(NSString *)contentName
                           contentID:(NSString *)contentID
                          contentNum:(NSInteger)contentNum
                             channel:(NSString *)channel
                            currency:(NSString *)currency
                           isSuccess:(NSString *)isSuccess
                      currencyAmount:(NSInteger)currencyAmount
                         otherParams:(nullable NSDictionary *)otherParams;
 
#pragma mark - InitInfo
/**
 初始化信息:gt_init_info
 lev    int    玩家等级
 coin_type    string    获得货币的类型
 coin_left    int    用户身上剩余的货币数量
 role_id    string    玩家角色id-cp侧
 触发条件:用户启动游戏,初始化完成时上报
 */
- (void)gameInitInfoEventWithLevel:(NSInteger)level
                          coinType:(NSString *)coinType
                          coinLeft:(NSInteger)coinLeft
                       otherParams:(nullable NSDictionary *)otherParams;
 
@end
 
 
/*!
 BDAutoTrack 内置联运游戏上报API
 事件名称都有 gt 前缀
 具体参数参照接口人发送的文档
 */
 
/*!
 特别说明:
    先调用[BDAutoTrack startTrackWithConfig:config];
    之后调用BDAutoTrack的游戏埋点接口
*/
@interface BDAutoTrack (SharedGameTrack)
 
#pragma mark - AD
/**
 广告按钮点击:gt_ad_button_click
 ad_type     string  广告类型:激励视频、插屏、banner等,直接使用汉字或者英文进行标识
 ad_position_type  string  广告点位类型:按照提供分类接入
 ad_position string  广告点位:复活、翻倍、试用、buff、奖励道具、新道具、减CD等,直接使用文字或者英文进行标识
 触发条件:用户点击app内各广告位button时。
 */
+ (void)adButtonClickEventWithADType:(NSString *)adType
                        positionType:(NSString *)positionType
                            position:(NSString *)position
                         otherParams:(nullable NSDictionary *)otherParams;
 
/**
 广告开始展示:gt_ad_show
 ad_type           string  广告类型:激励视频、插屏、banner等,直接使用汉字或者英文进行标识
 ad_position_type  string  广告点位类型:按照提供分类接入
 ad_position       string  广告点位:复活、翻倍、试用、buff、奖励道具、新道具、减CD等,直接使用文字或者英文进行标识
 触发条件:用户点击并观看广告时。穿山甲广告有回调,可以直接获取。
 */
+ (void)adShowEventWithADType:(NSString *)adType
                 positionType:(NSString *)positionType
                     position:(NSString *)position
                  otherParams:(nullable NSDictionary *)otherParams;
 
 
/**
 广告结束展示:gt_ad_show_end
 ad_type           string  广告类型:激励视频、插屏、banner等,直接使用汉字或者英文进行标识
 ad_position_type  string  广告点位类型:按照提供分类接入
 ad_position       string  广告点位:复活、翻倍、试用、buff、奖励道具、新道具、减CD等,直接使用文字或者英文进行标识
 result            string  广告观看结果:跳过、成功、失败等,使用英文进行标识.  跳过标记为skip, 成功标记为success,失败为fail
 触发条件:用户观看广告结束时。
 */
+ (void)adShowEndEventWithADType:(NSString *)adType
                    positionType:(NSString *)positionType
                        position:(NSString *)position
                          result:(NSString *)result
                     otherParams:(nullable NSDictionary *)otherParams;
 
#pragma mark - Level
/**
 (总等级)升级和经验:gt_levelup
 lev             int 当前玩家等级
 get_exp     int 获得经验
 method      string  获得经验途径:闯关成功、引导完成、领取奖励等,使用汉字或者英文进行标识
 aflev          int 用户获得经验后等级,如获得经验未导致升级,则lev=aflev,如导致升级,则lev<aflev
 触发条件:用户获得经验或者等级发生变化时。
 */
+ (void)levelUpEventWithLevel:(NSInteger)level
                          exp:(NSInteger)exp
                       method:(NSString *)method
                   afterLevel:(NSInteger)afterLevel
                  otherParams:(nullable NSDictionary *)otherParams;
 
#pragma mark - play
 
/**
 开始玩法:gt_start_play
 ectype_name string  针对闯关性质玩法,标注关卡名称
 触发条件:用户开始玩法时。
 */
+ (void)startPlayEventWithName:(NSString *)ecTypeName
                   otherParams:(nullable NSDictionary *)otherParams;
 
/**
 结束玩法:gt_end_play
 ectype_name string  针对闯关性质玩法,标注关卡名称
 result      string  玩法的结果:未完成、成功、失败等,使用英文进行标识.  未完成标记为uncompleted, 成功标记为success,失败为fail
 duration    int 消耗时间,单位秒
 触发条件:用户结束玩法时,涵盖中途退出、完成但失败和完成且成功。
 */
+ (void)endPlayEventWithName:(NSString *)ecTypeName
                      result:(NSString *)result
                     duration:(NSInteger)duration
                  otherParams:(nullable NSDictionary *)otherParams;
 
#pragma mark - coins
 
/**
 获得游戏币:gt_get_coins
 coin_type    string    货币类型:元宝、绑元、金币、银币等,使用文字或者英文进行标识
 method    string    获得途径:观看激励视频、闯关成功、活动奖励等,使用文字或者英文进行标识
 coin_num    int    获得数量
 触发条件:用户获得游戏币,导致游戏币增加时
 */
+ (void)getCoinsEventWitType:(NSString *)coinType
                      method:(NSString *)method
                  coinNumber:(NSInteger)number
                 otherParams:(nullable NSDictionary *)otherParams;
 
/**
 消耗游戏币:gt_cost_coins
 coin_type    string    货币类型:元宝、绑元、金币、银币等,使用文字或者英文进行标识
 method    string    消耗途径:复活、购买道具、解锁关卡等,使用文字或者英文进行标识
 coin_num    int    消耗数量
 触发条件:用户消耗游戏币,导致游戏币减少时。
 */
+ (void)costCoinsEventWitType:(NSString *)coinType
                       method:(NSString *)method
                   coinNumber:(NSInteger)number
                  otherParams:(nullable NSDictionary *)otherParams;
 
#pragma mark - Purchase
 
/**
 内购充值相关:purchase
 content_type  string  内购充值内容类型
 content_name  string  内购充值内容名称
 content_id    string  内购充值内容id
 content_num   int 内购充值内容的数量
 payment_channel string  支付渠道
 currency      string  支付货币类型
 is_success    string  支付是否成功
 currency_amount int 支付的金额,单位元
 触发条件:用户完成内购充值并获得对应的游戏内货币和道具时
 */
+ (void)purchaseEventWithContentType:(NSString *)contentType
                         contentName:(NSString *)contentName
                           contentID:(NSString *)contentID
                          contentNum:(NSInteger)contentNum
                             channel:(NSString *)channel
                            currency:(NSString *)currency
                           isSuccess:(NSString *)isSuccess
                      currencyAmount:(NSInteger)currencyAmount
                         otherParams:(nullable NSDictionary *)otherParams;
 
#pragma mark - InitInfo
/**
 初始化信息:gt_init_info
 lev    int    玩家等级
 coin_type    string    获得货币的类型
 coin_left    int    用户身上剩余的货币数量
 role_id    string    玩家角色id-cp侧
 触发条件:用户启动游戏,初始化完成时上报
 */
+ (void)gameInitInfoEventWithLevel:(NSInteger)level
                          coinType:(NSString *)coinType
                          coinLeft:(NSInteger)coinLeft
                       otherParams:(nullable NSDictionary *)otherParams;
 
@end
NS_ASSUME_NONNULL_END