Admob Shows Test Ads But Not Real Ads

Admob shows Test ads but not real ads

When apps are newly registered with AdMob, it takes some time and a few ads requests to allow inventory to build. Because of this, you may not see live impressions immediately. Once your app starts making more requests, you should see more consistent results. Please note that test ads operate through the same channels as live ads. Being able to return a test ad ensures that your application is communicating properly with our network. Be patience it will work after some days.

AdMob shows only test ads and not real

Until you publish your app on play store, real ads will not be visible to you. And after releasing on play store also, it takes 5-6 hours to load real ads. So you can release your app on internal, alpha or beta channel to make real ads visible. One more important thing is that if your test ads are visible that means you have done the coding right because test ads also use the same channel as the real ones.

How to confirm if my AdMob is using test ads (not real ads)?

In a nutshell, if you have used the correct Ad unit ids provided by Admob and the ad loads successfully, you will see an ad that that itself says that it is a test ad.

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.

So, if you use the provided test admob id, you should be loading test ads.

OR

Use your own ad unit and enable test devices. You can configure your device as a test device and use your own ad unit IDs that you've created in the AdMob UI.

Quote source

If you are initializing test ads, then you need to initialize them with test unit ids.

MobileAds.initialize(context, context.getString(R.string.admob_test_unit))

Where R.string.admob_test_unit is the test unit id.

AdMob shows only test ads

Update. My app which was also showing the test ads only, I did two things:

  1. Set up the ad-apps.txt in Admob
  2. After my app got "reviewed" and "published" in Play store, the app started showing live-ads.
    Until the time it was in "being reviewed", it used to show test-ads.

Admob show Test ads but not real ads

For those who viewed the question.

There are something wrong with this line

mInterstitialAd.setAdUnitId(String.valueOf(R.string.ad_interstitial_id));

When substituting the id with actual string.

mInterstitialAd.setAdUnitId("ca-app-pub-3940256099942544/6300978111");

The ads now work.

PS: The ads unit id used in this answer is a sample.

Feel free to discuss what is wrong with that line. Lol. I always found them interesting, where a code was usable 1 month ago, now cannot be used due to some update on google.



Related Topics



Leave a reply



Submit