In this article:
- Ads in test mode
- Use test devices with AdMob Mediation
- Add a test device
- Edit a test device
- Remove a test device
- Find your advertising ID/IDFA
Setting up a test device lets you safely test production ads and verify your implementation code without violating AdMob’s invalid traffic policy.
When you configure your Android or iOS device as a test device, the AdMob Network sends production ads in test mode to your device using the ad unit IDs you've created in your AdMob account.
Ads in test mode
Ads served by the AdMob Network will display a label that lets you know you’re in test mode. Look for the test mode label before clicking on an ad. Clicking on production ads can result in a policy violation for invalid traffic. Learn more about using mediation and test devices.
Click to view example ads in test mode
Example interstitial ad in test mode:
Example banner ad in test mode:
Example native ad in test mode:
Use test devices with AdMob Mediation
If you’re using AdMob Mediation, test mode applies to ads served from the AdMob Network only and does not apply to ads served by other networks.
Be sure that you've instructed your third-party ad source will serve ads in test mode. If you click on live ads served from a third-party ad source, you may receive a policy violation.
Testing instructions for third-party ad sources are available on Google Developer for Android, iOS, and Unity.
Add a test device
- Sign in to your AdMob account at https://apps.admob.com.
- Click Settings in the sidebar.
- Click the Test devices tab.
- Click Add test device.
Note: The maximum number of test devices you can add is 250.
- Enter a device name. Consider using a name that will help you quickly identify your devices in your AdMob account.
Note: The device name will be visible to anyone who has access to your AdMob account.
- Select the platform of your device.
- Enter your Advertising ID/IDFA. Learn how to find your advertising ID/IDFA.
- Select a gesture to use to activate ad inspector:
- None. If you select none, you can still activate ad inspector with an API call. Learn more about Ad inspector.
- Shake
- Flick twice
- Click Save.
You can also add a test device in your app programmatically using the Mobile Ads SDK request configuration. Review the instructions on Google Developer for Android, iOS, and Unity.
Edit a test device
- Sign in to your AdMob account at https://apps.admob.com.
- Click Settings in the sidebar.
- Click the Test devices tab.
- Click the name of the test device you want to edit.
- You can change the device name. Try to use a name that will help you quickly identify your devices in your AdMob account.
Note: The device name will be visible to anyone who has access to your AdMob account
- Change the gesture you want to use to activate ad inspector. Learn more about Ad inspector.
- Click Save & Close.
Remove a test device
Removing a test device means that the AdMob Network will start serving live ads to the device. Note that clicking on live ads can result in a policy violation for invalid traffic.
- Sign in to your AdMob account at https://apps.admob.com.
- Click Settings in the sidebar.
- Click the Test devices tab.
- Select the device you want to remove.
- Click Remove.
- Click Remove in the confirmation dialog.
Find your advertising ID/IDFA
There are several ways to find an ID to use in your AdMob account to configure your device as a test device. Note that Android devices use the advertising ID and iOS devices use the IDFA.
Android
On Android devices, you can find your advertising ID in your device settings. Navigate to Settings, click Google, and then Ads:
You can also find the advertising ID programmatically. Learn how to get a user-resettable advertising ID.
iOS
Currently, Apple does not surface the IDFA by default on iOS devices. However, it can be retrieved using third-party apps. Check the App Store for apps that can retrieve your advertising ID, or find your IDFA programmatically.