SolarEngine (SE) is an all-in-one mobile app growth analytics and publishing intelligent decision-making platform. It supports data management across global channels, assisting developers to monitor every stage of business development. With our attribution tracking and user-granular ROI analysis, you'll be able to measure the true value every channel creates and optimize future growth strategies. SE also offers various analysis models and A/B testing feature to help fully visualize the user journey, identify potential pain points, implement targeted product enhancements and ultimately drive large-scale app growth.
This documentation provides instructions for data reporting on the Flutter SDK side.
Privacy Policy: https://www.solar-engine.com/privacyPolicyEN.html
Note:
The SolarEngine SDK supports Android 5.0(APILevel 21) and above.
Before officially starting data access, there are some parameters and SDK packages required. Follow the directions below to get prepared.
Entry: Asset Management - App Management - AppKey
Please add the following content to the pubspec.yaml file of your Flutter project:
dependencies:
se_flutter_sdk_us: ^1.5.5
After integrating SE Flutter SDK, if you need to upgrade the Android SDK, find the build.gradle file in the Android lib directory in the Flutter Plugins directory under the Flutter project and modify the configuration. The specific operations are as follows:
implementation 'com.reyun.solar.engine.oversea:solar-engine-core:1.3.1.1'
If you use the Parameter Delivery SDK (for A/B Testing and Remote Config features in SE), you need to add the following configuration:
implementation 'com.reyun.solar.engine.oversea:solar-remote-config:1.3.1.1'
The path is as shown below:
If using gradle to pull the code fails, you need to add the maven warehouse configuration to the build.gradle file in the project root directory. The specific configuration is as follows:
maven {
url "https://maven-android.solar-engine.com/repository/se_sdk_for_android/"
}
If you need to obtain OAID, you shall add the following dependency in the baseProjectTemplate.gradle file in your project.
implementation 'com.reyun.solar.engine:se-plugin-oaid:1.3.1.1'
And please add the following Maven repository in your build.gradle file:
maven {
url "https://developer.huawei.com/repo/"
}
maven {
url 'https://developer.hihonor.com/repo'
}
If obfuscation is required during packaging, please add the following code to the obfuscation configuration file.
-keep class com.reyun.** {*; }
-keep class route.**{*;}
-keep interface com.reyun.** {*; }
-keep interface route.**{*;}
-dontwarn com.reyun.**
-dontwarn org.json.**
-keep class org.json.**{*;}
# Google lib
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
java.lang.String getId();
boolean isLimitAdTrackingEnabled();
}
-keep public class com.android.installreferrer.** { *; }
# If the OAID plugin is used, please add the following obfuscation strategy:
-keep class com.huawei.hms.**{*;}
-keep class com.hihonor.**{*;}
Using pod integration on iOS does not require manual setting of dependencies.
The SolarEngine SDK provides two initialization methods, allowing developers to choose whether to integrate the Online Parameter SDK in their projects. In this context, "SEConfig" represents the configuration parameters for the SolarEngine SDK, while "RCConfig" represents the configuration parameters for the Online Parameter SDK.
Pre-Initialization
When the application is first launched after installation, the SDK is pre-initialized. During pre-initialization, the SDK does not collect any personal information or report data to SolarEngine.
Method example:
static void preInitialize(String appkey)
Call example:
String appkey = "";
SolarEngine.preInitialize(appkey);
If you do NOT want to use A/B testing and online parameter functions in SolarEngine, you can select this initialization method (without online parameter SDK).
Method example
static void initializeWithAppkey(String appkey, SolarEngineConfig config)
Parameter Description:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
appKey | Obtained from the SolarEngine background. | String | yes |
config | SolarEngine SDK configuration items | SolarEngineConfig | yes |
SolarEngineConfig parameter description
Parameter name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
logEnabled | Whether to enable log printing (default off) | bool | no |
isGDPRArea | Whether it is a GDPR area (default false) | bool | no |
adPersonalizationEnabled | Whether users allow Google to use their data for ad personalization. This field only applies to Android but not iOS. It won't be reported if not set. | bool | no |
adUserDataEnabled | Whether users allow their personal data to be shared with Google. This field only applies to Android but not iOS. It won't be reported if not set. | bool | no |
isDebugModel | Whether to enable Debug mode (default off) | bool | no |
remoteConfigData | Online parameter configuration | SERemoteConfigData | no |
OnAttributionSuccess | Attribution success callback | Callback | no |
OnAttributionFail | Attribution failure callback | Callback | no |
isCoppaEnabled | Whether your app is required to comply with Children's Online Privacy Protection Rule ("COPPA"). Default false. | bool | no |
isKidsAppEnabled | Whether your app is targeting kids under 13 years old and needs to be marked as "Kids App" category. Default false. | bool | no |
attAuthorizationWaitingInterval | Support ATT Authorization Waiting Interval (up to 120 seconds) the first time iOS reports event. Events will not be reported until user authorizes ATT or waiting time is out. | int | no |
fbAppID | If overseas developers need to use meta attribution, set meta appid here. | string | no |
enableDelayDeeplink | Whether to enable deferred deep linking, default NO. | bool | no |
Call example
String appkey = "";
SolarEngineConfig config = SolarEngineConfig();
config.logEnabled = true;
config.onAttributionSuccess = (data) {
print(data);
};
config.onAttributionFail = (code) {
print(code);
};
SolarEngine.initialize(appkey, config);
If you need to use A/B testing and online parameter functions in SolarEngine, you should select this initialization method (with online parameter SDK).
RCConfig parameter description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
enable | Whether to enable the online parameter SDK (default disabled) | bool | yes |
mergeType | SDK configuration merge strategy. By default, the server configuration is merged with the local cache configuration. | MergeType | no |
customIDProperties | Custom ID, which matches the custom ID set by the user in the background. | Map<String, dynamic> | no |
customIDEventProperties | The custom ID event attribute value, which matches the custom ID event attribute value set by the user in the background. | Map<String, dynamic> | no |
customIDUserProperties | The custom ID user attribute value, which matches the custom ID user attribute value set by the user in the background. | Map<String, dynamic> | no |
customIDDeviceProperties | The custom ID device attribute value, which matches the custom ID device attribute value set by the user in the background. | Map<String, dynamic> | no |
mergeType (merge strategy) introduction:
Parameter | Parameter meaning |
---|---|
WITH_USER | When the app is launched for the first time or the version is updated, use the server configuration to merge with the user's default configuration. This method can clear the local cache configuration. |
WITH_CACHE | Use the server configuration to merge with the user's local cache configuration. The online parameter SDK uses default merge strategy. |
Call example
String appkey = "";
String userId = "";
SolarEngineConfig config = SolarEngineConfig();
config.logEnabled = true;
SERemoteConfigData rcConfig = SERemoteConfigData();
rcConfig.enable = true;
rcConfig.logEnabled = true;
rcConfig.customIDProperties = {
"key": "customID",
"value": "androidID"
};
rcConfig.customIDEventProperties = {
"key": "customEventID",
"value": "_appStart"
};
rcConfig.customIDUserProperties = {
"key": "customUserID",
"value": "Topic"
};
config.remoteConfigData = rcConfig;
SolarEngine.initialize(appkey, userId, config);
Here are the initialization callback codes and their meanings.
0: Initialization success
101: SDK is not pre-initialized
102: Illegal appkey
103: Null context (Android only)
104: Failed generating distinct_id (Android only)
static void initializeWithCallbacK(String appkey, SolarEngineConfig config, OnInitializationCallback callback)
Call Example
String appkey = "";
SolarEngineConfig config = SolarEngineConfig();
config.logEnabled = true;
SolarEngine.initializeWithCallbacK(appkey, config, (int? code) {
// Initialization callback
if (code == 0) {
// Initialization success
print("Initialization success");
} else {
// Initialization failed
print(code);
}
}
);
When it comes to EU user personal information processing, the SolarEngine SDK will automatically collect certain fields such as GAID, IMEI, IMEI2, and Android ID. However, according to the EU privacy policy, if EU users disagree with their personal data collection, developers need to disable the sensitive data collection in their SDK.
Please follow the procedures below to set up GDPR during SDK initialization:
1. When users reject their sensitive information being collected, please disable related data collection function by adding isGDPRArea(true) in SDK initialization.
2. Ensure that users won't trigger any privacy-related events before obtaining their legally valid consent.
3. Clarify the EU users personal data processing policy and practice in your privacy policy.
If your product is operated within the EU region and advertised on Google, please make sure to send this parameter, so that you will comply with Google's EU user consent policy.
Note:
According to the GDPR, only when end users clearly reject their personal information being collected, you will need to set isGDPRArea(true) to stop SDK from collecting privacy-related fields.
To comply with the upcoming Digital Markets Act (DMA), Google has updated their consent mode for traffic in European Economic Area (EEA). SolarEngine also took action to adapt to the new updates.
Here is a comparison:
SE Parameter | Google Parameter | Value | Meaning | Failure Reminder |
---|---|---|---|---|
_isGDPRArea | eea | true/false | Whether users allow their private information being collected. | |
_ad_personalization_enabled | ad_personalization | true/false | Whether users allow Google to use their data for ad personalization. | The value of "_ad_personalization_enabled" cannot be empty. |
_ad_user_data_enabled | ad_user_data | true/false | Whether users allow their personal data to be shared with Google. | The value of "_ad_user_data_enabled" cannot be empty. |
Call example:
SolarEngineConfig config = SolarEngineConfig();
config.isGDPRArea = true;
config.adPersonalizationEnabled = false;
config.adUserDataEnabled = false;
SolarEngine.initializeWithAppkey(appkey, config);
Method example
static void setGDPRArea(bool isGDPRArea)
Parameter Description
Parameter | Parameter Meaning | Parameter Type | Mandatory |
isGDPRArea | Whether it is a GDPR region (default false) | bool | yes |
Call example
SolarEngine.setGDPRArea(true);
If your app participates in attribution, you should set the ATT authorization waiting. During this time interval, the SDK will wait for the user to authorize ATT and obtain the IDFA before reporting the Install event, thereby increasing attribution accuracy. If the user has not authorized within the ATT authorization waiting interval, the SDK will still report the event, but the event will not include the IDFA field.
Sample Code
SolarEngineConfig config = SolarEngineConfig();
config.attAuthorizationWaitingInterval = 120; // Wait for at most 120 seconds.
SolarEngine.initializeWithAppkey(appkey, config);
Method example
static Future<String> getDistinctId()
The value returned will be the current "distinct_id". If no "distinct_id" exists, return "null".
Code example
void getDistinctId() async{
var distinctId = await SolarEngine.getDistinctId();
print(distinctId);
}
Visitor ID refers to the user's unique identifier (_visitor_id) after installing and before logging in.
We provide an interface for developers to customize visitor IDs. If you have your own visitor management system and need to replace SolarEngine's visitor IDs, you should set it before initializing the SDK.
During data reporting, only the latest visitor ID passed in will be used. Multiple calls should be avoided to prevent abnormal situations where multiple visitor IDs are reported consecutively.
Method example
static void setVisitorID(String visitorID)
Call example
SolarEngine.setVisitorID("xxxVisitorIDxxx");
Note:
1. This call only passes the visitor ID to the SDK and does not report events.
2. The length of the visitor ID set by the developer cannot exceed 128 characters, otherwise the setting will fail.
Call getVisitorId to get the current visitor ID:
Method example
static Future<String> getVisitorID()
Return value: Returns the previously set visitor ID, default "".
Call example
void getVisitorId() async{
var visitorID = await SolarEngine.getVisitorId();
print(visitorID);
}
Account ID refers to the unique identifier of the user's login account within the app. Prior to logging in, visitor IDs will be used as the user identifier.
Once the account ID is set, it will be retained until the logout function is called to clear the account ID. The logout function should only be called when users actually log out, but not called when the app is closed or running in the background.
During data reporting, only the latest account ID passed in will be used. Multiple calls should be avoided to prevent abnormal situations where multiple non-normal account IDs are reported consecutively.
Call the login method to set the user's account ID.
Note:
The length of the account ID set by the developer cannot exceed 128 characters, otherwise the setting will fail.
Method example
static void login(String accountID)
Call example
SolarEngine.login("xxxAccountIDxxx");
Call getAccountID to get the user's account ID.
Method example
static Future<String> getAccountID()
Return value: Returns the account ID that has been set, the default is ""
Call example
void getAccountID() async{
var accountID = await SolarEngine.getAccountID();
print(accountID);
}
Call logout to clear the account ID.
Method example
static void logout()
Call example
SolarEngine.logout();
Note: This call only notifies the SDK to clear the account ID and will not report the user logout event.
Public event properties refer to the properties that are included in every event, such as the user's source channel and the advertising ID associated with conversions.
Call setSuperProperties to set public event properties.
Note:
Method example
static void setSuperProperties(Map<String, dynamic> superProperties)
Parameter Description
Parameter | Parameter Meaning | Parameter Type | Mandatory |
superProperties | Developer-defined public event attribute dictionary | Map<String,dynamic> | YES |
Call example
Map<String, dynamic> properties = {};
properties['key1'] = 'String';
properties['key2'] = 2;
properties['key3'] = false;
SolarEngine.setSuperProperties(properties);
Call the unsetSuperProperty method to clear a public event property of the specified key value
Method example
static void unsetSuperProperty(String key)
Call example
SolarEngine.unsetSuperProperty("K3");
Call the clearSuperProperties method to clear all public event properties
Method example
static void clearSuperProperties()
Call example
SolarEngine.clearSuperProperties();
The SDK provides an interface for obtaining attribution result information. Developers can use the attribution information to perform operations like event tracking.
The SDK provides two ways to obtain attribution result information:
1. Set the attribution results callback: When the SDK succeeds or fails in obtaining the attribution result, a callback will be given (this interface is an asynchronous callback).
2. Obtain the attribution results directly: Get the attribution results directly from the SDK cache. If the SDK has no attribution results yet, it will directly return null (this interface returns synchronously).
Set attribution callback in SEConfig:
Example code
String appkey = "";
String userId = "";
SolarEngineConfig config = SolarEngineConfig();
config.logEnabled = true;
config.onAttributionSuccess = (data) {
print(data);
};
config.onAttributionFail = (code) {
print(code);
};
SolarEngine.initialize(appkey, userId, config);
static Future<String> getAttribution()
Example code
void getAttribution() async{
var attribution = await SolarEngine.getAttribution();
print(attribution);
}
Attribution error code descriptions and detailed attribution results can be found in:
https://help.solar-engine.com/en/docs/SDK-Attribution-Result-Details
Developers can obtain preset property information by calling this plugin.
Method example
static Future<Map> getPresetProperties() async
Example code
var properties = await SolarEngine.getPresetProperties();
print(properties.toString());
Returned fields:
Field Name | Description |
---|---|
_appkey | The AppKey assigned by SolarEngine (SE) |
_distinct_id | Device ID generated by SE |
_account_id | The account ID passed in by the developer through the login interface |
_visitor_id | The visitor ID passed in by the developer through the setVisitorID interface |
_session_id | The session ID generated within SE for each cool start |
_uuid | Device UUID (Android only) |
_imei | Device IMEI (Android only) |
_imei2 | Device IMEI2 (Android only) |
_gaid | GAID (Android only) |
_oaid | OAID (Android only) |
_idfa | IDFA (iOS only) |
_idfv | IDFV (iOS only) |
_android_id | Android ID (Android only) |
_ua | Device UA |
_language | The language of the device's system settings |
_time_zone | Device time zone |
_manufacturer | Device manufacturer |
_platform | SDK platform 1: Android 2: iOS |
_os_version | Device system version |
_screen_height | Screen height |
_screen_width | Screen width |
_density | Screen density (Android only) |
_device_model | Device model |
_device_type | Device type 1: Android phone 2: Android pad 3: iPhone 4: iPad 0: Other |
_app_version | Application version number |
_app_version_code | Application build number |
_package_name | Application package name |
_app_name | Application name |
_channel | Channel name (Default AppStore for iOS) |
_lib | 1: Android 2: iOS |
_lib_version | SDK version number |
The SolarEngine SDK supports developers to set custom properties for three preset events: app startup, installation, and exit:
Method example
static void setPresetEvent(PresetEventType presetEventType, Map<String, dynamic> customProperties)
Parameters:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
preseteventType | Preset events, e.g. AppInstall AppStart AppEnd All | PresetEventType | Yes |
properties | Custom preset event properties sent by the developer | Map<String,dynamic> | No |
Call example
Map<String, dynamic> customProperties = {};
customProperties['kind'] = 'setPresetEventProperties';
customProperties['name'] = "Jim";
SolarEngine.setPresetEventProperties(PresetEventType.All, customProperties);
// After calling setPresetEvent API,the _appInstall、_appStart and _appEnd events will have the custom properties set.
Note:
After the SDK initialization is complete, you can call "track" to report data.
By default, data is reported when the device is on 3G/4G/5G/WiFi, not when it's on 2G. You can change the setting through enable2GReporting.
Only when 30 pieces of event data is cached, event reporting will be triggered, and the reporting interval should be within 30 seconds.
Event reporting can be triggered immediately in the following cases:
1) When user switches into app background or switches back, events "_appStart" "_appEnd" will be generated and reported immediately after checking the cached events.
2) When the developer calls the "SDK reportEventImmediately" plug-in, event reporting starts immediately after checking the cached events.
Call example
SolarEngine.reportEventImmediately();
The reported data can be categorized into the following four types:
1. Preset Events: These events are triggered and reported automatically by the SDK according to preset rules. They have specific _event_name such as installation, launch, exit, etc.
2. Predefined Events: These events have predefined meanings and event names in the system. They require developers to report data when the corresponding events occur, such as ad impressions, in-app purchases, etc.
3. Custom Events: These events can be custom defined by developers who need to instrument the code to trigger and report these events.
4. Duration Events: These events track the duration of a specific event.
Note:
Please do not report custom properties starting with "_", otherwise SDK will abandon its value by default.
Event Name | Event Identifier | Description |
---|---|---|
App Install | _appInstall | Automatically reported every time the app is installed and opened for the first time. |
App Launch | _appStart | Automatically reported every time the app is opened, either from a closed state or transitioning from the background to the foreground after being inactive for more than 30 seconds. |
App Exit | _appEnd | Automatically reported every time the app is closed or when it remains inactive in the background for more than 30 seconds. |
Automatically reported when displaying ads within the app, which is essential for ROI analysis and monetization-related metrics in user analysis. (Event Name: "_appImp")
Method example
static void trackAppImpress(SEAppImpressionData appImpressionData)
Parameter Description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
appImpressionData | A class that carries the attributes that need to be uploaded for in-app ad impression events. For details, please refer to the definition of the SEAppImpressionData class in the solar_engine.dart file. | SEAppImpressionData | yes |
SEAppImpressionData parameter description:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
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 |
adType | 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 |
adNetworkAppID | The App ID on monetization platforms. | String | |
adNetworkADID | The Placement 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 | Advertising eCPM (revenue per thousand ad impressions, 0 or negative means no data transmitted), unit: yuan | double | 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 | Custom properties, string type | Map<String, dynamic> | No |
Call example
SEAppImpressionData appImpressionData =
SEAppImpressionData();
appImpressionData.adNetworkPlatform = "tencent";
appImpressionData.adType = 2;
appImpressionData.adNetworkAppID = "3SDFED";
appImpressionData.adNetworkADID = "22323";
appImpressionData.mediationPlatform = "toutiao";
appImpressionData.ecpm = 22.9;
appImpressionData.currencyType = "USD";
appImpressionData.isRenderSuccess = true;
appImpressionData.mediationPlatform = "custom";
Map<String, dynamic> customProperties = {};
customProperties['goods'] = 'shoes';
customProperties['goodsprice'] = 20;
customProperties['goodsaddress'] = "Beijing";
appImpressionData.customProperties = customProperties;
SolarEngine.trackAppImpress(appImpressionData);
// customProperties are not mandatory to be passed in.
// Note: Please do not set the key as starting with an underscore "_", otherwise errors will occur and the key will be discarded.
This event is reported when an in-app purchase is made.
This is a key event used for payment prediction model training. It is a must-report event when using the prediction services provided by the system.
The _event_name for an in-app purchase event is _appPur.
Method example
static void trackAppPurchase(SEAppPurchaseData appPurchase)
Parameter Description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
appPurchase | A class that carries the attributes that need to be uploaded for in-app purchase events. For details, please refer to the definition of the SEAppPurchaseData class in the solar_engine.dart file. | SEAppPurchaseData | yes |
SEAppPurchaseData parameter description:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
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 | / | Map<String, dynamic> | no |
Note:
The failReason parameter will only be passed in when the payStatus parameter is SEConstant_IAP_PayStatus_fail. For other statuses, just pass "".
Call example
SEAppPurchaseData appPurchaseData = SEAppPurchaseData();
appPurchaseData.orderId = "1123";
appPurchaseData.payAmount = 90.99;
appPurchaseData.currencyType = "CN";
appPurchaseData.payType = "weixin";
appPurchaseData.productId = "232dddd";
appPurchaseData.productName = "Game Skin";
appPurchaseData.productNum = 1;
appPurchaseData.payStatus = 1;
appPurchaseData.failReason = "Payment Failure";
Map<String, dynamic> customProperties = {};
customProperties['name'] = 'wyq';
customProperties['age'] = 10;
appPurchaseData.customProperties = customProperties;
SolarEngine.trackAppPurchase(appPurchaseData);
// customProperties are not mandatory to be set or passed in.
// Note: Please do not set the key as starting with an underscore "_", otherwise errors will occur and the key will be discarded.
Call the trackAdClick method to report ad click events.
Method example
static void trackAdClick(SEAdClickData adClickData)
Parameter Description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
adClickData | A class that carries the attributes that need to be uploaded to ad click events. For details, please refer to the definition of the SEAdClickData class in the solar_engine.dart file. | SEAdClickData | yes |
SEAdClickData parameter description:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
adPlatform | 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 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 | / | Map<String, dynamic> | no |
Call example
SEAdClickData adClickData = SEAdClickData();
adClickData.adPlatform = "mtg";
adClickData.adType = 1;
adClickData.adNetworkADID = "11222ffff";
adClickData.mediationPlatform = "solar-engine";
Map<String, dynamic> customProperties = {};
customProperties['app'] = 'taobao';
customProperties['sex'] = "man";
adClickData.customProperties = customProperties;
SolarEngine.trackAdClick(adClickData);
// customProperties are not mandatory to be set or passed in.
// Note: Please do not set the key as starting with an underscore "_", otherwise errors will occur and the key will be discarded.
Call the trackRegister method to report registration events.
Method example
static void trackAppRegister(SEAppRegisterData appRegisterData)
Parameter Description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
appRegisterData | A class that carries the attributes that need to be uploaded to registration events. For details, please refer to the definition of the SEAppRegisterData class in the solar_engine.dart file. | SEAppRegisterData | yes |
SEAppRegisterData parameters:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
regType | Registration types such as "WeChat", "QQ" and other custom values | String | Yes |
status | Registration status such as "success" | String | No |
customProperties | Custom Properties | Map<String, dynamic> | No |
Call example
SEAppRegisterData appRegisterData = SEAppRegisterData();
appRegisterData.regType = "QQ";
appRegisterData.status = "success";
Map<String, dynamic> customProperties = {};
customProperties['type'] = 'wifi';
customProperties['like'] = "foods";
customProperties['re'] = "QQ";
appRegisterData.customProperties = customProperties;
SolarEngine.trackAppRegister(appRegisterData);
// customProperties are not mandatory to be set or passed in.
// Note: Please do not set the key as starting with an underscore "_", otherwise errors will occur and the key will be discarded.
Call the trackLogin method to report login events
Method example
static void trackAppLogin(SEAppLoginData appLoginData)
Parameter Description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
appLoginData | A class that carries the attributes that need to be uploaded to login events. For details, please refer to the definition of the SEAppLoginData class in the solar_engine.dart file. | SEAppLoginData | yes |
SEAppLoginData parameter introduction:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
loginType | Login type such as "WeChat", "QQ" and other custom values | String | Yes |
status | Login status such as "success" | String | No |
customProperties | Custom Properties | Map<String, dynamic> | No |
Call example
SEAppLoginData appLoginData = SEAppLoginData();
appLoginData.loginType = "weixin";
appLoginData.status = "failed";
Map<String, dynamic> customProperties = {};
customProperties['type'] = 'wifi';
customProperties['like'] = "foods";
customProperties['re'] = "QQ";
appLoginData.customProperties = customProperties;
SolarEngine.trackAppLogin(appLoginData);
// customProperties are not mandatory to be set or passed in.
// Note: Please do not set the key as starting with an underscore "_", otherwise errors will occur and the key will be discarded.
Call the trackOrder method to report order events
Method example
static void trackAppOrder(SEAppOrderData appOrderData)
Parameter Description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
appOrderData | A class that carries the attributes that need to be uploaded to in-app order events. For details, please refer to the definition of the SEAppOrderData class in the solar_engine.dart file. | SEAppOrderData | yes |
Introduction to SEAppOrderData class parameters:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
orderId | Order ID | String | No (limit 128 characters) |
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 (limit 32 characters) |
status | Order Status | String | Yes |
customProperties | Custom Properties | Map<String, dynamic> | No |
Call example
SEAppOrderData appOrderData = SEAppOrderData();
appOrderData.orderId = "111222333";
appOrderData.payAmount = 20.33;
appOrderData.currencyType = "USD";
appOrderData.payType = "weixin";
appOrderData.status = "failed";
Map<String, dynamic> customProperties = {};
customProperties['app'] = 'taobao';
customProperties['sex'] = "man";
appOrderData.customProperties = customProperties;
SolarEngine.trackAppOrder(appOrderData);
// customProperties are not mandatory to be set or passed in.
// Note: Please do not set the key as starting with an underscore "_", otherwise errors will occur and the key will be discarded.
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")
Method example
static void trackAppAttr(SEAppAttrData trackAppAttr)
Parameter Description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
trackAppAttr | A class that carries the attributes that need to be uploaded to self-reported attribution events. For details, please refer to the definition of the SEAppAttrData class in the solar_engine.dart file. | SEAppAttrData | yes |
Introduction to SEAppAttrData class parameters:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
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 | Custom Properties | Map<String, dynamic> | no |
Call example
SEAppAttrData appAttrData = SEAppAttrData();
appAttrData.adNetwork = "ks";
appAttrData.subChannel = "bytedance";
appAttrData.adAccountId = "2222ddd";
appAttrData.adAccountName = "mtg";
appAttrData.adCampaignId = "12323";
appAttrData.adCampaignName = "animal";
appAttrData.adOfferId = "100oo";
appAttrData.adOfferName = "wanmeishijie";
appAttrData.adCreativeId = "dkdkd11";
appAttrData.adCreativeName = "dog";
appAttrData.attributionPlatform = "tencent";
Map<String, dynamic> customProperties = {};
customProperties['channel'] = 'xiaomi';
customProperties['date'] = "10.20";
appAttrData.customProperties = customProperties;
SolarEngine.trackAppAttr(appAttrData);
In addition to the clearly predefined events listed above, developers can report custom events according to their own analysis needs.
The custom event names should be customized by the developer.
Here are the naming conventions for event names:
Call trackCustom to report custom events:
Method example
static void trackCustomEvent(SECustomEventData customEventData)
customEventData object parameter description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
customEventName | Developer custom event name | String | YES |
customProperties | Developer custom event properties | Map<String, dynamic> | YES |
Call example
SECustomEventData customEventData = SECustomEventData();
customEventData.customEventName = "OpenAPP";
Map<String, dynamic> customProperties = {};
customProperties['time'] = '2020-10-10';
customProperties['data'] = "hello word!";
customEventData.customProperties = customProperties;
SolarEngine.trackCustomEvent(customEventData);
A custom property is a Dictionary object where each element represents a property.
Key: Property Name
Value: Property Value
Custom Property Types
The data type of custom event properties is determined by their data types reported for the first time and cannot be changed once confirmed. For subsequent reporting of the same properties, only properties with the same data types as the first occurrence will be stored in the database.
Data Type | Description | Example |
---|---|---|
number | Range from -9E15 to 9E15, without quotation marks. | 1234, 12.34 |
string | Limit 2KB. Numbers with quotation marks will also be identified as strings. | "dashen", "北京", "1234", "true" |
date | "yyyy-MM-dd HH:mm:ss.SSS", "yyyy-MM-dd HH:mm:ss", or "yyyy-MM-dd 00:00:00" | "2023-03-01 12:34:56","2023-03-01 12:34:56.789","2023-03-01 00:00:00" |
boolean | True or false without quotation marks. | true, false |
array | All elements in an array will be converted into strings. | ["a","1","true"] |
Note:
The data type of the property determines their analysis logic available in analysis models. For example, the numerical type can perform calculations such as maximum value, minimum value, and summation, while the Boolean type can perform calculations of true and false values. Therefore, when determining the format of data reporting, you need to consider the analysis scenarios and business needs and formulate a complete event tracking plan as directions.
Call the createTimerEvent to start timing for an event. Configure the name of the event, and event properties to report. When the event comes to an end, a "_duration" property will automatically be added for this event (unit: millisecond). It should be noted that there can only be one timing task for the same event.
Method example
static Future<String> createTimerEvent(SETimerEventData timerEventData)
timerEventData object parameter description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
customEventName | Developer custom event name | String | Yes |
customProperties | Developer custom event properties | Map<String, dynamic> | Yes |
Return value: Returns the JSON string used for reporting duration events.
Call example
SETimerEventData event = SETimerEventData();
event.customEventName = "timer_event_my";
Map<String, dynamic> customProperties = {};
customProperties['kind'] = 'timer';
customProperties['send'] = "ture";
event.customProperties = customProperties;
event.ts = DateTime.now().millisecondsSinceEpoch;
timerEventStr = await SolarEngine.createTimerEvent(event);
Call the trackTimerEvent method to report developer-defined duration events.
Method Example
static void trackTimerEvent(String timeEventData)
Parameter Description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
timeEventData | JSON string obtained through createTimerEvent method | string | Yes |
Call example
SolarEngine.trackTimerEvent(timerEventStr);
Note:
When reporting the preset event _appEnd, the duration starting from the last _appStart will be reported by default. That is, the duration of an exit event does not need to be configured to start timing, and will be assigned a value by default.
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
static void trackFirstEvent(SEBaseEventData baseEventData)
Parameter Description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
baseEventData | First-time event attributes | SEBaseAttributes | Yes |
When using the baseEventData parameter, you need to pass a subclass instance of it. The specific instructions are as follows.
First-time Event | Parameter Type | Description |
---|---|---|
SECustomEventData | CustomAttributes | Custom first-time event (model type) |
SEAppImpressionData | AppImpressionAttributes | First in-app ad impression event (model type) |
SEAdClickData | AdClickAttributes | First in-app ad click event (model type) |
SEAppPurchaseData | ProductsAttributes | First in-app purchase event (model type) |
SEAppAttrData | AppAttributes | First self-reported attribution event (model type) |
SEAppOrderData | OrderAttributes | First order event (model type) |
SEAppRegisterData | RegisterAttributes | First registration event (model type) |
SEAppLoginData | LoginAttributes | First login event (model type) |
1. Call example (First custom event) :
SECustomEventData class parameter description:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
firstCheckId | First-time event verification ID | string | yes (If checkId is not passed in, it is a normal event.) |
customEventName | Custom event name | string | yes |
customProperties | Custom event properties | map | no |
SECustomEventData customEventData = SECustomEventData();
customEventData.customEventName = "OpenAPP"; // Mandatory
Map<String, dynamic> customProperties = {};
customProperties['time'] = '2020-10-10';
customProperties['data'] = "hello word!";
customEventData.firstCheckId = "checkId"; // Mandatory
customEventData.customProperties = customProperties;
SolarEngine.trackFirstEvent(customEventData);
2. Call example (First in-app purchase event) :
For the description of SEAppPurchaseData class parameters, see: 5.2.2. In-app purchase events
SEAppPurchaseData appPurchaseData = SEAppPurchaseData();
appPurchaseData.currencyType = "CN";
appPurchaseData.failReason = "Payment Failure";
appPurchaseData.orderId = "1123";
appPurchaseData.payAmount = 90.99;
appPurchaseData.payStatus = 1;
appPurchaseData.payType = "weixin";
appPurchaseData.productId = "232dddd";
appPurchaseData.productName = "Game Skin";
appPurchaseData.productNum = 1;
Map<String, dynamic> customProperties = {};
customProperties['name'] = 'wyq';
customProperties['age'] = 10;
customProperties['like'] = "Beer";
appPurchaseData.customProperties = customProperties;
SolarEngine.trackAppPurchase(appPurchaseData);
appPurchaseData.firstCheckId = "checkId"; // Required
SolarEngine.trackFirstEvent(appPurchaseData);
3. Call example (First in-app ad impression event) :
For the description of SEAppImpressionData class parameters, see: 5.2.1, Ad Impression, firstCheckId is a required field.
4. Call example (First in-app ad click event) :
For the description of SEAdClickData class parameters, see: 5.2.3. Ad Click, firstCheckId is a required field.
5. Call example (First self-reported attribution event) :
For the description of SEAppAttrData class parameters, see: 5.2.7. Self-Reported Attribution Results, firstCheckId is a required field.
6. Call example (First order event) :
For the description of SEAppOrderData class parameters, see: 5.2.6. In-App Order, firstCheckId is a required field.
7. Call example (First registration event) :
For the description of SEAppRegisterData class parameters, see: 5.2.4. Registration, firstCheckId is a required field.
8. Call example (First login event) :
For the description of SEAppLoginData class parameters, see: 5.2.5. Login, firstCheckId is a required field.
SolarEngine provides multiple methods for reporting user properties. You can use these methods to add or modify user properties.
It is recommended for you to select properties that change infrequently or hold significant value, for example, age, game level, location, first payment time and total payment amount. Other properties with higher change frequency can be reported and recorded through events.
User property settings can be set by calling userUpdate, userInit, userAdd, userUnset, userAppend, or userDelete.
Note:
If you want to upload a batch of user attributes, among which the existing user attributes will not update their values, and the non-existing attributes will be created and saved, you can call userInit to set them.
Method example
static void userInit(Map<String, dynamic> properties)
Parameter Description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
properties | Developer self-defined user properties | Map<String, dynamic> | Yes |
Call example
Map<String, dynamic> properties = {};
properties['kind'] = 'timer';
properties['send'] = "ture";
SolarEngine.userInit(properties);
For general user attributes, you can call userUpdate to set them. The attributes uploaded in this way will overwrite the original attribute values. If the user attribute does not exist before, it will be created, and the data type will follow the value passed in.
Method example
static void userUpdate(Map<String, dynamic> properties)
Parameter Description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
properties | Developer self-defined user properties | Map<String, dynamic> | Yes |
Call example
Map<String, dynamic> properties = {};
properties['kind'] = 'timer1111';
properties['send'] = "false";
properties['count'] = 1;
SolarEngine.userUpdate(properties);
If you want to report a numeric attribute and accumulate its values, you can call userAdd. If the attribute has not been set, it will be assigned a value of 0 and then calculated. You can pass in a negative value, which is equivalent to a subtraction operation.
Method example
static void userAdd(Map<String, dynamic> properties)
Call example
Map<String, dynamic> properties = {};
properties['count'] = 2;
SolarEngine.userAdd(properties);
Note:
The value called by userAdd only allows Number type.
When you want to clear the user attribute values of a user, you can call userUnset to clear the specified attributes (string array). If the attribute has not been created in the array, the attribute will not be created.
Method example
static void userUnset(List<String> keys)
Parameter Description
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
keys | Key value that needs to be cleared. | String | Yes |
Call example
SolarEngine.userUnset(["kind"]);
You can call userAppend to append user attributes of array type. If the attribute does not exist, it will be created.
Method example
static void userAppend(Map<String, dynamic> properties)
Call example
Map<String, dynamic> properties = {};
properties['kind3'] = 'timer3';
SolarEngine.userAppend(properties);
You can call userDelete to delete users. After a user is deleted, you will no longer be able to query the user's user attributes, but the events generated by the user can still be queried.
Method example
static void userDelete(SEUserDeleteType deleteType)
Call example
SolarEngine.userDelete(SEUserDeleteType.DELETE_BY_ACCOUNTID);
This interface is suitable for iOS applications that have used attribution services.
The SolarEngine SDK encapsulates the system's requestTrackingAuthorizationWithCompletionHandler. By using the SDK's encapsulated ATT (App Tracking Transparency) authorization interface, the SDK can know the user's authorization status immediately, can prioritize reporting Install events with IDFA, and can optimize attribution efficiency.
The callback value 'status' corresponds to the ATTrackingManagerAuthorizationStatus of the iOS system.
0: Not Determined;1: Restricted;2: Denied;3: Authorized ;999: system error
SolarEngine.requestTrackingAuthorizationWithCompletionHandler((code) {
if (code == 0) {
print('att-Not Determined');
} else if (code == 1) {
print('att-Restricted');
} else if (code == 2) {
print('att-Denied');
} else if (code == 3) {
print('att-Authorized');
} else if (code == 999) {
print('att-systom error');
}
});
Note:
Conversion values are used to track user actions within the SKAdNetwork. You can map 64 conditions to conversion values ranging from 0 to 63 and send this integer value to the SKAdNetwork during user installation. This information helps you understand how users interact with your app in the initial days after installation.
You can update the conversion value using the "updateConversionValue" method. This method includes Apple's updateConversionValue method to receive the updated conversion values.
Call example 1:
static Future<String?> updateConversionValueWithErrorCallback(int conversionValue)
Parameters:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
conversionValue | A conversion value ≥0 and ≤63. You can assign it to a specific install. It will help you understand the value of the user without identifying the user's personal information. | int | Yes |
Example:
var error = await SolarEngine.updateConversionValueWithErrorCallback(0);
print("sss-updateConversionValueWithErrorCallback =${error}");
Call example 2:
static Future<String?> updateConversionValueWithErrorCallbackSkad4( int conversionValue, String coarseValue, bool lockWindow)
Parameters:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
fineValue | A conversion value ≥0 and ≤63. You can assign it to a specific install. It will help you understand the value of the user without identifying the user's personal information. | int | Yes |
coarseValue | SKAdNetworkCoarseConversionValue. If the app's install volume is insufficient and does not meet the privacy threshold, the function is enabled. The following options are supported: SKAdNetworkCoarseConversionValueHigh SKAdNetworkCoarseConversionValueLow SKAdNetworkCoarseConversionValueMedium | string | Yes |
completion | Used to catch and handle the callbacks. Set this value to nil if you don't provide a handler. | bool | No |
Please set SolarEngine SDK as the postback receiver of SKAdNetwork following the guide below:
Deep linking is used to send users directly to specific in-app locations, producing a seamless user journey and improving conversion rates. This chapter will introduce necessary steps to generate deep links in SolarEngine.
URL Scheme example:test1.link.solar-engine.com
Configure Scheme
Developers can configure the AndroidManifest.xml file in the opened native Android project (replace Scheme with the value obtained from the SolarEngine in the previous step):
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="your scheme" />
</intent-filter>
</activity>
Deep Linking callback settings
Method Example
static void onDeepLinkCallback(OnDeeplinkCallback callback);
Parameter Description
Parameter Name | Parameter Meaning | Type | Mandatory |
---|---|---|---|
callback | deep link callback | SESDKDeeplinkCallback | Yes |
call example
SolarEngine.onDeepLinkCallback((code, data) {
if (code == 0) {
print("deeplink callback success----");
print(data);
} else {
print("deeplink callback failed----$code");
}
});
Pass the URL to SE SDK
How to obtain URL:
https://help.solar-engine.com/en/docs/Deep-Linking-FWYi#c606658906fe12d6b433c8bd43a9340f
Method example:
static void handleDeepLinkUrl(String url);
Parameter Description
Parameter | Parameter Meaning | Parameter Type | Mandatory |
url | usrScheme | String | yes |
Call example
SolarEngine.initializeWithCallbacK(appkey, config, (code) {
// Initialization success
if(code == 0){
print("Initialization success-----");
print(code);
//Note: the handleDeepLinkUrl method must be called after successful initialization and after setting the Deeplink callback, otherwise it will not take effect
SolarEngine.handleDeepLinkUrl("your url");
}
});
After you enable deferred deep linking, the SE SDK will request the related parameters during initialization.
If callback success, the parameters will be:
- sedpLink: The parameter for redirection.
- turlId: A 7-digit short link.
- sedpUrlscheme: The URL scheme filled in by the user when creating the deep link.
If callback failed, errorCode will be:
- 1101: Error in SDK;
- 1102: Failed to establish a connection with the server;
- 1103: Timeout in establishing a connection with the server;
- 1104: Server-side error;
- 1105: Server returns data to the SDK;
- 1106: Deep link matching failed, server callback is empty.
Call Example
// Set deferred deep linking callback
SolarEngine.onDelayDeepLinkCallback((code, data) {
print("onDelayDeepLinkCallback----");
if (code == 0) {
print("deferred deeplink successfully parsed----");
print(data);
} else {
print("deferred deeplink failed----$code");
}
});
// Enable deferred deep linking
SolarEngineConfig config = SolarEngineConfig();
config.enableDelayDeeplink = true;
SolarEngine.initializeWithCallbacK(appkey, config, (code) {
print("initializeWithCallbacK----");
print(code);
})
iOS URL Scheme Configuration
In your iOS project, select TARGETS > Info > URL Types, and click on the "+". Then input the URL Scheme you created on SolarEngine.
Parse the URL Scheme
After you set up the URL Scheme in the SDK, your app can be opened successfully through them.
Export the iOS project and find the AppDelegate.m file to achieve the following method.
call example:
#import "AppDelegate.h"
#import "GeneratedPluginRegistrant.h"
#import <SolarEngineSDK/SolarEngineSDK.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
NSString *urlString = url.absoluteString;
[[SolarEngineSDK sharedInstance] track:@"url_scheme_openURL" withProperties:@{@"url":urlString}];
[[SolarEngineSDK sharedInstance] appDeeplinkOpenURL:url];
return YES;
}
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
[[SolarEngineSDK sharedInstance] track:@"univisal_link_openURL" withProperties:@{@"url":userActivity.webpageURL.absoluteString}];
[[SolarEngineSDK sharedInstance] appDeeplinkOpenURL:userActivity.webpageURL];
return YES;
}
@end
Listen for Deeplink Callback Parameters in Flutter
Method example:
static void onDeepLinkCallback(OnDeeplinkCallback callback)
Call example:
// This method needs to be called before initialization; otherwise, the callback will not be received.
SolarEngine.onDeepLinkCallback((code, data) {
if (code == 0) {
print("onDeepLinkCallback success");
String sedpLink = data?['sedpLink'];
String turlId = data?['turlId'];
String from = data?['from'];
Map customParams = data?['customParams'];
} else {
print("onDeepLinkCallback failed:$code");
}
});
————————————
2025-9-24 1.5.5
Based on Android 1.3.1.1 iOS 1.3.0.3
•Android:SDK performance optimization
2025-9-18 1.5.4
Based on Android 1.3.1.1 iOS 1.3.0.3
•Android:SDK performance optimization
2025-8-07 1.5.3
Based on Android 1.3.0.6 iOS 1.3.0.3
•Android:SDK performance optimization
2025-07-04 1.5.2
Based on Android 1.3.0.3 iOS 1.3.0.3
• iOS&Android:Optimize obtaining attribution results
• iOS&Android: SDK performance optimization
2025-01-17 1.5.1
Based on Android 1.2.9.3 iOS 1.2.9.4
• iOS: optimized predefined events
2024-12-31 1.5.0
Based on Android 1.2.9.3 iOS 1.2.9.3
•iOS&Android:Optimize obtaining attribution results
2024-11-21 1.4.2
China Mainland version: Based on Android 1.2.9.1 iOS 1.2.9.2
•iOS: optimizes network requests
2024-11-07 1.4.1
China Mainland version: Based on Android 1.2.9.1 iOS 1.2.9.1
•iOS&Android:debug mode optimized
•iOS: Reporting logic optimized
2024-10-24 1.4.0
China Mainland version: Based on Android 1.2.9.0 iOS 1.2.9.0
•iOS&Android:China Mainland version: optimizes network requests
2024-9-20 1.2.8.3
China Mainland version: Based on Android 1.2.8.3 iOS 1.2.8.2
International version: Based on Android 1.2.8.3 iOS 1.2.8.2
•iOS&Android:Optimize network requests
•Android:Optimize online parameter logic
2024-9-11 1.3.2
China Mainland version: Based on Android 1.2.8.2 iOS 1.2.8.1
International version: Based on Android 1.2.8.2 iOS 1.2.8.1
• iOS: Optimize event tracking and reporting
• iOS&Android: Support deferred deep linking