Automatically reported when displaying ads within the app, which is essential for ROI analysis and monetization-related metrics in user analysis. (Event Name: "_appImp")
public static void trackAdImpression(ImpressionAttributes attributes)
ImpressionAttributes parameter description:
Please report the corresponding parameters from Mediation to SolarEngine following Impression-level-revenue-integration.
Parameter | Description | Type | Required |
---|---|---|---|
ad_platform | 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 | Int | yes |
ad_appid | The App ID on monetization platforms. | String | no |
ad_id | Ad Unit ID on monetization platforms. | String | yes |
mediation_platform | 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 |
ad_ecpm | =revenue of 1,000 ad impressions (0 or negative values are invalid.) (Mininum Unit: USD dollar) | double | yes |
currency_type | Revenue Currency Type (following ISO 4217) | String | yes |
is_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 | / | Dictionary | no |
Sample Code
ImpressionAttributes impressionAttributes = new ImpressionAttributes();
impressionAttributes.ad_platform = "AdMob";
impressionAttributes.ad_appid = "ad_appid";
impressionAttributes.ad_id = "ad_unit_id";
impressionAttributes.ad_type = 1;
impressionAttributes.ad_ecpm = 0.8;
impressionAttributes.currency_type = "USD";
impressionAttributes.mediation_platform = "MAX"//Please input the mediation platform you're using.
impressionAttributes.is_rendered = true;
Dictionary properties = new Dictionary();
properties.Add("K1", "V1");
properties.Add("K2", "V2");
properties.Add("K3", 2);
impressionAttributes.customProperties = properties;
// You can choose not to set customProperties.
// Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
SolarEngine.Analytics.trackAdImpression(impressionAttributes);
Automatically reported when in-app purchase is made. (Event Name: "_appPur") This is a key event for training the purchase prediction model.
public static void trackPurchase(ProductsAttributes attributes)
ProductsAttributes parameters:
Parameter | Description | Type | Required |
---|---|---|---|
order_id | The order ID generated by the system for this purchase | String | no |
pay_amount | The amount paid for this purchase (Unit: e.g. USD, CNY, etc.) | double | yes |
currency_type | The currency type of payment (following ISO 4217) | String | yes |
pay_type | Payment methods, such as alipay, weixin, applepay, paypal, etc. | String | no |
product_id | Purchased item ID | String | no |
product_name | Purchased item name | String | no |
product_num | Quantity of items purchased | Int | no |
paystatus | Payment status 1: successful 2: failed | SEConstant_IAP_PayStatus | yes |
fail_reason | Reason for payment failure | String | no |
customProperties | / | Dictionary | no |
Note:
The fail_reason parameter is only be passed in when the PayStatus parameter is fail. For other statuses, simply pass "".
Sample Code
ProductsAttributes productsAttributes = new ProductsAttributes();
productsAttributes.product_name = "product_name";
productsAttributes.product_id = "product_id";
productsAttributes.product_num = 8;
productsAttributes.currency_type = "USD";
productsAttributes.order_id = "order_id";
productsAttributes.fail_reason = "fail_reason";
productsAttributes.paystatus = 1; // 1 means success, 2 means fail
productsAttributes.pay_type = "wechat";
productsAttributes.pay_amount = 9.9;
Dictionary properties = new Dictionary();
properties.Add("K1", "V1");
properties.Add("K2", "V2");
properties.Add("K3", 2);
productsAttributes.customProperties = properties;
// You can choose not to set customProperties.
// Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
SolarEngine.Analytics.trackPurchase(productsAttributes);
Call trackAdClick to report in-app ad click events (Event Name: "_appClick") :
public static void trackAdClick(AdClickAttributes attributes)
AdClickAttribute parameters:
Parameter | Description | Type | Required |
---|---|---|---|
ad_platform | 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 |
ad_type | 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 | int | yes |
ad_id | Ad unit ID on monetization platforms. | String | yes |
mediation_platform | 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 | / | Dictionary | no |
Sample Code
AdClickAttributes AdClickAttributes = new AdClickAttributes();
AdClickAttributes.ad_platform = "admob"; // Monetization Platform Name
AdClickAttributes.mediation_platform = "gromore";// Mediation Platform that provides the ad
AdClickAttributes.ad_id = "943508343"; // Monetization Platform ad placement ID
AdClickAttributes.ad_type = 1;
Dictionary properties = new Dictionary();
properties.Add("K1", "V1");
properties.Add("K2", "V2");
properties.Add("K3", 2);
AdClickAttributes.customProperties = properties;
// You can choose not to set customProperties.
// Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
SolarEngine.Analytics.trackAdClick(AdClickAttributes);
Call trackRegister to report the registration event (Event Name: "_appReg"):
public static void trackRegister(RegisterAttributes attributes)
RegisterAttributes parameters:
Parameter | Description | Type | Required |
---|---|---|---|
register_type | Registration types such as "WeChat", "QQ" and other custom values | String | Yes |
register_status | Registration status such as "success" | String | No |
customProperties | Custom Properties | Dictionary | No |
Sample Code
RegisterAttributes RegisterAttributes = new RegisterAttributes();
RegisterAttributes.register_type = "QQ";
RegisterAttributes.register_status = "success";
Dictionary properties = new Dictionary();
properties.Add("K1", "V1");
properties.Add("K2", "V2");
properties.Add("K3", 2);
RegisterAttributes.customProperties = properties;
// You can choose not to set customProperties.
// Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
SolarEngine.Analytics.trackRegister(RegisterAttributes);
Call trackLogin to report the login event (Event Name: "_appLogin") :
public static void trackLogin(LoginAttributes attributes)
LoginAttributes parameters:
Parameter | Description | Type | Required |
---|---|---|---|
login_type | Login type such as "WeChat", "QQ" and other custom values | String | Yes |
login_status | Login status such as "success" | String | No |
customProperties | Custom Properties | Dictionary | No |
Sample Code
LoginAttributes LoginAttributes = new LoginAttributes();
LoginAttributes.login_type = "QQ";
LoginAttributes.login_status = "success";
Dictionary properties = new Dictionary();
properties.Add("K1", "V1");
properties.Add("K2", "V2");
properties.Add("K3", 2);
LoginAttributes.customProperties = properties;
// You can choose not to set customProperties.
// Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
SolarEngine.Analytics.trackLogin(LoginAttributes);
Call trackOrder to report in-app order event (Event Name: "_appOrder") :
public static void trackOrder(OrderAttributes attributes)
OrderAttributes parameters:
Parameter | Description | Type | Required |
---|---|---|---|
order_id | Order ID | String | No |
pay_amount | The payment amount of the order (Unit: e.g. USD, CNY, etc.) | double | Yes |
currency_type | The currency type of the order (following ISO 4217) | String | Yes |
pay_type | Payment methods, such as alipay, weixin, applepay, paypal, etc. | String | No |
status | Order Status | String | Yes |
customProperties | Custom Properties | Dictionary | No |
Sample Code
OrderAttributes OrderAttributes = new OrderAttributes();
OrderAttributes.order_id = "2341242342676398724"; // Not exceeding 128 characters
OrderAttributes.pay_amount = 128.00; // Unit: e.g. USD, CNY, etc.
OrderAttributes.currency_type = "USD"; // Currency Type
OrderAttributes.pay_type = "Alipay"; // Payment Type
OrderAttributes.status = "success"; // Order Status
Dictionary properties = new Dictionary();
properties.Add("K1", "V1");
properties.Add("K2", "V2");
properties.Add("K3", 2);
OrderAttributes.customProperties = properties;
// You can choose not to set customProperties.
// Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
SolarEngine.Analytics.trackOrder(OrderAttributes);
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")
public static void trackAttribution(Attributes attributes)
Parameters:
Parameter | Description | Type | Required |
---|---|---|---|
ad_network | Channel ID (should match the channel ID in ROI analysis) | String | yes |
sub_channel | Sub-channels for advertising | String | no |
ad_account_id | Ad account ID for advertising | String | no |
ad_account_name | Ad account name for advertising | String | no |
ad_campaign_id | Ad campaign ID for advertising | String | no |
ad_campaign_name | Ad campaign name for advertising | String | no |
ad_offer_id | Ad offer ID for advertising | String | no |
ad_offer_name | Ad offer name for advertising | String | no |
ad_creative_id | Ad creative ID for advertising | String | no |
ad_creative_name | Ad creative name for advertising | String | no |
attribution_platform | Monitoring Platform | String | yes |
customProperties | Custom Properties | Dictionary | no |
Sample Code
AppAttributes AppAttributes = new AppAttributes();
AppAttributes.ad_network = "toutiao";
AppAttributes.sub_channel = "103300";
AppAttributes.ad_account_id = "1655958321988611";
AppAttributes.ad_account_name = "xxxFPS18";
AppAttributes.ad_campaign_id = "1680711982033293";
AppAttributes.ad_campaign_name = "FPS-Campaign157-1024";
AppAttributes.ad_offer_id = "1685219082855528";
AppAttributes.ad_offer_name = "FPS-Offer406-1024";
AppAttributes.ad_creative_id = "1680128668901378";
AppAttributes.ad_creative_name = "Auto-created20210901178921";
AppAttributes.attribution_platform = "Attribution Platformxxx";
AppAttributes AppAttributes = new AppAttributes();
AppAttributes.ad_network = "toutiao";
AppAttributes.sub_channel = "103300";
AppAttributes.ad_account_id = "1655958321988611";
AppAttributes.ad_account_name = "xxxFPS18";
AppAttributes.ad_campaign_id = "1680711982033293";
AppAttributes.ad_campaign_name = "FPS-Campaign157-1024";
AppAttributes.ad_offer_id = "1685219082855528";
AppAttributes.ad_offer_name = "FPS-Offer406-1024";
AppAttributes.ad_creative_id = "1680128668901378";
AppAttributes.ad_creative_name = "Auto-created20210901178921";
AppAttributes.attribution_platform = "Attribution Platformxxx";
Dictionary properties = new Dictionary();
properties.Add("K1", "V1");
properties.Add("K2", "V2");
properties.Add("K3", 2);
AppAttributes.customProperties = properties;
SolarEngine.Analytics.trackAttribution(AppAttributes);