SDK preset strategy usage instructions
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 to preset TopOn advertising locally. bit strategy.
TopOn SDK supports the use of all ad types such as open screen, rewarded video, interstitial, native, and banner SDK 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
- SDK preset strategy it is recommended to create and build it into the application under the advertising slot that does not enable AB experiment . If the application has a built-in SDK preset strategy created under a certain AB experiment group of the ad slot, this AB Experimental data will be disturbed.
2. Create traffic groups for SDK preset policies
Using SDK preset policies requires the creation of 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 at the same time as other rules
- SDK preset policy under the traffic group The ad placement strategy only provides export 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 preset 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 completed SDK 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 the SDK preset strategy
1. After you modify the advertising space strategy of the SDK preset strategy, the TopOn server takes 15 minutes Complete 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.

2. 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.

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

4. After exporting the SDK preset strategy TopOn will generate a json file named after the advertising slot ID
5. Import the SDK preset policy into the application
- The exported json file Place it in your application project, and refer to the SDK access document to complete the SDK preset strategyCode integration
- Refer to the following TopOn SDK integration instructions
Android access instructions
- In the project's Create a new directory under the src/main/assets directory localStrategy, the directory naming rules can be customized and used in the following steps.
- Put the json file exported from the background into 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 It is the directory name localStrategy created in the first step.
The sample code is as follows:
// Application#onCreate() call
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
- Call the setPresetPlacementConfigPathBundle: API to set it before initiating the 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:
// The corresponding Bundle is passed in according to the json file imported into the project, which is used as the mainBundle in the example
[[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 filter Comprehensive 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 strategy Traffic grouping can be viewed 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.
- Use SDK provisioning policies for splash ads during application integration.