How to show an interstitial ad?

<span id="showAd">An interstitial ad</span>


<script>
var admobid = {}
if (/(android)/i.test(navigator.userAgent)) {  // for android & amazon-fireos
  admobid = {
   banner: '',
			interstitial: '',
  }
} else if (/(ipod|iphone|ipad)/i.test(navigator.userAgent)) {  // for ios
  admobid = {
   banner: '',
			interstitial: '',
  }
}
function initApp() {
  

  AdMob.createBanner( {
    adId: admobid.banner,
    isTesting: true, 
    autoShow: true
  } );

  
  AdMob.prepareInterstitial({
    adId: admobid.interstitial,
    isTesting: true, 
    autoShow: false,
  });
}

if(( /(ipad|iphone|ipod|android|windows phone)/i.test(navigator.userAgent) )) {
    document.addEventListener('deviceready', initApp, false);
} else {
    initApp();
}
</script>

How I can show an interstitial ad on clicking “showAd”?

What plugin are you using for ads?

cordova-plugin-admobpro

There are instructions on how to show interstitial ads here: cordova-plugin-admobpro - npm

Have you tried using prepareInterstitial and then showInterstitial as the example shows?

You should check out https://admob-plus.github.io/ instead.