Menu

First-Time Event

A first-time event refers to an event that is recorded only once for a specific dimension. 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.

Method example:

public static void trackFirstEvent(SEBaseAttributes attributes);
Parameter NameParameter MeaningParameter TypeMandatory
attributesFirst-time event attributesSEBaseAttributesYes

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

First-time EventParameter TypeDescription
Custom first-time eventCustomAttributesCustom first-time event (model type)
First in-app ad impression eventAppImpressionAttributesFirst in-app ad impression event (model type)
First in-app ad click eventAdClickAttributesFirst in-app ad click event (model type)
First in-app purchase eventProductsAttributesFirst in-app purchase event (model type)
First self-reported attribution eventAppAttributesFirst self-reported attribution event (model type)
First order eventOrderAttributesFirst order event (model type)
First registration eventRegisterAttributesFirst registration event (model type)
First login eventLoginAttributesFirst login event (model type)

1. Call example (First in-app ad impression event) :

Parameter description:

  (For the corresponding fields from each mediation platform, please refer to Mediation Platform-Others)

AppImpressionAttributes parameters:

Parameter NameParameter MeaningParameter TypeMandatory
checkIdFirst-time event verification IDstringyes
ad_platformMonetization 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
Stringyes
ad_typeAd 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
ad_appidThe App ID on monetization platforms.Stringno
ad_idThe Placement ID on monetization platforms.Stringyes
mediation_platformMediation platforms. Record "custom" if no mediation platform is used.Stringyes
ad_ecpmAdvertising eCPM
(0 or negative values are invoid.)
(Mininum Unit: USD dollar)
Doubleyes
currency_typeRevenue Currency Type (following ISO 4217)Stringyes
is_renderedWhether the ad is rendered successfully.
YES: success
NO: Failed.
If you do not need to pass in this indicator, please pass YES.
Booleanyes
customPropertiesCustom propertiesJSONObjectno


Call example:

AppImpressionAttributes impressionAttributes = new AppImpressionAttributes();
impressionAttributes.ad_platform = "AdMob";
impressionAttributes.ad_appid = "ad_appid";
impressionAttributes.ad_id = "ad_id";
impressionAttributes.ad_type = 1;
impressionAttributes.ad_ecpm = 0.8;
impressionAttributes.currency_type = "USD";
impressionAttributes.is_rendered = true;
impressionAttributes..checkId = "checkId"
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.trackFirstEvent(impressionAttributes);

2. Call example (First in-app ad click event) :

AdClickAttributes parameters:

Parameter NameParameter MeaningParameter TypeMandatory
checkIdFirst-time event verification IDstringyes
ad_platformMonetization 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
ad_typeAd 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
ad_idThe Placement ID on monetization platforms.Stringyes
mediation_platformMediation platforms. Record "custom" if no mediation platform is used.Stringyes
customPropertiesCustom propertiesJSONObjectno


Call example:

AdClickAttributes AdClickAttributes = new AdClickAttributes();
AdClickAttributes.ad_platform = "admob"; // Monetization Platform
AdClickAttributes.mediation_platform = "gromore";// Mediation Platform proving the ad
AdClickAttributes.ad_id = "943508343"; // Monetization Platform ad placement ID
AdClickAttributes.ad_type = 1; // ad_type
AdClickAttributes.checkId = "checkId";
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.trackFirstEvent(AdClickAttributes);

3. Call example (First self-reported attribution event) :

AppAttributes parameters:

Parameter NameParameter MeaningParameter TypeMandatory
checkIdFirst-time event verification IDStringyes
ad_networkChannel ID (should match the channel ID on advertising platform)Stringyes
sub_channelSub-channels for advertisingStringno
ad_account_idAd account ID for advertisingStringno
ad_account_nameAd account name for advertisingStringno
ad_campaign_idAd campaign ID for advertisingStringno
ad_campaign_nameAd campaign name for advertisingStringno
ad_offer_idAd offer ID for advertisingStringno
ad_offer_nameAd offer name for advertisingStringno
ad_creative_idAd creative ID for advertisingStringno
ad_creative_nameAd creative name for advertisingStringno
attribution_platformMonitoring PlatformStringyes
customPropertiesCustom PropertiesDictionaryno

Call example:

AppAttributes AppAttributes = new AppAttributes();
AppAttributes.ad_network = "toutiao";
AppAttributes.sub_channel = "103300";
AppAttributes.ad_account_id = "1655958321988611";
AppAttributes.ad_account_name = "xxxGameStudio18";
AppAttributes.ad_campaign_id = "1680711982033293";
AppAttributes.ad_campaign_name = "GoGoGoCampaign157-1024";
AppAttributes.ad_offer_id = "1685219082855528";
AppAttributes.ad_offer_name = "GoGoGoOffer406-1024";
AppAttributes.ad_creative_id = "1680128668901378";
AppAttributes.ad_creative_name = "AutoCreated20210901178921";
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 = "xxxGameStudio18";
AppAttributes.ad_campaign_id = "1680711982033293";
AppAttributes.ad_campaign_name = "GoGoGoCampaign157-1024";
AppAttributes.ad_offer_id = "1685219082855528";
AppAttributes.ad_offer_name = "GoGoGoOffer406-1024";
AppAttributes.ad_creative_id = "1680128668901378";
AppAttributes.ad_creative_name = "AutoCreated20210901178921";
AppAttributes.attribution_platform = "Attribution Platformxxx";
AppAttributes.checkId = "checkId";
Dictionary properties = new Dictionary();
properties.Add("K1", "V1");
properties.Add("K2", "V2");
properties.Add("K3", 2);

AppAttributes.customProperties = properties;

SolarEngine.Analytics.trackFirstEvent(AppAttributes);

4. Call example (First login event) :

LoginAttributes parameters:

Parameter NameParameter MeaningParameter TypeMandatory
checkId First-time event verification ID StringYes
login_typeLogin type such as "WeChat", "QQ" and other custom valuesStringYes(No more than 32 characters)
login_status Login status such as "success"

StringNo
customPropertiesCustom Properties DictionaryNo


Call example:

LoginAttributes LoginAttributes = new LoginAttributes();
LoginAttributes.login_type = "QQ";
LoginAttributes.login_status = "success";
LoginAttributes.checkId = "checkId";
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.trackFirstEvent(LoginAttributes);

5. Call example (First registration event) :

RegisterAttributes parameters:

Parameter NameParameter MeaningParameter TypeMandatory
checkIdFirst-time event verification ID StringYes(If checkId is not passed, it will be an ordinary event)

register_typeLogin type such as "WeChat", "QQ" and other custom valuesStringYes(No more than 32 characters)
register_statusLogin status such as "success"StringNo
customPropertiesCustom PropertiesDictionaryNo


Call example:

RegisterAttributes RegisterAttributes = new RegisterAttributes();
RegisterAttributes.register_type = "QQ";
RegisterAttributes.register_status = "success";
RegisterAttributes.checkId = "checkId";
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.trackFirstEvent(RegisterAttributes);

6. Call example (First order event) :

OrderAttributes parameters:

Parameter Name Parameter Meaning Parameter Type Mandatory
checkIdFirst-time event verification IDStringYes(If checkId is not passed, it will be an ordinary event)
order_idOrder IDStringNo(No more than 32 characters)
pay_amountPay amount, (Mininum Unit: USD dollar)DoubleYes
currency_typeDisplay currency type, following the "ISO 4217 international standard," such as CNY, USD.StringYes
pay_typePayment method: alipay, weixin, applepay, paypal, etcStringNo
statusOrder statusStringYes
customPropertiesCustom Properties(For details, see Contents: 4. Customize attributes)DictionaryNo


Call example:

OrderAttributes OrderAttributes = new OrderAttributes();
OrderAttributes.order_id = "2341242342676398724"; // Not exceeding 128 characters
OrderAttributes.pay_amount = 128.00; // (Mininum Unit: USD dollar)
OrderAttributes.currency_type = "USD"; // Currency type, following the "ISO 4217 International Standard"
OrderAttributes.pay_type = "Alipay"; // Payment method
OrderAttributes.status = "success";// Order status
OrderAttributes.checkId = "checkId";
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.trackFirstEvent(OrderAttributes);

7. Call example (First in-app purchase event) :

ProductsAttributes parameters:

Parameter Name Parameter Meaning Parameter Type Mandatory
checkIdFirst-time event verification IDstringYes(If checkId is not passed, it will be an ordinary event)
order_idThe order ID generated by the system for this purchase

stringNo
pay_amountPayment amount, (Mininum Unit: USD dollar)doubleYes
currency_typeThe currency type of payment, following the "ISO 4217 international standard," such as CNY, USD.stringYes
pay_typePayment method: alipay, weixin, applepay, paypal, etcstringNo
product_idThe ID of the product purchased

stringNo
product_nameProduct NamestringNo
product_numThe quantity of products purchased

IntNo
paystatusPayment status SEConstant_IAP_PayStatus enumerates SEConstant_IAP_PayStatus_success: success SEConstant_IAP_PayStatus_fail: failure SEConstant_IAP_PayStatus_restored: The node is restoredSEConstant_IAP_PayStatusYes
fail_reasonReasons for payment failure

stringNo
customPropertiesCustom PropertiesDictionaryNo


Call example:

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 meaning success, 2 meaning failed
productsAttributes.pay_type = "wechat";
productsAttributes.pay_amount = 9.9;
productsAttributes.checkId = "checkId";
Dictionary<string, object> properties = new Dictionary<string, object>();
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.trackFirstEvent(productsAttributes);

8. Call example (Custom first-time event) :

CustomAttributes Properties

Parameter NameParameter MeaningParameter TypeMandatory
checkIdFirst-time event verification IDstringYes(If checkId is not passed, it will be an ordinary event)
custom_event_nameCustom event namestringYes
customPropertiesCustom event propertyDictionaryYes


Call example:

CustomAttributes customAttributes = new CustomAttributes();
customAttributes.checkId = "kkkkllosd";
customAttributes.custom_event_name = "test";
//Set custom event properties


Dictionary<string, object> customProperties = new Dictionary<string, object>();
customProperties.Add("K1", "V1");
customProperties.Add("K2", "V2");
customProperties.Add("K3", 2);
customAttributes.customProperties = customProperties;
//Set custom first-time event preset properties; currently, only _pay_amount and _currency_type are supported, other fields will be discarded by the SDK.
Dictionary<string, object> preProperties = new Dictionary<string, object>();
preProperties.Add("_pay_amount", 11.09);
preProperties.Add("_currency_type", "USD");
customAttributes.preProperties = preProperties;
SolarEngine.Analytics.trackFirstEvent(customAttributes);

Note:

 The field "eventName" is required, otherwise, the custom first-time event cannot be reported.


Previous
Duration Events
Next
Set User Property
Last modified: 2024-11-12Powered by