A first-time event refers to an event that is recorded only once for a specific dimension, such as device ID. For example, registration can be recorded using a first-time event. The server will deduplicate based on the ID set by setCheckId(). Only the first event reported with the same ID will be recorded.
Predefined events (_appInstall, _appStart, _appEnd) cannot be set as first-time events.
Function
public synchronized void trackFirstEvent(SEBaseFirstEventModel seBaseFirstEventModel);
Parameter | Description | Type | Required |
---|---|---|---|
seBaseFirstEventModel | First-time events | SEBaseFirstEventModel | Yes |
When using the seBaseFirstEventModel parameter, you need to pass a subclass instance of it. The specific instructions are as follows.
First-time Event | Parameter Type | Description |
---|---|---|
Custom first-time event | SECustomFirstEventModel | Custom first-time event (model type) |
First in-app ad impression event | SEAppImpFirstEventModel | First in-app ad impression event (model type) |
First in-app ad click event | SEApplicationClickFirstEventModel | First in-app ad click event (model type) |
First in-app purchase event | SEAppPurFirstEventModel | First in-app purchase event (model type) |
First self-reported attribution event | SEAppAttrFirstEventModel | First self-reported attribution event (model type) |
First order event | SEAppOrderFirstEventModel | First order event (model type) |
First registration event | SEAppRegisterFirstEventModel | First registration event (model type) |
First login event | SEAppLoginFirstEventModel | First login event (model type) |
Parameter Description
To report the corresponding values/fields from mediation platforms, please refer to Mediation Platform-Others.
Parameter | Description | Type | Required |
---|---|---|---|
checkId | The check ID of first-time events | String | Yes (If no checkID is sent, then it is seen as a normal event.) |
adNetworkPlatform | Monetization platform (Value: platform 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: 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 |
adNetworkAppID | The App ID on monetization platforms. | String | no |
adNetworkADID | The Placement ID on monetization platforms. | String | yes |
mediationPlatform | Mediation platforms. Record "custom" if no mediation platform is used. | String | yes |
ecpm | Advertising eCPM (revenue per thousand ad impressions, 0 or negative means no data transmitted), unit: yuan | float | yes |
currencyType | Revenue Currency Type (following ISO 4217) | String | yes |
isRenderSuccess | 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 | / | JSONObject | no |
import com.reyun.solar.engine.SolarEngineManager;
import org.json.JSONObject;
SEAppImpFirstEventModel seAppImpFirstEventModel = new SEAppImpFirstEventModel();
//If no checkId is sent, the current event will be seen as a normal event rather than first-time event.
seAppImpFirstEventModel.setCheckId("11aaBB");
seAppImpFirstEventModel.setAdNetworkPlatform("kuaishou");
seAppImpFirstEventModel.setMediationPlatform("Mintgaral");
seAppImpFirstEventModel.setAdType(1);
seAppImpFirstEventModel.setAdNetworkAppID("AppID");
seAppImpFirstEventModel.setAdNetworkADID("AdID");
seAppImpFirstEventModel.setEcpm(10.11);
seAppImpFirstEventModel.setCurrencyType("USD");
seAppImpFirstEventModel.setRenderSuccess(true);
JSONObject customProperties = new JSONObject();
try {
//Developer custom event properties in JSON format
customProperties.put("key1","value1");
customProperties.put("key2","value2");
seAppImpFirstEventModel.setCustomProperties(customProperties);
} catch (JSONException e) {
///
}
SolarEngineManager.getInstance().trackFirstEvent(seAppImpFirstEventModel);
Parameter Description
Parameter | Description | Type | Required |
---|---|---|---|
checkId | First-time event verification ID | String | yes (If not sent, the event will be reported as a normal event.) |
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 | Int | yes |
adNetworkADID | The Placement ID on monetization platforms. | String | yes |
mediationPlatform | Mediation platforms, like GroMore and TopOn. Record "custom" if no mediation platform is used. | String | yes |
customProperties | / | JSONObject | no |
import com.reyun.solar.engine.SolarEngineManager;
import org.json.JSONObject;
SEAdClickFirstEventModel seClickFirstEventModel = new SEAdClickFirstEventModel();
// If the CheckId (first-time event verification ID) is not passed, this call will be reported as a normal event.
seClickFirstEventModel.setCheckId("22bbCC");
seClickFirstEventModel.setAdPlatform("kuaishou");
seClickFirstEventModel.setMediationPlatform("Mintgaral");
seClickFirstEventModel.setAdType(2);
seClickFirstEventModel.setAdNetworkADID("AdID");
JSONObject customProperties = new JSONObject();
try {
//Developer custom event properties in JSON format
customProperties.put("key1","value1");
customProperties.put("key2","value2");
seClickFirstEventModel.setCustomProperties(customProperties);
} catch (JSONException e) {
///
}
SolarEngineManager.getInstance().trackFirstEvent(seClickFirstEventModel);
Parameter Description
Parameter | Description | Type | Required |
---|---|---|---|
checkId | First-time event verification ID | String | yes (If not sent, the event will be reported as a normal event.) |
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 | Monitoring Platform | String | yes |
customProperties | / | JSONObject | no |
import com.reyun.solar.engine.SolarEngineManager;
import org.json.JSONObject;
SEAppAttrFirstEventModel seAppAttrFirstEventModel = new SEAppAttrFirstEventModel();
//If the CheckId is not passed, this call will be reported as a normal event.
seAppAttrFirstEventModel.setCheckId("33ccDD");
seAppAttrFirstEventModel.setAdNetwork("Channel ID");
seAppAttrFirstEventModel.setSubChannel("Sub-channel");
seAppAttrFirstEventModel.setAdAccountId("Ad Account ID");
seAppAttrFirstEventModel.setAdAccountName("Ad Account Name");
seAppAttrFirstEventModel.setAdCampaignId("Ad Campaign ID");
seAppAttrFirstEventModel.setAdCampaignName("Ad Campaign Name");
seAppAttrFirstEventModel.setAdOfferId("Ad Offer ID");
seAppAttrFirstEventModel.setAdOfferName("Ad Offer Name");
seAppAttrFirstEventModel.setAdCreativeId("Ad Creative ID");
seAppAttrFirstEventModel.setAdCreativeName("Ad Creative Name");
seAppAttrFirstEventModel.setAttributionPlatform("Attribution Platform");
JSONObject customProperties = new JSONObject();
try {
//Developer custom event properties in JSON format
customProperties.put("key1","value1");
customProperties.put("key2","value2");
seAppAttrFirstEventModel.setCustomProperties(customProperties);
} catch (JSONException e) {
///
}
SolarEngineManager.getInstance().trackFirstEvent(seAppAttrFirstEventModel);
Parameter | Description | Type | Required |
---|---|---|---|
checkId | First-time event verification ID | String | yes (If not sent, the event will be reported as a normal event.) |
loginType | Login type such as "WeChat", "QQ" and other custom values | String | Yes |
status | Login status such as "success" | String | No |
customProperties | / | JSONObject | No |
import com.reyun.solar.engine.SolarEngineManager;
import org.json.JSONObject;
SEAppLoginFirstEventModel seAppLoginFirstEventModel = new SEAppLoginFirstEventModel();
//If the CheckId is not passed, this call will be reported as a normal event.
seAppLoginFirstEventModel.setCheckId("44ddEE");
seAppLoginFirstEventModel.setLoginType("QQ");
seAppLoginFirstEventModel.setStatus("success");
JSONObject customProperties = new JSONObject();
try {
//Developer custom event properties in JSON format
customProperties.put("key1","value1");
customProperties.put("key2","value2");
seAppLoginFirstEventModel.setCustomProperties(customProperties);
} catch (JSONException e) {
///
}
SolarEngineManager.getInstance().trackFirstEvent(seAppLoginFirstEventModel);
Parameter | Description | Type | Required |
---|---|---|---|
checkId | First-time event verification ID | String | yes (If not sent, the event will be reported as a normal event.) |
regType | Registration types such as "WeChat", "QQ" and other custom values | String | Yes |
status | Registration status such as "success" | String | No |
customProperties | / | JSONObject | No |
import com.reyun.solar.engine.SolarEngineManager;
import org.json.JSONObject;
SEAppRegisterFirstEventModel seAppRegisterFirstEventModel = new SEAppRegisterFirstEventModel();
//If the CheckId is not passed, this call will be reported as a normal event.
seAppRegisterFirstEventModel.setCheckId("55eeFF");
seAppRegisterFirstEventModel.setRegType("Wechat");
seAppRegisterFirstEventModel.setStatus("success");
JSONObject customProperties = new JSONObject();
try {
//Developer custom event properties in JSON format
customProperties.put("key1","value1");
customProperties.put("key2","value2");
seAppRegisterFirstEventModel.setCustomProperties(customProperties);
} catch (JSONException e) {
///
}
SolarEngineManager.getInstance().trackFirstEvent(seAppRegisterFirstEventModel);
Parameter | Description | Type | Required |
---|---|---|---|
checkId | First-time event verification ID | String | Yes (If not sent, the event will be reported as a normal event.) |
orderID | Order ID | String | No |
payAmount | The payment amount of the order (Unit: yuan) | double | Yes |
currencyType | The currency type of the order (following ISO 4217) | String | Yes |
payType | Payment methods, such as alipay, weixin, applepay, paypal, etc. | String | No |
status | Order Status | String | Yes |
customProperties | / | JSONObject | No |
import com.reyun.solar.engine.SolarEngineManager;
import org.json.JSONObject;
SEAppOrderFirstEventModel seAppOrderFirstEventModel = new SEAppOrderFirstEventModel();
//If the CheckId is not passed, this call will be reported as a normal event.
seAppOrderFirstEventModel.setCheckId("66ffGG");
seAppOrderFirstEventModel.setOrderId("Order ID");
seAppOrderFirstEventModel.setPayAmount(10.11);
seAppOrderFirstEventModel.setCurrencyType("USD");
seAppOrderFirstEventModel.setPayType("alipay");
seAppOrderFirstEventModel.setStatus("success");
JSONObject customProperties = new JSONObject();
try {
//Developer custom event properties in JSON format
customProperties.put("key1","value1");
customProperties.put("key2","value2");
seAppOrderFirstEventModel.setCustomProperties(customProperties);
} catch (JSONException e) {
///
}
SolarEngineManager.getInstance().trackFirstEvent(seAppOrderFirstEventModel);
Parameter | Description | Type | Required |
---|---|---|---|
checkId | First-time event verification ID | String | Yes (If not sent, the event will be reported as a normal event.) |
orderId | The order ID generated by the system for this purchase | String | no |
payAmount | The amount paid for this purchase (Unit: yuan) | double | yes |
currencyType | The currency type of payment (following ISO 4217) | String | yes |
payType | Payment methods, such as alipay, weixin, applepay, paypal, etc. | String | no |
productId | Purchased item ID | String | no |
productName | Purchased item name | String | no |
productNum | Quantity of items purchased | Int | no |
payStatus | Payment status 1: successful 2: failed | Int | yes |
failReason | Reason for payment failure | String | no |
customProperties | / | JSONObject | no |
import com.reyun.solar.engine.SolarEngineManager;
import org.json.JSONObject;
SEAppPurFirstEventModel seAppPurFirstEventModel = new SEAppPurFirstEventModel();
//If the CheckId is not passed, this call will be reported as a normal event.
seAppPurFirstEventModel.setCheckId("77ggHH");
seAppPurFirstEventModel.setOrderId("Order ID");
seAppPurFirstEventModel.setPayAmount(11.01);
seAppPurFirstEventModel.setCurrencyType("CNY");
seAppPurFirstEventModel.setPayType("alipay");
seAppPurFirstEventModel.setProductId("Product ID");
seAppPurFirstEventModel.setProductName("Nike");
seAppPurFirstEventModel.setProductNum(10);
seAppPurFirstEventModel.setPayStatus(2);
seAppPurFirstEventModel.setFailReason("failed");
JSONObject customProperties = new JSONObject();
try {
//Developer custom event properties in JSON format
customProperties.put("key1","value1");
customProperties.put("key2","value2");
seAppPurFirstEventModel.setCustomProperties(customProperties);
} catch (JSONException e) {
///
}
SolarEngineManager.getInstance().trackFirstEvent(seAppPurFirstEventModel);
Parameter | Description | Type | Required |
---|---|---|---|
checkId | First-time event verification ID | String | Yes (If not sent, the event will be reported as a normal event.) |
customEventName | Developer custom event name | String | YES |
preEventData | Custom event preset properties currently only support _pay_amount and _currency_type; other fields will be discarded by the SDK. | JSONObject | No |
customEventData | Developer custom event property | JSONObject | No |
import com.reyun.solar.engine.SolarEngineManager;
import org.json.JSONObject;
SECustomFirstEventModel seCustomFirstEventModel = new SECustomFirstEventModel();
//If the CheckId is not passed, this call will be reported as a normal event.
seCustomFirstEventModel.setCheckId("88hhII");
//If reporting custom first-time event, then eventName is necessary, otherwise the reporting cannot be achieved.
seCustomFirstEventModel.setEventName("custom_event");
JSONObject customProperties = new JSONObject();
try {
//Developer custom event properties in JSON format
customProperties.put("key1","value1");
customProperties.put("key2","value2");
//Set preset properties; currently, only _pay_amount and _currency_type are supported. Other fields will be discarded by the SDK.
preEventData.put("_pay_amount", 11.2);
preEventData.put("_currency_type", "USD");
seCustomFirstEventModel.setPreEventData(preEventData);
} catch (JSONException e) {
///
}
SolarEngineManager.getInstance().trackFirstEvent(seCustomFirstEventModel);
Note:
The field "eventName" is required, otherwise the custom first-time event cannot be reported.