For the complete documentation index, see llms.txt. This page is also available as Markdown.

AdMob

You'll need to import the javascript file in your website before starting from this link.

const {
    bannerAd,
    fullScreenAd,
    rewardsAd,
} = WTN.AdMob;

bannerAd({
  adId:"ca-app-pub-3940256099942544/6300978111"
})

fullScreenAd({
  adId:"ca-app-pub-3940256099942544/1033173712",
  fullScreenAdCallback: (value) => {
    console.log(value)
  }
})

rewardsAd({
  adId:"ca-app-pub-3940256099942544/5224354917",
  rewardsAdCallback: (value) => {
    console.log(value)
  }
})


/** Example for fullScreenAd
  fullScreenAd({
    adId:"ca-app-pub-3940256099942544/1033173712",
    fullScreenAdCallback: (value) => {
      console.log(value);
      try{
        let response = JSON.parse(value);
        let status = response.status;
        let error = response.error;
        let additionalData = response.additionalData;
        let rewardsData = response.rewardsData;
        // Your code to handle the values accordingly.
      }
      catch(e){
        console.log("JSON parse error : ",e);
      }
    }
  })
*/

bannerAd, fullScreenAd and rewardsAd can be called for displaying the particular ad.

  • fullScreenAdCallback and rewardsAdCallback - This callback function is called on successfully displaying the ad, when it is dismissed or in case of any error with values like status, error, additionalData and rewardsData.

  • status - Values for status will be

    • "success" - When ad is show successfully.

    • "adDismissed" - When ad is dismissed by user.

    • "adLoadFailure" - When ad could not be loaded.

    • "adError" - When ad could not be loaded on full screen.

    • "rewardSuccess" - When user completes the reward ad.

AdMob Ad Load Success/Failure Callback (Webtonative Configuration)

window.admobLoadCallback is called to report the success or failure of AdMob ads loaded via Webtonative configuration.

*Taken Live on 19/12/25

Last updated