| API | Parameters | Description |
|---|---|---|
| initSDK | string appid, string appkey | Initialize the SDK. The appId and appKey need to be obtained after creating an app in the Taku dashboard. How to get App Key? |
| setLogDebug | bool isDebug | Whether to enable SDK Debug log. Strongly recommended to enable during the testing phase for easier troubleshooting |
| setChannel | string channel | Set channel information for distinguishing ad data in the Taku dashboard. Only characters matching the rule are allowed: A-Za-z0-9\_ Note: If using the initCustomMap() method, this method must be called after initCustomMap() |
| setSubChannel | string subChannel | Set sub-channel information. Only characters matching the rule are allowed: A-Za-z0-9\_ Note: If using the initCustomMap() method, this method must be called after initCustomMap() |
| initCustomMap | Dictionary | Custom key-value pairs, used at the App level to match the ad list delivered by the backend. App-level custom rules are global settings and apply to all Placements. Developers can set corresponding custom rules in the traffic groups section of the Taku dashboard. See Traffic Group Usage Instructions for details. Note: Calling this method will clear the settings made by setChannel() and setSubChannel(). If you have set these, please re-set them after calling this method |
| setCustomDataForPlacementID | Dictionary | Custom key-value pairs, used at the Placement level to match the ad list delivered by the backend. Effective only for the current Placement. You can add Placement-specific custom rules on top of the App-level custom rules. Developers can set corresponding custom rules in the traffic groups section of the Taku dashboard. See Traffic Group Usage Instructions for details. |
| getUserLocation | ATGetUserLocationListener listener | Determine whether the current network is in the EU region |
| getGDPRLevel | - | Get the reporting level of the current privacy data |
| showGDPRAuth | - | Show the GDPR authorization page. Note: Deprecated starting from v6.2.87, please use showGDPRConsentDialog instead |
| showGDPRConsentDialog | (Added in v6.2.87) Show the Google UMP GDPR consent dialog |
Your App needs to establish a Privacy Policy, and display the Privacy Policy and obtain user consent when the user launches the App for the first time. For the App's Privacy Policy, please refer to the Privacy Compliance Guide. Be sure to initialize the Taku SDK only after the user has agreed to the App's Privacy Policy.
You can initialize AnyThinkSDK using the following code. See the demo project for details:
// (Optional) Set custom Map information, which can match the ad provider order list configured in the dashboard (App level)
// Note: Calling this method will clear the settings made by setChannel() and setSubChannel(). If you have set these, please re-set them after calling this method
ATSDKAPI.initCustomMap(new Dictionary { { "unity3d_data", "test_data" } });
// (Optional) Set custom Map information, which can match the ad provider order list configured in the dashboard (Placement level)
ATSDKAPI.setCustomDataForPlacementID(new Dictionary { { "unity3d_data_pl", "test_data_pl" } } ,placementId);
// (Optional) Set channel information. Developers can use this channel information in the dashboard to distinguish ad data for each channel
// Note: If using the initCustomMap() method, this method must be called after initCustomMap()
ATSDKAPI.setChannel("unity3d_test_channel");
// (Optional) Set sub-channel information. Developers can use this channel information in the dashboard to distinguish sub-channel ad data for each channel
// Note: If using the initCustomMap() method, this method must be called after initCustomMap()
ATSDKAPI.setSubChannel("unity3d_test_subchannel");
// Enable Debug log (strongly recommended to enable during the testing phase for easier troubleshooting)
ATSDKAPI.setLogDebug(true);
// (Required) SDK Initialization
ATSDKAPI.initSDK("a5c4ad280995c9", "7b4e37f819dbee652ef79c4506e14288");//Use your own app_id & app_key here
After Initialization is complete, you can start integrating each ad format:
Rewarded Video Ad Integration
Interstitial Ad Integration
Banner Ad Integration
Native Ad Integration
Splash Ad Integration