1. Enable the TopOn SDK Log
π‘Note: Before publishing your app, you need to disable the logging feature.
ATSDK.setNetworkLogDebug(true);
β Get the GAID
- Open Android Studio's Logcat and use "anythink" to filter the logs. When the TopOn SDK is initialized, it will print logs regarding the device ID as follows:
anythink: **************************************************************************** anythink: GAID(ADID): b796a53f-61bf-4e91-bc67-d505cdb97cf8 , AndroidID: f669f2b7137d82b9 anythink: ****************************************************************************
π‘If the value of GAID is not printed, please check whether the device being used has Google services installed. You need to test with a device that has Google services.
β An example of the Log
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β {
β "placementId": "b5bbdc725768fa",
β "adType": "inter", //ad format
β "mixedFormatAdType": -1,
β "action": "request_result", //"request": ad request; "request_result": request result; "impression": show ad; "click": ad click; "close": ad close
β "refresh": 0,
β "result": "fail", //action result
β "segmentId": 0, //the segment to which the ad source belongs; 0: the default segment
β "adSourceId": "1423289",
β "position": 0, //the sort position of the ad source within the ad placement
β "networkType": 6, //TopOn uses a unique ID to distinguish networks. The corresponding relationships can be viewed(https://docs.toponad.com/#/zh-cn/android/android_doc/android_access_doc?id=network_firm_id)
β "networkName": "Mintegral",
β "networkVersion": "MAL_16.1.41",
β "networkUnit": "{\"is_video\":\"0\",\"video_muted\":\"0\",\"suport_video\":\"1\",\"appkey\":\"ef13ef712aeb0f6eb3d698c4c08add96\",\"unitid\":\"1726152\",\"appid\":\"100947\"}", //the config for this ad source in the TopOn dashboard (corresponding to the network's app and ad unit settings).
β "isHB": 0,//whether it is a header bidding ad source
β "msg": "code:[ 4001 ]desc:[ Return Ad is empty. ]platformCode:[ ]platformMSG:[ EXCEPTION_UNIT_ADTYPE_ERROR ]", //if the loading fails, complete error msg will be output here
β "hourly_frequency": 0, //the number of times displayed in the current hour
β "daily_frequency": 0, //the number of times displayed in the current day
β "network_list": "6,6,6", //the ID of the network request list, separated by ","
β "request_network_num": 1, //the number of network ad sources whose loading is initiated simultaneously (corresponding Setting -> Request of the TopOn dashboard)
β "handle_class": "com.anythink.network.mintegral.MintegralATInterstitialAdapter" //the class name that calls the Network API
β }
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β οΈNote
- If "result": "fail", it indicates an error occurred with the ad action. You need to review the log for "msg", formatted as below:
"code[ " + code + " ],desc[ " + desc + " ],platformCode[ " + platformCode + " ],platformMSG[ " + platformMSG + " ]" code: the error code of the TopOn SDK desc: the error msg of the TopOn SDK platformCodeοΌthe error code of the Network platformMSGοΌthe error msg of the Network
You can look up TopOn Error Code based on the code and desc. If code=4001, you need to refer to platformCode and platformMSG for Network Error Code.
2. Debugger Tool of the TopOn
It is a suite of testing tools. These tools help you integrate and launch faster with TopOn. You can use them to confirm the validity of network integrations. This ensures that you can successfully load and show ads, among other things.
β Integration Status: Use this to confirm that you successfully completed the network integration.
β Testing with Test Ads: Use this to load and show ads from networks by using each network’s test mode.
β Testing with Live Ads: Use this to load and show ads from networks by means of your waterfall configuration.
β Sharing the Mediation Debugger: Use this to generate a copy of your integration checklist. You can send this to reviewers before you launch.
2.1 Changelog
β v1.1.1
- Supports the latest version of the TopOn SDK
- Fixed known issues
β v1.0.8
- Add support for Kwai
- Add support for the Banner Ad, Native Ad and Intersitial Ad of the TopOn ADX
- Supports TopOn SDK v6.2.70 - v6.3.80.
π‘Note: When using debugger tool, pay special attention to the following content:
- Whether the integration display for the Network is correct.
- Check if the requests, displays, and clicks for each Ad Format are working normally.
2.2 How to import
(1) Refer to the TopOn SDK Integration Guide and integrate the SDK.
(2) Import the testing tool by adding a reference in build.gradle
.
repositories {
maven {
url "https://jfrog.anythinktech.com/artifactory/debugger"
}
}
dependencies {
implementation 'com.anythink.sdk:debugger-ui:1.1.1'
}
(3) Launch the debugger tool
// Please call this function after the SDK has been successfully initialized
ATDebuggerUITest.showDebuggerUI(context);
2.3 How to use
2.3.1 The base info
π‘Note
If GAID is empty, you will not be able to use the debugger tool for testing. If it is empty, please check the following:
- Whether Google Play Services is installed and up-to-date on the device.
- Check if the code has called either of the following methods, as both can restrict access to the GAID:
ATSDK.deniedUploadDeviceInfo(DeviceDataInfo.GAID); ATSDK.setGDPRUploadDataLevel(ATSDK.NONPERSONALIZED);
2.3.2 TopOn SDK Settings
TopOn SDK settings include: Privacy Settings and Permission Settings.
(1) Privacy Settings
(2) Permission Settings
2.3.3 Integration Status
It displays the integration status of the TopOn-mediated network adapters and/or SDKs found in your app. It flags integration issues associated with each network (such as a mismatch between the network SDK and adapter version). It displays the integration status of mediated networks in three sections:
β Completed Integrations: You successfully integrated these ad networks into your app.
β Exceptional Integrations: These ad networks have one or more issues you need to fix before you can integrate them successfully into your app. Tap on the cell for more information.
β Miss Integrations: You have not integrated these ad networks into your app.
2.3.4 Testing with Test Ads
(1) Enable Debug Mode
(2) Select the network that need to enter debug mode.
(3) Select an ad format to test.
2.3.5 Testing with Live Ads
π‘Note
- SDK Version: v6.3.68 and above
- Testing Tool Version: v1.0.5 and above
- Disable the debug mode
- Setting the SDK Debug Key (TopOn dashboard -> My Account -> Key -> SDK Debug Key)
(1) How to use
// Init SDK
ATSDK.init(context, "your app id", "your app key");
// Setting the debug key
ATDebuggerUITest.showDebuggerUI(context, "your debug key");
(2) Online Test
(3) Placement Test
3. Debug mode of the TopOn
- Using the debug mode, you can test the integration of an individual network by utilizing TopOn's test ad sources for that network.
- Call the API to set this before initializing the TopOn SDK.
- For bidding ad sources, this mode only supports testing with Meta and TopOn ADX.
3.1 Networks supported by debug mode
β MetaοΌBiddingοΌ
Tips:
Meta has a high fill rate in the US.
The Facebook app must be installed and logged in on the test device.
The App ID and Placement ID prefixes for Meta ad sources are consistent.