Menu

AD traffic grouping

1. Introduction to traffic grouping

TopOn Multiple dimensions are provided to group users, and different Waterfalls can be configured for different traffic groups to achieve refined traffic monetization. The traffic grouping dimensions currently supported by TopOn are as follows: Region, advertising style, application, advertising slot, date, week, hour, network type, Application version, SDK version, system version, device type, device ID, device brand, installation source, installation time and custom rules, etc.

2. Traffic grouping settings

(1 ) In the TopOn developer backend, the Aggregation Management page can create and manage Traffic grouping

(2) The setting rules for traffic grouping are as follows:

RulesConditionsNumber of rulesDescription Example
RegionIncludes, excludes1Multiple regions can be selectedMainland China, United States
CityIncludes, excludes1You can select multiple cities. After selecting the region, you can choose the cityGuangzhou, Beijing
DateIncludeMultipleYou can select 2022-01-01 00:00 to 2022-01-26 23:59. Multiple selections are allowed2022-01-01 00:00 to 2022-01-26 23:59, 2022-02-01 00: 00 to 2022-02-26 23:59 Use OR conditions for judgment, that is, if one of the dates is met
Day of the weekincludes1 You can choose from Monday to Sunday. Multiple selections possibleMonday, Tuesday
HoursincludesMultipleYou can select weeks from 00:00 to 23:5910:00 to 23:59
Time zoneEqual1You can choose various time zones around the worldUTC+8 Beijing
Network typeIncludes12G\3G\ can be selected 4G\WiFi. Multiple selections availableWiFi
Application version nameIncludes and excludes1App Version Name (App Version Name), you can fill in multiple application versions, separated by English commas2.2.1,2.2.2
Application version numberIncludes, excludes, ≥, ≤1Application version number (App Version Code), which must be a positive integer. Including or not included, multiple application version numbers can be entered, separated by commas; ≥ or ≤, only one application version number can be entered11,12 or 11
SDK versionInclude, exclude, >, <1TopOn SDK version, including and excluding, you can fill in multiple SDK version numbers, separated by English commas. > and <, only one can be filled in5.0.0
System versionInclude, exclude, >, << /td>1Mobile system version, including and If not included, you can fill in multiple system version numbers, separated by commas. > and <, only one can be filled in13.3.1
Device IDIncludes1You can fill in multiple device IDs, separated by English commas. Device IDs can Is IDFA, GAID, Android28968E75-E7BE-4AA2-BFA0-C455DD74C111
Device typeIncluded, excluded1You can choose iPhone or iPad. Multiple selections availableiPad
Equipment brandIncluding and excluding1You can choose multiple brandsXiaomi
Installation time>,<MultipleThe installation time is calculated based on the time when TopOn SDK is first initialized. Multiple installation time rules are in a relationship and must meet the traffic grouping at the same time to take effect.
Hours/days/weeks: Calculate the time interval from the request time to the installation time in units of hours/days/weeks;
Natural days: Calculate the time interval from the request date to the installation date.
< 1 day
Installation sourceIncluded, excluded1The package name of the source channel (app store, browser) where this application is installed. For example, the installation source is Google Play can fill in the package name (com.android.vending). You can enter multiple installation sources, separated by commas
Note: Only valid for Android systems.
com.google.xxx
ChannelsIncluding and excluding1Supports filling in multiple channel numbers, separated by English commas. The channel numbers must first pass the SDK's Custom rules incomingchannel_1
Sub-channelIncludes and excludes1Supports filling in multiple sub-channel numbers, separated by English commas. The sub-channel numbers must first pass the SDK's Custom rulesIncomingsub_channel_1
User IDIncludes, excludes, ≥, ≤, interval 1Developers can use numbers Number users, such as each user corresponding to a globally non-unique number). The user number must first be passed in through the SDK's Custom rules. Only supported by Android SDK v6.1.32 and above100001
Custom rulesEqual to use= symbol is not equivalent to using != symbol, and use & symbol1Set through Key-Value conditions. Key and Value conditions can be Equal to= or not equal to!=, one Key can correspond to multiple Values, separated by English commas. Use & between multiple conditions, that is, multiple conditions need to be met at the same time. It is recommended that Value use the following character rules: uppercase and lowercase letters, numbers and underscores [A-Za-z0-9_]For example, 18-year-old male Users, brought through Toutiao or Tencent promotion, are divided into a group, and the custom rules that need to be filled in are age=18&gender=male&channel=bytedance,tencent
Cold start requestEqual1TopOn SDK will automatically determine whether to apply cold start, and this traffic grouping configuration will be used during cold start. It is recommended to configure fewer advertising sources for cold start to reduce request time and improve display rate. TopOn SDK v6.1.78 and above supportView cold boot Request instructions
SDK preset strategyEqual1TopOn supports developers to export SDK preset strategies for advertising space dimensions, and preset them into your App before the app is released. When the app installation starts for the first time, TopOn will use the SDK preset strategy to request ads to increase the ad display rate when the app installation starts for the first time. Supported by TopOn SDK v6.1.78 and aboveSDK preset policy rules cannot be used together with other rules in traffic grouping, View SDK preset policy instructions

When multiple rules are set in a single traffic group, each rule is judged using AND conditions. That is, the traffic group will be issued only when all conditions are met at the same time

3.TopOn SDK sets custom rules for traffic grouping

3.1 Custom rule setting method

It is recommended to call the interface of TopOn SDK before initializing TopOn SDK and pass in custom rules Parameters.

1. App global custom rule settings

The custom rules of the App are set globally and are valid for all placements.

Android methodiOS methodUnity method
initCustomMapcustomDatainitCustomMap

2. Custom rule settings for Placement

TopOn Android SDK V5.5.2 and above is supported and is only valid for the current Placement. You can add Placement-specific custom rules based on App custom rules

Android methodiOS methodUnity method
initPlacementCustomMapsetCustomData:forPlacementIDsetCustomDataForPlacementID

3. Sample code

The following code example is for users who are age =18 and male, and who are brought in through a headline promotion.

  • TopOn Android SDK code example
Map<String, String> customMap = new HashMap<>();
customMap.put("age","18");  //age=18
customMap.put("gender","male"); //gender=male
customMap.put("channel","bytedance"); //promotion network is byte dance
ATSDK.initCustomMap(customMap); //  The custom rules of the App are set globally and are valid for all placements.
ATSDK.initPlacementCustomMap(placementId, customMap); 
  • TopOn iOS SDK code example
[ATAPI sharedInstance].customData = @{kATCustomDataUserIDKey:@"test_custom_user_id",
    kATCustomDataChannelKey:@"custom_data_channel",
    kATCustomDataSubchannelKey:@"custom_data_subchannel",
    kATCustomDataAgeKey:@18,
    kATCustomDataGenderKey:@"male",      // The value entered when advertising traffic is grouped must be the same as the value passed in.
    kATCustomDataNumberOfIAPKey:@19,
    kATCustomDataIAPAmountKey:@20.0f,
    kATCustomDataIAPCurrencyKey:@"usd",
}; 

[[ATAPI sharedInstance] setCustomData:@{
    kATCustomDataChannelKey:@"placement_custom_data_channel",
    kATCustomDataSubchannelKey:@"placement_custom_data_subchannel"
} forPlacementID:@"your placementID"];
  • TopOn Unity SDK code example

ATSDKAPI.initCustomMap(new Dictionary<string, string> { { "unity3d_data", "test_data" } }); 

ATSDKAPI.setCustomDataForPlacementID(new Dictionary<string, string> { { "unity3d_data_pl", "test_data_pl" } } ,placementId);

Backend configuration traffic grouping example:

3.2 Predefined Key of custom rules

TopOn SDK is predefined in App global custom rules The following key values are provided. If the following keys cannot meet the needs, you can add the key by yourself. You only need to match the corresponding key when adding a custom traffic group.

KeyDescription
user_idUser ID. It is defined by the developer and passed into the TopOn SDK. Subsequently, TopOn supports statistical data based on the user ID dimension
channelChannel. The following character rules are recommended: uppercase and lowercase alphanumeric and underscore [A-Za-z0-9_]
sub_channelSub channel. The following character rules are recommended: uppercase and lowercase alphanumeric and underscore [A-Za-z0-9_]
user_numberUser number. Developers can use numbers to number users. For example, each user corresponds to a globally non-unique number
Only supported by Android SDK v6.1.32 and above
ageAge
genderGender, such as male, female, unknown
iap_amountIn-app Payment amount
iap_currencyIn-app payment currency, such as US dollar "USD"
iap_timeIn-app pay time

4.TopOn advertising slot uses traffic grouping

(1) You can configure multiple traffic groupings for a single TopOn ad slot in Aggregation Management

    • When configuring multiple traffic groups, each traffic group will have Priority, the prefix number of the traffic group is the priority, 1 is the highest priority, and the priority decreases from left to right. When multiple traffic groups are hit at the same time, TopOn will return the highest priority traffic group ad source configuration.
    • You can View the traffic group ID

(2) You can clickTraffic Grouping Set the button on the right to set the traffic grouping of the ad slot. Traffic group setting functions include: Add, copy existing, and adjust priority

5. How to verify whether the test traffic grouping is effective

After completing Steps 3 and 4After setting, you can open the debugging mode of TopOn SDK to verify whether the traffic grouping takes effect. View the specific usage of log. SDK In the output advertising process log, segment_id is the Traffic group ID

6. Common applicable scenarios of traffic grouping

(1) Increase advertising revenue. For example, group users by "region", "installation time", etc., configure different waterfall flows for different groups, and refine operations.

(2) Filter ad requests from risky users. Risk users can be grouped by "Installation Source", "Device ID", etc., and no waterfall flow is configured for this group to achieve the purpose of filtering their ad requests and display.

(3) Used when testing formal waterfall flow under specific circumstances. Testers can be divided into groups by "device ID", etc. for testers to test online waterfall flow. The following code example is for age=18 and male, and was brought through Toutiao promotion User

Previous
Advanced
Next
Preset strategy
Last modified: 2025-05-30Powered by