Skip to content

Enabling test ads

Denis edited this page Jan 14, 2022 · 11 revisions

This guide explains how to enable test ads in your ads integration. It's important to enable test ads during development so that you can click on them without charging CAS advertisers.

⚠️ Warning: If you test with live traffic, some networks might flag this as fraudulent activity. You might also experience issues getting filled due to your waterfall configuration or the network’s targeting parameters. We strongly suggest that you test with live ads when you validate the integration.

There are two ways to get test ads:

Enable test ad mode

The quickest way to enable testing is to use test ad mode. The test ad mode are not associated with your CAS account, so there's no risk of your account generating invalid traffic when using these test ad mode.

⚠️ Key Point: Make sure you disable test ad mode and replace test manager ID with your own ad manager ID before publishing your app!

  1. In your Unity project, navigate to Assets > CleverAdsSolutions > Settings to create and modify default settings for each native platform.
  2. Enable Test Ad mode.
  3. Use any no empty Manager ID. For example demo or your CAS Manager ID.

image

Enable test devices

If you want to do more rigorous testing with production-looking ads, you can now configure your device as a test device and use your own manager id. Test devices can either be added programmatically.

Follow the steps below to add your device as a test device.

  1. Run an app configured with the CAS SDK.
  2. Check the console or logcat output for a message that looks like this:
To get test ads on this device, set "33BE2250B43518CCDA7DE426D04EE231"
  1. Copy your alphanumeric test device ID to your clipboard.
  2. Add the test device ID to the list and SetTestDeviceIds before initialize manager.
void Start(){
  var deviceIds = new List<string>();
  deviceIds.Add("2077ef9a63d2b398840261c8221a0c9b");
  CAS.MobileAds.settings.SetTestDeviceIds(deviceIds);
}
Clone this wiki locally