菜单

预定义事件

 

变现广告展示事件

 

App 内变现广告展示时,报送该事件,用于进行广告展示及变现收入分析。

- (void)trackAdImpressionWithAttributes:(SEAdImpressionEventAttribute *)attribute;
(各聚合平台调用示例参见: 调用示例 )

SEAdImpressionEventAttribute 类参数说明:

参数名称 参数含义 参数类型 是否必传
adNetworkPlatform 变现平台,前面为应传值,后面为平台名称
csj:穿山甲国内版
pangle:穿山甲国际版
tencent:腾讯优量汇
baidu:百度百青藤
kuaishou:快手
oppo:OPPO
vivo:vivo
mi:小米
huawei:华为
applovin:Applovin
sigmob:Sigmob
mintegral:Mintegral
oneway:OneWay
vungle:Vungle
facebook:Facebook
admob:AdMob
unity:UnityAds
is:IronSource
adtiming:AdTiming
klein:游可赢
fyber:Fyber(DT Exchange)
chartboost:Chartboost
adcolony:Adcolony
inmobi:Inmobi
bigo:BIGO
NSString 是
adType 展示广告的类型
1:激励视频
2:开屏
3:插屏
4:全屏视频
5:Banner
6:信息流
7:短视频信息流
8:大横幅
9:视频贴片
10:中等尺寸横幅
0:其它

SolarEngineAdType

是
adNetworkAppID 变现平台的应用 ID NSString 否
adNetworkPlacementID 变现平台的变现广告位 ID NSString 是
mediationPlatform 聚合平台标识,常见聚合平台枚举如下,若您使用的聚合平台不在如下枚举值,您可以自定义命名,并控制字符数在32位。没有聚合平台标识,请设置为 "custom"。
max
ironsource
admob
hyperbid
topon
cas
Tradplus
Tobid
NSString 是
ecpm 广告ECPM(广告千次展现的变现收入,0或负值表示没传),单位:元 double 是
currency 展示收益的货币种类,遵循《ISO 4217国际标准》如 CNY、USD NSString 是
rendered 广告是否渲染成功,具体枚举值如下:
例如:成功时,只需要传入 YES
YES:成功
NO:失败
如果不需要统计该指标,请传 YES
BOOL 是
customProperties 自定义属性说明见: 自定义事件中的 自定义属性 NSDictionary 否

 

调用示例:

SEAdImpressionEventAttribute *attribute = [[SEAdImpressionEventAttribute alloc] init];
attribute.adNetworkPlatform = @"csj";
attribute.adType = 1;
attribute.adNetworkAppID = @"test_adNetworkAppID";
attribute.adNetworkPlacementID = @"test_adNetworkPlacementID";
attribute.mediationPlatform = @"custom";
attribute.currency = @"USD";
attribute.ecpm = 13.14;
attribute.rendered = YES;
attribute.customProperties = @{
    @"Key1": @"Value1",
    @"Key2": @"Value2"
};
[[SolarEngineSDK sharedInstance] trackAdImpressionWithAttributes:attribute];
 

GroMore 聚合 SDK 对接示例:

为了方便 GroMore SDK 接入 SolarEngine SDK 更加方便,这里以 ABUBannerAd 广告展示成功回调为例,调用 SolarEngine SDK 的代码如下:

- (void)bannerAdDidBecomeVisible:(ABUBannerAd *_Nonnull)bannerAd bannerView:(UIView *)bannerView {
ABURitInfo *info = [bannerAd getShowEcpmInfo];
SEAdImpressionEventAttribute *attribute = [[SEAdImpressionEventAttribute alloc] init];
// 变现平台名称
attribute.adNetworkPlatform = info.adnName;
// 变现平台的应用 ID,获取不到可以传 ""
attribute.adNetworkAppID = @"应用ID";
// 展示广告的类型  
attribute.adType = SolarEngineAdTypeBanner;
// 变现平台的变现广告位 ID  
attribute.adNetworkPlacementID = [bannerAd getAdNetworkRitId];
// 展示收益的货币种类,遵循《ISO 4217国际标准》,GroMore SDK 没有提供具体标准,请与GroMore侧确认是 "CNY" 或者"USD"。
attribute.currency = @"CNY";
// GroMore SDK ecpm 的单位是分,SolarEngine SDK ecpm单位是元,需要做一步换算。
attribute.ecpm = [info.ecpm doubleValue]/100;
// 聚合平台标识,GroMore SDK 设置成 "gromore"
attribute.mediationPlatform = @"gromore";
// 广告是否渲染成功
attribute.rendered = YES;
attribute.customProperties = @{
    @"Key1": @"Value1",
    @"Key2": @"Value2"
};
[[SolarEngineSDK sharedInstance] trackAdImpressionWithAttributes:attribute];
}
 

注:

  1. SEAdImpressionEventAttribute 中的 currency 变量,GroMore SDK 没有提供,开发者传递 "CNY" 即可。
  2. SEAdImpressionEventAttribute 中的 mediaPlatform 变量,使用 GroMore SDK 时开发者应设置成 "gromore" 传递给 SolarEngine SDK。
  3. GroMore SDK 的 ecpm 的单位是分,SolarEngine SDK ecpm 单位是元,因此需要做一步换算。

 

变现广告点击事件

 

App 内变现广告点击时,报送该事件,用于进行广告点击数据分析。

- (void)trackAdClickWithAttributes:(SEAdClickEventAttribute *)attribute;
 

SEAdClickEventAttribute 类参数介绍:

参数名称 参数含义 参数类型 是否必传
adNetworkPlatform 变现平台,前面为应传值,后面为平台名称
csj:穿山甲国内版
pangle:穿山甲国际版
tencent:腾讯优量汇
baidu:百度百青藤
kuaishou:快手
oppo:OPPO
vivo:vivo
mi:小米
huawei:华为
applovin:Applovin
sigmob:Sigmob
mintegral:Mintegral
oneway:OneWay
vungle:Vungle
facebook:Facebook
admob:AdMob
unity:UnityAds
is:IronSource
adtiming:AdTiming
klein:游可赢
fyber:Fyber(DT Exchange)
chartboost:Chartboost
adcolony:Adcolony
inmobi:Inmobi
NSString 是
adType 展示广告的类型,
1:激励视频
2:开屏
3:插屏
4:全屏视频
5:Banner
6:信息流
7:短视频信息流
8:大横幅
9:视频贴片
0:其它

SolarEngineAdType

是
adNetworkPlacementID 变现平台的变现广告位 ID NSString 是
mediationPlatform 聚合平台标识,常见聚合平台枚举如下,若您使用的聚合平台不在如下枚举值,您可以自定义命名,并控制字符数在32位。没有聚合平台标识,请设置为 "custom"。
max
ironsource
admob
hyperbid
topon
cas
Tradplus
Tobid
NSString 是
customProperties 自定义属性说明见: 自定义事件中的 自定义属性 NSDictionary 否

调用示例:

SEAdClickEventAttribute *attribute = [[SEAdClickEventAttribute alloc] init];
attribute.adNetworkPlatform = @"csj";
attribute.adType = 1;
attribute.adNetworkPlacementID = @"广告位id";
attribute.mediationPlatform = @"custom";
attribute.customProperties = @{
    @"Key1": @"Value1",
    @"Key2": @"Value2"
};
[[SolarEngineSDK sharedInstance] trackAdClickWithAttributes:attribute];
 

 

应用内购买事件

 

App 内付费购买时,报送该事件,用于进行购买及内购收入分析。

- (void)trackIAPWithAttributes:(SEIAPEventAttribute *)attribute;
 

SEIAPEventAttribute 类参数说明:

参数名称 参数含义 参数类型 是否必传
orderId 本次购买由系统生成的订单 ID NSString 否,不超过 128 字符,投放网易有道、豆瓣时必填
payAmount 本次购买支付的金额,单位:元 double 是
currencyType 支付的货币类型,遵循《ISO 4217国际标准》,如 CNY、USD NSString 是
payType 支付方式:如 alipay、weixin、applepay、paypal 等 NSString 否
productID 购买商品的ID NSString 否
productName 商品名称 NSString 否
productCount 购买商品的数量 NSInteger 否
payStatus 支付状态
例如:成功时,传入 SolarEngineIAPSuccess
SolarEngineIAPSuccess:成功
SolarEngineIAPFail:失败
SolarEngineIAPRestored:恢复
SolarEngineIAPStatus 是
failReason 支付失败的原因 NSString 否
customProperties 自定义属性说明见: 自定义事件中的 自定义属性 NSDictionary 否

注:支付失败原因 failReason 参数仅在 payStatus 参数为 SolarEngineIAPFail 支付失败时才会传入,其他状态传""即可。

调用示例:

SEIAPEventAttribute *attribute = [[SEIAPEventAttribute alloc] init];
attribute.productID = @"test_productID";
attribute.productName = @"test_productName";
attribute.productCount = 1234;
attribute.orderId = @"test_orderID";
attribute.payAmount = 123456;
attribute.currencyType = @"CNY";
attribute.payType = SEIAPEventPayTypeWeixin;
attribute.payStatus = SolarEngineIAPSuccess;
attribute.failReason = @"test_failReason";
attribute.customProperties = @{
    @"Key1": @"Value1",
    @"Key2": @"Value2"
};
[[SolarEngineSDK sharedInstance] trackIAPWithAttributes:attribute];
 

 

自归因安装事件

 

增加归因安装事件,支持统计归因数据,满足客户使用三方归因或者自归因之后的结果数据回传到自定义分析,上报时机支持开发者自定义触发。

自归因事件的 _event_name 为 _appAttr。

/// 上报归因事件
/// @param attribute SEAppAttrEventAttribute 实例
- (void)trackAppAttrWithAttributes:(SEAppAttrEventAttribute *)attribute;

 

参数相关:

参数名称 参数含义 参数类型 是否必传
adNetwork 投放广告的渠道 ID,需要与ROI分析匹配 NSString 是
subChannel 投放广告的子渠道 NSString 否
adAccountID 投放广告的投放账号 ID NSString 否
adAccountName 投放广告的投放账号名称 NSString 否
adCampaignID 投放广告的广告计划 ID NSString 否
adCampaignName 投放广告的广告计划名称 NSString 否
adOfferID 投放广告的广告单元 ID NSString 否
adOfferName 投放广告的广告单元名称 NSString 否
adCreativeID 投放广告的广告创意 ID NSString 否
adCreativeName 投放广告的广告创意名称 NSString 否
attributionPlatform 监测平台 NSString 是
customProperties 自定义属性说明见: 自定义事件中的 自定义属性 NSDictionary 否

 

示例代码:

SEAppAttrEventAttribute *attribute = [[SEAppAttrEventAttribute alloc] init];
attribute.adNetwork = @"adNetwork";
attribute.subChannel = @"subChannel";
attribute.adAccountID = @"adAccountID";
attribute.adAccountName = @"adAcco目录:4.自定义属性untName";
attribute.adCampaignID = @"adCampaignID";
attribute.adCampaignName = @"adCampaignName";
attribute.adOfferID = @"adOfferID";
attribute.adOfferName = @"adOfferName";
attribute.adCreativeID = @"adCreativeID";
attribute.adCreativeName = @"adCreativeName";
attribute.attributionPlatform = @"attributionPlatform";
attribute.customProperties = @{
    @"name": @"Tom",
    @"age" : @18
};
[[SolarEngineSDK sharedInstance] trackAppAttrWithAttributes:attribute];
 

 

订单事件

 

用于进行订单数据分析。

- (void)trackOrderWithAttributes:(SEOrderEventAttribute *)attribute;
 

SEOrderEventAttribute 类参数介绍:

参数名称 参数含义 参数类型 是否必传
orderID 订单 ID NSString 否,不超过 128 字符,投放网易有道、豆瓣时必填
payAmount 订单金额,单位:元 double 是
currencyType 展示货币类型,遵循《ISO 4217国际标准》,如 CNY、USD NSString 是
payType 支付方式:如 alipay、weixin、applepay、paypal 等 NSString 否,不超过 32 字符
status 订单状态 NSString 否
customProperties 自定义属性说明见: 自定义事件中的 自定义属性 NSDictionary 否

 

调用示例:

SEOrderEventAttribute *attribute = [[SEOrderEventAttribute alloc] init];
attribute.orderID = @"1000000";
attribute.payAmount = 3.14;
attribute.currencyType = @"CNY";
attribute.payType = @"aliPay";
attribute.status = @"success";
attribute.customProperties = @{
    @"Key1": @"Value1",
    @"Key2": @"Value2"
};
[[SolarEngineSDK sharedInstance] trackOrderWithAttributes:attribute];
 

 

注册事件

 

App 内用户注册时,报送该事件,用于进行用户注册数据分析。

- (void)trackRegisterWithAttributes:(SERegisterEventAttribute *)attribute;

SERegisterEventAttribute 类参数介绍:

参数名称 参数含义 参数类型 是否必传
registerType 注册类型如 "WeChat"、"QQ" 等自定义值 NSString 是,不超过 32 字符
registerStatus 注册状态 如 "success" NSString 否
customProperties 自定义属性说明见: 自定义事件中的 自定义属性 NSDictionary 否

 

调用示例:

SERegisterEventAttribute *attribute = [[SERegisterEventAttribute alloc] init];
attribute.registerType = @"WeChat";
attribute.registerStatus = @"success";
attribute.customProperties = @{
    @"Key1": @"Value1",
    @"Key2": @"Value2"
};
[[SolarEngineSDK sharedInstance] trackRegisterWithAttributes:attribute];
 

 

登录事件

 

App 内用户登录时,报送该事件,用于进行用户登录数据分析。

- (void)trackLoginWithAttributes:(SELoginEventAttribute *)attribute;

SELoginEventAttribute 类参数介绍:

参数名称 参数含义 参数类型 是否必传
loginType 登录类型如 "WeChat"、"QQ" 等自定义值 NSString 是,不超过 32 字符
loginStatus 登录状态 如 "success" NSString 否
customProperties 自定义属性说明见: 自定义事件中的 自定义属性 NSDictionary 否

 

调用示例:

SELoginEventAttribute *attribute = [[SELoginEventAttribute alloc] init];
attribute.loginType = @"WeChat";
attribute.loginStatus = @"success";
attribute.customProperties = @{
    @"Key1": @"Value1",
    @"Key2": @"Value2"
};
[[SolarEngineSDK sharedInstance] trackLoginWithAttributes:attribute];
最近修改: 2025-10-11Powered by