菜单

预定义事件

注:开发者传入属性 key 不能为"_"下划线开头,"_"下划线开头为SDK保留字段,开发者设置则直接报错丢弃


变现广告展示事件

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

使用ROI分析功能、自定义分析变现指标时,为必须报送事件。

广告展示事件的 _event_name 为 _appImp

方法示例

static void trackAdImpression(const FImpressionAttributes& att);

参数说明

 

FImpressionAttributes类参数说明:

参数名称 参数含义 参数类型 是否必传
adPlatform
变现平台,前面为应传值,后面为平台名称
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
chartboost:Chartboost
adcolony:Adcolony
FString
adType
展示广告的类型
1:激励视频
2:开屏
3:插屏
4:全屏视频
5:Banner
6:信息流
7:短视频信息流
8:大横幅
9:视频贴片
10:中等尺寸横幅
0:其它
int
adAppId 变现平台的应用 ID FString
adId 变现平台的变现广告位 ID FString
mediationPlatform 聚合平台标识,常见聚合平台枚举如下,若您使用的聚合平台不在如下枚举值,您可以自定义命名,并控制字符数在32位。没有聚合平台标识,请设置为 "custom"。
max
ironsource
admob
hyperbid
topon
cas
Tradplus
Tobid
FString
adECPM 广告ECPM(广告千次展现的变现收入,0或负值表示没传),单位:元 double
currencyType 展示收益的货币种类,遵循《ISO 4217国际标准》如 CNY、USD FString
isRendered 广告是否渲染成功,具体枚举值如下: 例如:成功时,只需要传入 YES YES:成功
NO:失败
如果不需要统计该指标,请传 YES
bool
customProperties 自定义属性,
TSharedPtr<FJsonObject>

调用示例

FImpressionAttributes attribute;
attribute.adPlatform = "applovin";
attribute.mediationPlatform = "custom";
attribute.adAppId = "test_app_id";
attribute.adId = "test_placement_id";
attribute.adType = 3;
attribute.adECPM = 12.34;
attribute.currencyType = "USD";
attribute.isRendered = true;
attribute.customProperties = MakeShareable(new FJsonObject);
attribute.customProperties->SetStringField(TEXT("ImpressionKey1"), TEXT("ImpressionValue1"));
attribute.customProperties->SetStringField(TEXT("ImpressionKey2"), TEXT("ImpressionValue2"));
USEAnalytics::trackAdImpression(attribute);

 

应用内购买事件

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

该事件为用于付费预测模型训练的关键事件,使用系统提供的预测服务时,为必须报送事件。

应用内购买事件的 _event_name 为 _appPur

方法示例

static void trackPurchase(const FSEPurchaseEventAttributes& att);

参数说明

FSEPurchaseEventAttributes类参数说明:
参数名称 参数含义 参数类型 是否必传
orderId 本次购买由系统生成的订单 ID Ftring 否,投放荣耀商推、网易有道、豆瓣和oppo时必填
payAmount 本次购买支付的金额,单位:元 double
currencyType 支付的货币类型,遵循《ISO 4217国际标准》,如 CNY、USD Ftring
payType 支付方式:如 alipay、weixin、applepay、paypal 等 Ftring
productId 购买商品的ID Ftring
productName 商品名称 Ftring
productNum 购买商品的数量 Int
payStatus 支付状态
1: 成功
2: 失败
3: 恢复购买
int
failReason 支付失败的原因 Ftring
customProperties 自定义属性
TSharedPtr<FJsonObject>

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

调用示例

FSEPurchaseEventAttributes attribute;
attribute.productId = "test_productID";
attribute.productName = "test_productName";
attribute.productCount = 1234;
attribute.orderId = "test_orderID";
attribute.payAmount = 6.99;
attribute.currencyType = "CNY";
attribute.payType = "ApplePay";
attribute.payStatus = 1;
attribute.failReason = "test_failReason";
// 创建自定义属性
attribute.customProperties = MakeShareable(new FJsonObject);
attribute.customProperties->SetStringField(TEXT("IAPKey1"), TEXT("IAPValue1"));
attribute.customProperties->SetStringField(TEXT("IAPKey2"), TEXT("IAPValue2"));
USEAnalytics::trackPurchase(attribute);

 

 

上报变现广告点击事件

调用 trackAdClick 方法可以上报变现广告点击事件,_event_name 为 _appClick

方法示例

static void trackAdClick(const FAdClickAttributes& att);
FAdClickAttributes类参数说明:
参数名称 参数含义 参数类型 是否必传
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
chartboost:Chartboost
adcolony:Adcolony
FString
adType 展示广告的类型
1:激励视频
2:开屏
3:插屏
4:全屏视频
5:Banner
6:信息流
7:短视频信息流
8:大横幅
9:视频贴片
0:其它
int
adNetworkPlacementId
变现平台的变现广告位 ID FString
mediationPlatform 聚合平台标识,常见聚合平台枚举如下,若您使用的聚合平台不在如下枚举值,您可以自定义命名,并控制字符数在32位。没有聚合平台标识,请设置为 "custom"。
max
ironsource
admob
hyperbid
topon
cas
Tradplus
Tobid
FString
customProperties 自定义属性说明见目录:4.自定义属性
TSharedPtr<FJsonObject>

调用示例

FAdClickAttributes attribute;
attribute.adNetworkPlatform = "applovin";
attribute.adType =3;
attribute.adNetworkPlacementId = "placement_123";
attribute.mediationPlatform = "custom";
attribute.customProperties = MakeShareable(new FJsonObject);
attribute.customProperties->SetStringField(TEXT("ClickKey1"), TEXT("ClickValue1"));
attribute.customProperties->SetStringField(TEXT("ClickKey2"), TEXT("ClickValue2"));
USEAnalytics::trackAdClick(attribute);
 

 

上报注册事件

调用 trackRegister 方法可以上报注册事件,_event_name 为 _appReg

方法示例

static void trackRegister(const FRegisterEventAttributes& att);
 

FRegisterEventAttributes 类参数介绍:

参数名称 参数含义 参数类型 是否必传
registerType 注册类型如 "WeChat"、"QQ" 等自定义值 FString 是,不超过 32 字符
registerStatus 注册状态 如 "success" FString
customProperties 自定义属性
TSharedPtr<FJsonObject>

调用示例

FRegisterEventAttributes attribute;
attribute.registerType = "WeChat";
attribute.registerStatus = "success";
attribute.customProperties = MakeShareable(new FJsonObject);
attribute.customProperties->SetStringField(TEXT("RegisterKey1"), TEXT("RegisterValue1"));
USEAnalytics::trackRegister(attribute);
 

 

上报登录事件

调用 trackLogin 方法可以上报登录事件,_event_name 为 _appLogin

方法示例

static void trackLogin(const FLoginEventAttributes& att);
 

FLoginEventAttributes 类参数介绍:

参数名称 参数含义 参数类型 是否必传
loginType 登录类型如 "WeChat"、"QQ" 等自定义值 FString 是,不超过 32 字符
loginStatus 登录状态 如 "success" FString
customProperties 自定义属性
TSharedPtr<FJsonObject>

调用示例

FLoginEventAttributes attribute;
attribute.loginType = "password";
attribute.loginStatus = "success";
attribute.customProperties = MakeShareable(new FJsonObject);
attribute.customProperties->SetStringField(TEXT("LoginKey1"), TEXT("LoginValue1"));
USEAnalytics::trackLogin(attribute);
 

 

上报订单事件

调用 trackOrder 方法可以上报订单事件,_event_name 为 _appOrder

方法示例

static void trackOrder(const FOrderEventAttributes& att);
 

FOrderEventAttributes 类参数介绍:

参数名称 参数含义 参数类型 是否必传
orderId 订单 ID FString 否,不超过 128 字符,投放荣耀商推、网易有道、豆瓣和oppo时必填
payAmount 订单金额,单位:元 double
currencyType 展示货币类型,遵循《ISO 4217国际标准》,如 CNY、USD FString
payType 支付方式:如 alipay、weixin、applepay、paypal 等 FString 否,不超过 32 字符
status 订单状态 FString
customProperties 自定义属性说明见目录:4.自定义属性
TSharedPtr<FJsonObject>

调用示例

FOrderEventAttributes attribute;
attribute.orderId = "order_5678";
attribute.payAmount = "199.99";
attribute.currencyType = "USD";
attribute.payType = "applepay";
attribute.status = "paid";
attribute.customProperties = MakeShareable(new FJsonObject);
attribute.customProperties->SetStringField(TEXT("OrderKey1"), TEXT("OrderValue1"));
USEAnalytics::trackOrder(attribute);
 

 

上报自归因事件

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

自归因事件的 `_event_name` 为 _appAttr

方法示例

static void trackAttribution(const FSEAttAttributes& att);
 

参数说明

参数名称 参数含义 参数类型 是否必传
adNetwork 投放广告的渠道 ID,需要与发行平台匹配 FString
subChannel 投放广告的子渠道 FString
adAccountId 投放广告的投放账号 ID FString
adAccountName 投放广告的投放账号名称 FString
adCampaignId 投放广告的广告计划 ID FString
adCampaignName 投放广告的广告计划名称 FString
adOfferId 投放广告的广告单元 ID FString
adOfferName 投放广告的广告单元名称 FString
adCreativeId 投放广告的广告创意 ID FString
adCreativeName 投放广告的广告创意名称 FString
attributionPatform 监测平台 FString
customProperties 开发者传入的自定义属性 TSharedPtr<FJsonObject>

调用示例

FSEAttAttributes attribute;
attribute.adNetwork = "facebook";
attribute.subChannel = "organic";
attribute.adAccountId = "acc_1001";
attribute.adAccountName = "AccountName";
attribute.adCampaignId = "cmp_2002";
attribute.adCampaignName = "CampaignName";
attribute.adOfferId = "off_3003";
attribute.adOfferName = "OfferName";
attribute.adCreativeId = "crt_4004";
attribute.adCreativeName = "CreativeName";
attribute.attributionPlatform = "AppsFlyer";
attribute.customProperties = MakeShareable(new FJsonObject);
attribute.customProperties->SetStringField(TEXT("AttrKey1"), TEXT("AttrValue1"));
attribute.customProperties->SetStringField(TEXT("AttrKey2"), TEXT("AttrValue2"));
USEAnalytics::trackAttribution(attribute);
最近修改: 2025-12-01Powered by