Automatically reported when displaying ads within the app, which is essential for ROI analysis and monetization-related metrics in user analysis. (Event Name: "_appImp")
export function trackAdImpressionWithAttributes(adImpressionEventAttribute:SEAdImpressionEventAttribute);
SEAdImpressionEventAttribute parameters:
Please report the corresponding fields from mediation to SolarEngine following https://help.solar-engine.com/en/docs/Impression-level-revenue-integration.
Parameter | Description | Type | Required |
---|---|---|---|
adNetworkPlatform | Monetization platform (Value: platform name) csj: 穿山甲 China Mainland version pangle: 穿山甲 International version 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 | String | yes |
ad_type | Ad types: 1:Rewarded Video 2:Splash 3:Interstitial 4:Fullscreen Video 5:Banner 6:Native 7:Native Video 8:Banner (MPU) 9:Instream Video 10:MREC 0:Other | Number | yes |
adNetworkAppID | The App ID on monetization platforms. | String | no |
adNetworkPlacementID | Ad Unit ID on monetization platforms. | String | yes |
mediationPlatform | Mediation platforms commonly used: max ironsource admob hyperbid topon cas Tradplus Tobid If your mediation platform is not on the list, you can name it yourself, only that the name cannot exceed 32 characters. Send "custom" if no mediation platform is used. | String | yes |
ecpm | =revenue of 1,000 ad impressions (0 or negative values are invalid.) (Mininum Unit: e.g. USD, CNY, etc.) | Number | yes |
currency | Revenue Currency Type (following ISO 4217) | String | yes |
rendered | Whether the ad is rendered successfully. YES: success NO: Failed. If you do not need to pass in this indicator, please pass YES. | Boolean | yes |
customProperties | / | Object | no |
Sample Code
let attribute:SEAdImpressionEventAttribute = {
adNetworkPlatform:"AdMob",
adType:AdType.Interstitial,
adNetworkAppID:"AdMob appid",
adNetworkPlacementID:"AdMob placementid",
mediationPlatform:"MAX",
currency:"USD",
ecpm:1.234, //Here the unit is' USD ', please note the unit conversion
rendered:true,
customProperties:{"key1":"value1","key2":"value2"}
// You can choose not to set customProperties.
// Note: Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
}
SolarEngine.trackAdImpressionWithAttributes(attribute);
Automatically reported when in-app purchase is made. (Event Name: "_appPur") This is a key event for training the purchase prediction model.
export function trackIAPWithAttributes(iapEventAttribute:SEIAPEventAttribute);
SEIAPEventAttribute parameters:
Parameter | Description | Type | Required |
---|---|---|---|
orderId | The order ID generated by the system for this purchase | String | no |
payAmount | The amount paid for this purchase (Unit: e.g. USD, CNY, etc.) | Number | yes |
currency | The currency type of payment (following ISO 4217) | String | yes |
payType | Payment methods, such as export const Alipay = "alipay"; export const Weixin = "weixin"; export const ApplePay = "applepay"; export const Paypal = "paypal"; | String | no |
productID | Purchased item ID | String | no |
productName | Purchased item name | String | no |
productCount | Quantity of items purchased | Number | no |
payStatus | Payment status 1: success 2: failed 3: restored | SEIAPStatus | yes |
failReason | Reason for payment failure | String | no |
customProperties | / | Object | no |
Note:
The failureReason parameter is only be passed in when the payStatus parameter is Failed. For other statuses, simply pass "".
Sample Code
let attribute:SEIAPEventAttribute = {
productID:"product id",
productName:"product name",
productCount:3,
orderId:"order id",
payAmount:3.14,
currency:"USD",
// const Alipay = "alipay";
// const Weixin = "weixin";
// const ApplePay = "applepay";
// const Paypal = "paypal";
payType:Paypal,
payStatus:SEIAPStatus.Success,
failReason:"",
customProperties:{"key":"iap customProperties value"}
// You can choose not to set customProperties.
// Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
SolarEngine.trackIAPWithAttributes(attribute);
Call trackAdClickWithAttributes to report in-app ad click events:
export function trackAdClickWithAttributes(adClickEventAttribute:SEAdClickEventAttribute);
SEAdClickEventAttribute parameters:
Parameter | Description | Type | Required |
---|---|---|---|
adNetworkPlatform | Monetization platforms, for example (value: name), 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 | String | yes |
adType | Ad types, for example (value: explanation), 1:Rewarded Video Ads 2:Splash Ads 3:Interstitial Ads 4:Full Screen Videos 5:Banner Ads 6:In-Feed Ads 7:Native Video Ads 8:Playable Ads 9:Pre-movie Ads 0:Other | Number | yes |
adNetworkPlacementID | Ad unit ID on monetization platforms. | String | yes |
mediationPlatform | Mediation platforms commonly used: max ironsource admob hyperbid topon cas Tradplus Tobid If your mediation platform is not on the list, you can name it yourself, only that the name cannot exceed 32 characters. Send "custom" if no mediation platform is used. | String | yes |
customProperties | / | Object | no |
Sample Code
let attribute:SEAdClickEventAttribute = {
adNetworkPlatform: "AdNetwork platform",
adType:AdType.Interstitial,
adNetworkPlacementID:"AdNetwork placementid",
mediationPlatform:"mediation name",
customProperties:{"key":"adclick customProperties value"}
// You can choose not to set customProperties.
// Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
}
SolarEngine.trackAdClickWithAttributes(attribute);
Call trackRegisterWithAttributes to report the registration event:
export function trackRegisterWithAttributes(registerEventAttribute:SERegisterEventAttribute);
SERegisterEventAttribute parameters:
Parameter | Description | Type | Required |
---|---|---|---|
registerType | Registration types such as "WeChat", "QQ" and other custom values | String | Yes (No more than 32 characters) |
registerStatus | Registration status such as "success" | String | No |
customProperties | Custom Properties | Object | No |
Sample Code
let attribute:SERegisterEventAttribute = {
registerType:"WeChat",
registerStatus:"success",
customProperties:{"key":"register customProperties value"}
// You can choose not to set customProperties.
// Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
}
SolarEngine.trackRegisterWithAttributes(attribute);
Call trackLoginWithAttributes to report the login event:
export function trackLoginWithAttributes(loginEventAttribute:SELoginEventAttribute);
SELoginEventAttribute parameters:
Parameter | Description | Type | Required |
---|---|---|---|
loginType | Login type such as "WeChat", "QQ" and other custom values | String | Yes |
loginStatus | Login status such as "success" | String | No |
customProperties | Custom Properties | Object | No |
Sample Code
let attribute:SELoginEventAttribute = {
loginType:"WeChat",
loginStatus:"failed",
customProperties:{"key":"login customProperties value"}
// You can choose not to set customProperties.
// Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
}
SolarEngine.trackLoginWithAttributes(attribute);
Call trackOrderWithAttributes to report in-app order event:
export function trackOrderWithAttributes(orderEventAttribute:SEOrderEventAttribute);
SEOrderEventAttribute parameters:
Parameter | Description | Type | Required |
---|---|---|---|
orderID | Order ID | String | No (No more than 128 characters) |
payAmount | The payment amount of the order (Unit: e.g. USD, CNY, etc.) | double | Yes |
currency | The currency type of the order (following ISO 4217) | String | Yes |
payType | Payment methods, such as : export const Alipay = "alipay"; export const Weixin = "weixin"; export const ApplePay = "applepay"; export const Paypal = "paypal"; Other payment methods can be customized. | String | No, no more than 32 characters |
status | Order Status | String | Yes |
customProperties | Custom Properties | Object | No |
Sample Code
let attribute:SEOrderEventAttribute = {
orderID:"order id",
payAmount:3.1415926,
currency:"USD",
payType:Paypal,
status:"success",
customProperties:{"key":"order customProperties value"}
// You can choose not to set customProperties.
// Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
}
SolarEngine.trackOrderWithAttributes(attribute);
Enables the reporting of attribution results data from a third-party or self-attribution platform to SolarEngine. The timing of reporting can be customized by developers. (Event Name: "_appAttr")
export function trackAppAttrWithAttributes(appAttrEventAttribute:SEAppAttrEventAttribute);
SEAppAttrEventAttribute parameters:
Parameter | Description | Type | Required |
---|---|---|---|
adNetwork | Channel ID (should match the channel ID in ROI analysis) | String | yes |
subChannel | Sub-channels for advertising | String | no |
adAccountID | Ad account ID for advertising | String | no |
adAccountName | Ad account name for advertising | String | no |
adCampaignID | Ad campaign ID for advertising | String | no |
adCampaignName | Ad campaign name for advertising | String | no |
adOfferID | Ad offer ID for advertising | String | no |
adOfferName | Ad offer name for advertising | String | no |
adCreativeID | Ad creative ID for advertising | String | no |
adCreativeName | Ad creative name for advertising | String | no |
attributionPlatform | MMP | String | yes |
customProperties | Custom Properties | Object | no |
Sample Code
let attribute:SEAppAttrEventAttribute = {
adNetwork:"toutiao",
subChannel:"103300",
adAccountID:"1655958321988611",
adAccountName:"xxxFPS18",
adCampaignID:"1680711982033293",
adCampaignName:"FPS-Campaign157-1024",
adOfferID:"1685219082855528",
adOfferName:"FPS-Offer406-1024",
adCreativeID:"1680128668901378",
adCreativeName:"Auto-created20210901178921",
attributionPlatform:"Attribution Platformxxx",
customProperties:{"customProperties":"app attr customProperties value"}
// You can choose not to set customProperties.
// Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
}
SolarEngine.trackAppAttrWithAttributes(attribute);