Skip to main content
Version: 1.x

Enabling Test Ads

It is important to use test ads during development so that you can click on them without charging Google advertisers. If you click on too many ads without being in test mode, you risk your account being flagged for invalid activity.

Use the Google provided demo ad units

The quickest way to enable testing is to use Google-provided test ad units.

These ad units are not associated with your AdMob account, so there's no risk of your account generating invalid traffic when using these ad units.

Ad FormatDemo Ad Unit ID (Android)Demo Ad Unit ID (iOS)
App Openca-app-pub-3940256099942544/3419835294ca-app-pub-3940256099942544/5662855259
Bannerca-app-pub-3940256099942544/6300978111ca-app-pub-3940256099942544/2934735716
Interstitialca-app-pub-3940256099942544/1033173712ca-app-pub-3940256099942544/4411468910
Interstitial Videoca-app-pub-3940256099942544/8691691433ca-app-pub-3940256099942544/5135589807
Rewardedca-app-pub-3940256099942544/5224354917ca-app-pub-3940256099942544/1712485313
Rewarded Interstitialca-app-pub-3940256099942544/5354046379ca-app-pub-3940256099942544/6978759866
Native Advancedca-app-pub-3940256099942544/2247696110ca-app-pub-3940256099942544/3986624511
Native Advanced Videoca-app-pub-3940256099942544/1044960115ca-app-pub-3940256099942544/2521693316

*) Please note that not all formats are (yet) supported by this plug-in and don't forget to use your own ID when in production.

tip

Run npx admob-plus test-ids will print the above table.

Add your test device programmatically

  1. Load your ads-integrated app and make an ad request.
  2. Copy your test device ID from console / logcat output to your clipboard.
  3. Modify your code to call admob.configRequest({testDeviceIds}) and pass in a list of your test device IDs.
admob.configRequest({
testDeviceIds: ['33BE2250B43518CCDA7DE426D04EE231'],
})
  1. Re-run your app. If the ad is a Google ad, you'll see a Test Ad label centered at the top of the ad.

Ads with this Test Ad label are safe to click. Requests, impressions, and clicks on test ads will not show up in your account's reports.

Android emulators / iOS simulators are automatically configured as test devices.

References