Skip to main content

Segement

一、Segment Introduction#

The server will use the key passed by the developer as a filter and pass it directly to the backend; If there is no grouping, the default grouping strategy will be used.#

1、TradPlus reporting data#

The following data is reported by TradPlus SDK and developers do not need to process it.

categoryKeytypeconditionNumber of rulesdescription
appApp versionversioninclude, exclude1Fill in versionName for Android and version for ios. When including and excluding, you can fill in multiple version numbers, separated by commas.
appApp installation timeintRange, >, <1Counting from the first initialization of TradPlus SDK
appSDK versionversionInclude, exclude, range, >, <1TradPlus SDK version, including and excluding, you can fill in multiple version numbers, separated by commas. When > and <, only one can be filled in.
deviceIDFAstringinclude1When iOS14 cannot be obtained, we can create a traffic group to classify these devices based on whether the user authorizes IDFA.
deviceDevice IDstringinclude1You can fill in multiple device IDs on the web side, separated by English commas. The device ID can be IDFA, IDFV, GAID, OAID
devicesystem versionversionInclude, exclude, >, <1Mobile phone system version, including and excluding, you can fill in multiple system version numbers, separated by commas. When > and <, only one can be filled in
deviceEquipment Typesstring(ignoreCase)include, exclude1You can choose iPhone or iPad, multiple choices are allowed
deviceEquipment Manufacturingstring(ignoreCase)include, exclude1Take Huawei as an example, you can select multiple
deviceNetwork connection typestringinclude1Multiple selections are available on the web side, and the possible values ​​are: WiFi, 2G, 3G, 4G, 5G

2、App reporting data#

The following data is selectively reported by developers as needed.

categoryKeytypeconditionNumber of rulesdescription
Custom user IDuser_idstringinclude1You can enter multiple IDs on the web side, separated by commas. In addition, TradPlus can provide device-level monetization data (API) based on this user id.
ageuser_ageintRange, >, <, =multipleEnter a number (0-99) in years
genderuser_genderstring=1The web side can only single-select, the possible values are: male, female; the sdk side can pass values: unknown, male, female
In-game leveluser_levelintRange, >, <, =1
In-app payment amountuser_iap_amountfloatRange, >, <, =1
In-app payment currencyuser_iap_currencystring=1Currently supports USD, CNY, EUR. Single choice
In-app paymentsuser_iap_countint>、<, =1
channelchannelstringinclude, exclude1The web side supports filling in multiple channel numbers, separated by commas.
Sub-channelsub_channelstringinclude, exclude1The web side supports filling in multiple sub-channel numbers, separated by commas.
Custom user attributescustom_xxxstring/intInteger: range, >, <, =; string: included, excludedThe application passes in custom user attributes, such as customusername, in the form of Key-Value (key is 'custom' + field name). Supports up to 5.
segment tagsegment_tagstringinclude1If the SDK reports segment_tag, the waterfall configuration of the specified segment will be used. When this parameter matches, other parameters will be ignored. Supports at most 1.

二、Use of traffic grouping#

1、Setting method#

  • The interface needs to be called before initializing the SDK

2、APP global custom rule settings#

//Example
Dictionary<string, string> customMap = new Dictionary<string, string>();
customMap.Add("user_id", "test_user_id");
customMap.Add("user_age", "19");
customMap.Add("segment_id", "1571");
TradplusAds.Instance().SetCustomMap(customMap);

3、Placement custom rule settings#

//Take incentive videos as an example
Dictionary<string, string> customMap = new Dictionary<string, string>();
customMap.Add("user_id", "test_rewardVideo_userid");
customMap.Add("custom_data", "rewardVideo_TestIMP");
customMap.Add("segment_tag", "rewardVideo_segment_tag");
extra.customMap = customMap;
TPRewardVideoExtra extra = new TPRewardVideoExtra();
extra.customMap = customMap;
TradplusRewardVideo.Instance().LoadRewardVideoAd("unitId",extra);