Menu

First Time Event

       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);
ParameterDescriptionTypeRequired
seBaseFirstEventModelFirst-time eventsSEBaseFirstEventModel Yes

       When using the seBaseFirstEventModel parameter, you need to pass a subclass instance of it. The specific instructions are as follows.

First-time EventParameter Type Description
Custom first-time eventSECustomFirstEventModelCustom first-time event (model type)
First in-app ad impression eventSEAppImpFirstEventModelFirst in-app ad impression event (model type)
First in-app ad click eventSEApplicationClickFirstEventModelFirst in-app ad click event (model type)
First in-app purchase eventSEAppPurFirstEventModelFirst in-app purchase event (model type)
First self-reported attribution eventSEAppAttrFirstEventModelFirst self-reported attribution event (model type)
First order eventSEAppOrderFirstEventModelFirst order event (model type)
First registration eventSEAppRegisterFirstEventModelFirst registration event (model type)
First login eventSEAppLoginFirstEventModelFirst login event (model type)

1. First In-App Ad Impression Event

Parameter Description

       To report the corresponding values/fields from mediation platforms, please refer to Mediation Platform-Others.

ParameterDescriptionTypeRequired
checkIdThe check ID of first-time eventsStringYes (If no checkID is sent, then it is seen as a normal event.)
adNetworkPlatformMonetization 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
Stringyes
adTypeAd 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
Intyes
adNetworkAppIDThe App ID on monetization platforms.Stringno
adNetworkADIDThe Placement ID on monetization platforms.Stringyes
mediationPlatformMediation platforms. Record "custom" if no mediation platform is used.Stringyes
ecpmAdvertising eCPM (revenue per thousand ad impressions, 0 or negative means no data transmitted), unit: yuanfloatyes
currencyTypeRevenue Currency Type (following ISO 4217)Stringyes
isRenderSuccessWhether the ad is rendered successfully. YES: success NO: Failed. If you do not need to pass in this indicator, please pass YES.Booleanyes
customProperties/JSONObjectno
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);

2. First In-App Ad Click Event

Parameter Description

ParameterDescriptionTypeRequired
checkIdFirst-time event verification IDStringyes (If not sent, the event will be reported as a normal event.)
adNetworkPlatformMonetization 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
Stringyes
adTypeAd 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
Intyes
adNetworkADIDThe Placement ID on monetization platforms.Stringyes
mediationPlatformMediation platforms, like GroMore and TopOn. Record "custom" if no mediation platform is used.Stringyes
customProperties/JSONObjectno
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);

3. First Self-Reported Attribution Event

Parameter Description

ParameterDescriptionTypeRequired
checkIdFirst-time event verification IDStringyes (If not sent, the event will be reported as a normal event.)
adNetworkChannel ID (should match the channel ID in ROI analysis)Stringyes
subChannelSub-channels for advertisingStringno
adAccountIDAd account ID for advertisingStringno
adAccountNameAd account name for advertisingStringno
adCampaignIdAd campaign ID for advertisingStringno
adCampaignNameAd campaign name for advertisingStringno
adOfferIdAd offer ID for advertisingStringno
adOfferNameAd offer name for advertisingStringno
adCreativeIdAd creative ID for advertisingStringno
adCreativeNameAd creative name for advertisingStringno
attributionPlatformMonitoring PlatformStringyes
customProperties/JSONObjectno
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);

4. First Login Event

ParameterDescriptionTypeRequired
checkIdFirst-time event verification IDStringyes (If not sent, the event will be reported as a normal event.)
loginTypeLogin type such as "WeChat", "QQ" and other custom valuesStringYes
statusLogin status such as "success"StringNo
customProperties/JSONObjectNo
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);

5. First Registration Event

ParameterDescriptionTypeRequired
checkIdFirst-time event verification IDStringyes (If not sent, the event will be reported as a normal event.)
regTypeRegistration types such as "WeChat", "QQ" and other custom valuesStringYes
statusRegistration status such as "success"StringNo
customProperties/JSONObjectNo
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);

6. First Order Event

ParameterDescriptionTypeRequired
checkIdFirst-time event verification IDStringYes (If not sent, the event will be reported as a normal event.)
orderIDOrder IDStringNo
payAmountThe payment amount of the order (Unit: yuan)doubleYes
currencyTypeThe currency type of the order (following ISO 4217)StringYes
payTypePayment methods, such as alipay, weixin, applepay, paypal, etc.StringNo
statusOrder StatusStringYes
customProperties/JSONObjectNo
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);

7. First In-App Purchase Event

ParameterDescriptionTypeRequired
checkIdFirst-time event verification IDStringYes (If not sent, the event will be reported as a normal event.)
orderIdThe order ID generated by the system for this purchaseStringno
payAmountThe amount paid for this purchase (Unit: yuan)doubleyes
currencyTypeThe currency type of payment (following ISO 4217)Stringyes
payTypePayment methods, such as alipay, weixin, applepay, paypal, etc.Stringno
productIdPurchased item IDStringno
productNamePurchased item nameStringno
productNumQuantity of items purchasedIntno
payStatusPayment status 1: successful 2: failedIntyes
failReasonReason for payment failureStringno
customProperties/JSONObjectno
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);

8. Custom First Time Event

ParameterDescriptionTypeRequired
checkIdFirst-time event verification IDStringYes (If not sent, the event will be reported as a normal event.)
customEventNameDeveloper custom event nameStringYES
preEventDataCustom event preset properties currently only support _pay_amount and _currency_type; other fields will be discarded by the SDK.

JSONObjectNo
customEventDataDeveloper custom event propertyJSONObjectNo
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.


Previous
Set User Property
Next
Calculate Event Duration
Last modified: 2025-02-06Powered by