菜单

首次事件

首次事件功能是指在同一个设备中只有首次调用时该事件才会上报,支持的事件类型有预定义事件和自定义事件。

方法示例

- (void)trackFirstEvent:(SEEventBaseAttribute *)attribute;
 

attribute参数使用时需要传SEEventBaseAttribute的子类实例,具体说明如下

首次事件       参数类型 说明
自定义首次事件                         SECustomEventAttribute

必传字段为CustomEven对象的eventName属性和firstCheckId属性。

属性presetProperties,字典key只支持_pay_amount 和 _currency_type 两个字段。

变现广告展示首次事件 SEAdImpressionEventAttribute 必传字段为firstCheckId属性,其它必传字段参考“变现广告展示事件”
变现广告点击首次事件 SEAdClickEventAttribute 必传字段为firstCheckId属性,其它必传字段参考“变现广告点击事件”
应用内购买首次事件 SEIAPEventAttribute 必传字段为firstCheckId属性,其它必传字段参考“应用内购买事件”
自归因安装首次事件 SEAppAttrEventAttribute 必传字段为firstCheckId属性,其它必传字段参考“自归因安装事件”
订单事件首次事件 SEOrderEventAttribute 必传字段为firstCheckId属性,其它必传字段参考“订单事件”
注册事件首次事件 SERegisterEventAttribute 必传字段为firstCheckId属性,其它必传字段参考“注册事件”
登录事件首次事件 SELoginEventAttribute 必传字段为firstCheckId属性,其它必传字段参考“登录事件”

注:以上必传字段firstCheckId未传时此次调用会当成普通事件上报。

 

自定义事件首次事件调用示例

SECustomEventAttribute *customAttribute = [[SECustomEventAttribute alloc] init];
customAttribute.eventName = @"test"; // 必传字段
customAttribute.firstCheckId = @"uniqueID"; // 必传字段
[[SolarEngineSDK sharedInstance] trackFirstEvent:customAttribute];
 

 

应用内购买首次事件示例

SEIAPEventAttribute *attribute = [[SEIAPEventAttribute alloc] init];
attribute.productID = @"产品 ID";
attribute.productName = @"产品名称";
attribute.productCount = 1234;
attribute.orderId = @"订单id111111";
attribute.payAmount = 6;
attribute.currencyType = @"CNY";
attribute.payType = SEIAPEventPayTypeWeixin;
attribute.payStatus = SolarEngineIAPFail;
attribute.failReason = @"test_failReason";

attribute.firstCheckId = @"uniqueID"; // 必传字段 

[[SolarEngineSDK sharedInstance] trackFirstEvent:attribute];
 

 

 

最近修改: 2024-11-12Powered by