Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

For Unity, choose Google’s sample test ad unit ID that matches both your platform and ad format. The table below lists the Android and iOS IDs; the Ad Inspector errors ERROR_CODE_NOT_IN_TEST_MODE (2) and ERROR_CODE_ALREADY_OPEN (3) explain why the inspector may not open.

Unity test ad unit IDs by platform and format

Use the Android ID for an Android build and the iOS ID for an iOS build. Select the row matching the ad format you request.

Ad format Android test ad unit ID iOS test ad unit ID
App open ca-app-pub-3940256099942544/9257395921 ca-app-pub-3940256099942544/5575463023
Fixed-size banner ca-app-pub-3940256099942544/6300978111 ca-app-pub-3940256099942544/2934735716
Anchored adaptive banner ca-app-pub-3940256099942544/9214589741 ca-app-pub-3940256099942544/2435281174
Interstitial ca-app-pub-3940256099942544/1033173712 ca-app-pub-3940256099942544/4411468910
Rewarded ca-app-pub-3940256099942544/5224354917 ca-app-pub-3940256099942544/1712485313
Rewarded interstitial ca-app-pub-3940256099942544/5354046379 ca-app-pub-3940256099942544/6978759866
Native ca-app-pub-3940256099942544/2247696110 ca-app-pub-3940256099942544/3986624511

These are Google sample ad unit IDs, not IDs associated with your AdMob account. Google notes that its sample units show Google Ads only, and says to replace them with your own ad unit IDs before publishing. Google’s Unity test ads guide includes the current sample IDs and setup details.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test ad unit ID versus test device ID

A test ad unit ID selects a sample placement for a platform and format. A test device ID instead identifies a device allowed to receive test ads while your app uses your own ad unit. They are different settings and are not interchangeable.

Android emulators and iOS simulators are automatically treated as test devices. For other devices, configure the device for test ads. Google says a newly configured test device typically begins receiving test ads within 15 minutes, though setup can take up to 24 hours. Google’s test ad instructions explain device configuration.

What Ad Inspector error codes 2 and 3 mean

These are Ad Inspector errors, not general ad-load error codes. The pair is useful when diagnosing why the inspector will not open:

  • Code 2 — ERROR_CODE_NOT_IN_TEST_MODE: the device is not in test mode, so Ad Inspector cannot be opened.
  • Code 3 — ERROR_CODE_ALREADY_OPEN: Ad Inspector is already open, so another open request cannot succeed.

Google also lists error 0 for an internal error and error 1 for a failed-to-load condition. See Google’s Ad Inspector error reference for the definitions.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Diagnose an ad-load failure separately

An unsuccessful ad request is reported through the failure callback as a LoadAdError. Log the error’s domain, integer code, message, cause if present, and response information. The domain helps distinguish Google Mobile Ads SDK errors from mediation-network errors; Google advises using the message and response details to investigate the cause. The Unity API describes GetDomain() as returning MobileAds for Google SDK errors or a domain defined by a mediation network. See Google’s ad load error guide and the Unity AdError API reference.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Testing mediation and using Ad Inspector

Google sample ad units show Google Ads only. To test mediated ads, use test devices and configure test settings for the relevant mediation networks. Mediated ads do not display the “Test Ad” label, so that label’s absence alone does not show that an ad is live. Google says test ads can be clicked safely; their requests, impressions, and clicks do not appear in account reports. Google’s test ads documentation covers these behaviors.

Ad Inspector supports in-context and out-of-context testing. Google recommends in-context testing for full parameter support. Out-of-context requests do not include some app UI parameters, including child-directed treatment configuration, custom targeting, network extras, and different ad sizes. For single-ad-source testing, the setting applies to future requests; cached ads may remain, so Google recommends restarting the app after changing the test source. Details are in Google’s Ad Inspector testing guide.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.