Skip to content

Testing

This page explains how to safely test AdMob integration during development.

It covers the difference between App IDs and Ad Unit IDs, Google's official sample App IDs and demo Ad Unit IDs, the recommended testing flow, consent and ATT testing, and the steps required before switching to production ads.

Test ads follow the same loading, display, callback, and reward flow as production ads, allowing you to verify the integration without generating production impressions or invalid traffic.

Important

Do not use or repeatedly interact with production ads during development.

Test impressions and clicks generated with your own production Ad Unit IDs may be treated as invalid traffic. This can affect ad serving and may lead to restrictions on your AdMob account.

Use Google's official demo Ad Unit IDs until you are preparing the final release build.


App ID and Ad Unit ID

AdMob uses two different types of identifiers:

  • App ID identifies the entire AdMob application and is configured in the plugin settings.
  • Ad Unit ID identifies a specific advertising placement, such as a banner, interstitial, or rewarded ad, and is passed to the corresponding Load function.

Android and iOS must be registered as separate applications in AdMob. Each platform has its own App ID and its own Ad Unit IDs.

For a production project, configure:

  • the Android App ID and Android Ad Unit IDs for Android builds;
  • the iOS App ID and iOS Ad Unit IDs for iOS builds.

Do not use identifiers created for one platform in a build for the other platform.


Official Sample App IDs

Normally, you should use the App IDs from your own Android and iOS applications registered in AdMob, as described in Getting Started.

If you skipped the application creation step and only need to perform a quick integration test, you can temporarily use Google's official sample AdMob App IDs.

Android

ca-app-pub-3940256099942544~3347511713

iOS

ca-app-pub-3940256099942544~1458002511

Enter the appropriate App ID in Project Settings > Plugins > PloxTools: Google AdMob for the platform being tested.

Important

Sample App IDs are intended only for development and integration testing.

Before publishing, replace them with the App IDs from your own Android and iOS applications registered in AdMob.

A sample App ID does not replace an Ad Unit ID. Use it together with the appropriate demo Ad Unit ID in the corresponding ad loading function.


Official Demo Ad Unit IDs

Google provides separate demo Ad Unit IDs for Android and iOS. Pass the appropriate ID to the corresponding Load function.

Android

Ad Format Demo Ad Unit ID
Banner ca-app-pub-3940256099942544/9214589741
Interstitial ca-app-pub-3940256099942544/1033173712
Rewarded ca-app-pub-3940256099942544/5224354917
Rewarded Interstitial ca-app-pub-3940256099942544/5354046379
App Open ca-app-pub-3940256099942544/9257395921

iOS

Ad Format Demo Ad Unit ID
Banner ca-app-pub-3940256099942544/2435281174
Interstitial ca-app-pub-3940256099942544/4411468910
Rewarded ca-app-pub-3940256099942544/1712485313
Rewarded Interstitial ca-app-pub-3940256099942544/6978759866
App Open ca-app-pub-3940256099942544/5575463023

Important

Demo Ad Unit IDs are platform-specific.

Do not use an Android demo Ad Unit ID in an iOS build or an iOS demo Ad Unit ID in an Android build.


Test every ad format used by your application:

  1. Configure the correct App ID for the current platform. Use your own AdMob App ID, or Google's sample App ID for a quick integration test.
  2. Initialize AdMob.
  3. Load the ad using the corresponding demo Ad Unit ID.
  4. Wait for the successful loading callback.
  5. Show the ad.
  6. Verify the callbacks used by the format.
  7. For rewarded formats, verify that rewards are granted only after the reward callback is received.

Do not call a Show function before the corresponding ad has loaded successfully.

Repeat the test separately on Android and iOS. A successful test on one platform does not verify the configuration or behavior of the other platform.


If your application uses UMP, test the consent flow separately from the basic ad loading flow.

Use Reset Consent State only during development when you need to repeat the first-time consent process.

Android and iOS are configured as separate applications in AdMob, so verify that the correct privacy messages are assigned and published for each platform.

On iOS, if ATT is enabled, also verify the IDFA explainer and the iOS system tracking permission dialog.

See Consent & Privacy for the complete setup.


Switching to Production

Before publishing the application:

  1. If you used an official sample App ID during testing, replace it with the App ID from your own AdMob application.
  2. Replace every demo Ad Unit ID with the corresponding production Ad Unit ID.
  3. Verify that every identifier belongs to the correct platform and ad format.
  4. Confirm that no official sample or demo identifiers remain in the release configuration.

Android and iOS require separate AdMob applications, App IDs, and Ad Unit IDs.