In order to reduce the time it takes for TopOn SDK to obtain the TopOn advertising space strategy when the application is first launched after installation, and to avoid the failure of TopOn SDK to obtain the TopOn advertising space strategy, TopOn supports applications in Local preset TopOn advertising space strategy.
TopOn SDK supports all advertising types such as open screen, rewarded video, interstitial screen, native, and bannerSDK preset strategy.
1. Introduction
TopOn supports developers to export SDK preset strategies for advertising slot dimensions, preset 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.
Notes:
- Applying local preset SDK policies requires updating TopOn SDK v6.1.78 and above
SDK preset strategy only used on first launch of app installation. After TopOn SDK successfully obtains the online advertising space strategy, the advertising space strategy configured by TopOn Online will be used in the future
2. Create traffic grouping of SDK preset policy
To use SDK preset policy, you need to create Specific traffic grouping, the specific process is as follows:
- Add traffic grouping on the aggregation management page, and select the traffic grouping rule SDK built-in strategy

- SDK preset policy rules in traffic grouping cannot be used together with other rules
- SDK preset strategy The advertising strategy under traffic grouping can only be exported and preset to your app.
- If you modify the SDK preset policy 's policy, you need to re-export and provision it to your app.
- You can create multiple SDK pre- Setup strategy. In order to better analyze the effect of using SDK preset strategy for different TopOn SDK versions, it is recommended that you Different TopOn SDK versions create different SDK preset policies.
3. Configure SDK preset policy
Creation completedSDK preset strategy, you can preset policies for this SDK just like other traffic groups. Configure, such as adding/editing/copying ad sources, modifying advanced settings, etc.
4. Export SDK preset strategy
- When you modify the advertising space strategy of the SDK preset strategy, the TopOn server requires 15 The clock completes the new policy synchronization. It is recommended that after you complete the configuration of the SDK preset policy, wait for 15 minutes before exporting the SDK preset policy.

- When exporting SDK preset policy, you need to select the TopOn SDK version you use in your application. Please ensure that the TopOn SDK version you export is consistent with the TopOn SDK version integrated in your application.

- If the following prompt appears when you export the SDK preset policy, it means that the TopOn server When the synchronization of the SDK preset strategy's ad slot strategies has not been completed, it is recommended that you wait 15 minutes before exporting the SDK preset strategy.

- Export SDK preset policyAfter successful, TopOn will generate a json file named after the advertising slot ID
5. Import the SDK preset strategy into the application
- Put the exported json file into your application project, and refer to the SDK access document to complete the SDK pre-installation in the application project. Setting strategy Code integration
- Refer to the following TopOn SDK integration instructions
Android access instructions
- Create a new directory local strategy in the src/main/assets directory of the project. The directory naming rules can be customized and used in the following steps.
- Put the json file exported from the background to the newly created directory src/main/assets/localStrategy.
- You only need to call the ATSDK#setLocalStrategyAssetPath(Context context, String path) API to set it before initiating the loading of ads. The parameter Path is the directory created in the first step. namelocalStrategy. The sample code is as follows:
//Called in Application#onCreate()
public class DemoApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
//...
ATSDK.setLocalStrategyAssetPath(this, "localStrategy");
//...
}
}
iOS access instructions
- Introduce the json file exported from the background into the project
// Import the corresponding Bundle into the project according to the json file. In the example, mainBundle is used.
[[ATAPI sharedInstance] setPresetPlacementConfigPathBundle:[NSBundle mainBundle]];
6. View the data of SDK preset policies
- You can Aggregation Management page view SDK preset strategy traffic grouping, you can also filterComprehensive report A/B testing, Traffic grouping to view the traffic grouping of SDK preset policy data.
- If the ad slot has been created before starting the AB experiment Traffic grouping of SDK preset strategy, after starting AB experiment, SDK preset strategy’s traffic group will also be copied to the experiment group with the smallest ID in the AB experiment
- After starting the AB experiment, the original SDK preset policy's traffic grouping can be done in View data in ungrouped
7. Frequently Asked Questions
1. How long does it take to export the SDK preset strategy after completing it?
Answer: After you modify the advertising space strategy of the SDK preset strategy, the TopOn server takes 15 minutes to complete the new strategy synchronization . It is recommended that after you complete the configuration of the SDK preset policy, wait for 15 minutes before exporting the SDK preset policy.
2. Every application release update Do I need to re-import TopOn's SDK preset policy file?
Answer: It is recommended that you re-import TopOn's SDK preset strategyFile:
- This application release has updated TopOn SDK, it is recommended that you re-export SDK preset policy and preset it for this updated TopOn SDK version into the application (please ensure that the TopOn SDK version you export is consistent with the TopOn SDK version integrated in your application)
- When you modify SDK preset strategy’s ad placement strategy, it is recommended that you re-import TopOn’s SDK preset strategy
3. What will be the impact if the TopOn SDK is updated in the new version of the application but the old SDK preset policy file is not updated?
Answer: The new version of TopOn SDK will be compatible with the old version of SDK preset policy file. If a new ad placement strategy is added to the new version, but your application does not re-import the corresponding version of the SDK preset strategy file, the new features of the new version of TopOn SDK may not take effect. In order to ensure better monetization effect, if you have updated the TopOn SDK version, it is recommended that you re-export the SDK pre-format for this updated TopOn SDK version. Configuration strategy and preset it into the application.
Note: The old version of TopOn SDK cannot use the new version of the SDK preset policy file.
4. First time installation and opening screen loading How to improve efficiency?
- v6.1.78 and above, you can refer to the following optimization suggestions:
- SDK preset strategy for open-screen advertising slots Add a Backup ad source. Please refer to Backup advertising Configure the advertising source (no need to export the configuration of the backstop advertising source)
- Use SDK preset strategy Call the setPresetPlacementConfigPathBundle: API to set it before initiating loading of ads. The parameter Bundle is the Bundle where the json file is introduced into the project in the first step. The sample code is as follows: