Skip to content

Video Ads

This module implements interstitial and rewarded video ads. Read the JOGOS_SDK Introduction page for the section related to your game engine and use the video ad features as follows:

javascript
window.JOGOS_SDK.ad;
Ad Requirements

Please be sure to read our Ad Requirements, as failure to comply will result in your game being rejected without feedback.

Request Video Ad Playback

We support two types of video ads: interstitial (midgame) and rewarded (rewarded):

  • Interstitial ads: Triggered on events such as player death or level completion.
  • Rewarded ads: User-initiated views that grant rewards (extra lives, revival, items, buffs, etc.).
javascript
// callback functions
const callbacks = {
  // Called when the ad starts
  onstarted: () => console.log('ad started'),
  // Called when the ad finishes
  onfinished: () => console.log('ad finished'),
  // Called when an ad error occurs
  onerror: (error) => console.log('ad error:', error),
};

// Request interstitial ad
window.JOGOS_SDK.ad.requestAd('midgame', callbacks);
// Request rewarded ad
window.JOGOS_SDK.ad.requestAd('rewarded', callbacks);

Usage Notes

  • Interstitial ads have a minimum refresh interval (usually 60 s). Frequent calls raise:
    500 At least a ${time} second interval is required to display new advertisements.
  • Rewarded ads are capped per user per day (commonly 50). Exceeding the limit raises:
    500 You can only watch up to ${max} rewarded ads per day.

We recommend implementing cooldowns or daily limits for rewarded placements. You can also query the remaining cap to decide whether to hide the button:

javascript
const result = await window.JOGOS_SDK.ad.getRewardAdCount();
console.log('Remaining rewardAd count ', result);

Ad-Block Detection

Ad Requirements
Our games are designed to remain playable when an ad blocker is detected. Because detection may yield false positives, apply only mild restrictions (e.g., lock premium skins or bonus levels) and ensure full functionality is restored after the user disables the blocker and refreshes the page.

Check for ad blockers with:

javascript
const result = await window.JOGOS_SDK.ad.hasAdblock();
console.log('Adblock usage fetched', result);