Incentivized Ads

Add rewarded video advertisements to your game

❗️

Note

Our Incentivized Ads API has proven to be popular, and unfortunately even a bit too popular - the supply of web ads has not been able to keep up with demand and our ad networks have made it clear that inventory is unlikely to increase in the near future. As a result, we are suspending adding any new games to the program. We strongly recommend that you design your game without relying on our Ads API as a revenue source.

Kongregate Advertising API

Kongregate's Advertising API allows you to request and display video ads on demand. The ads should be incentivized with in-game rewards, which can increase both engagement and revenue. Note that these are not "interstitial" ads the a player is required to view, but instead should only show when a player requests one.

The Advertising API is available via the JavaScript interfaces.

Overview

The advertising API can be accessed via the mtx object on the Kongregate API. Once initialized, events will be generated to notify your application about the availability of advertisements, the state of any ad being displayed, and whether or not in-game rewards should be given.

Initializing

Once your game is ready to display ads, you can set up your event listeners for various events and then call initializeIncentivizedAds. The initializeIncentivizedAds function only needs to be called once.

Displaying Incentivized Ads

Once you have received the adsAvailable notification, you can call showIncentivizedAd to request an incentivized ad. If an ad is successfully displayed, you will receive an adOpened event, at which point you should pause gameplay and mute sound until either adCompleted or adAbandoned is received. Subsequent calls to showIncentivizedAd should succeed until the adsUnavailable event is fired.

Example Initializing incentivized ads and listening for events:

kongregate.mtx.addEventListener("adsAvailable", function() {
  // Ads are now available, and kongregate.mtx.showIncentivizedAd() will work
});

kongregate.mtx.addEventListener("adsUnavailable", function() {
  // Ads are no longer available, kongregate.mtx.showIncentivizedAd() will fail
});

kongregate.mtx.addEventListener("adOpened", function() {
  // An ad is being displayed
});

kongregate.mtx.addEventListener("adCompleted", function() {
  // An ad has completed successfully, and the player should be rewarded
});

kongregate.mtx.addEventListener("adAbandoned", function() {
  // Ad ad has been closed before completion, the player should not be rewarded
});

kongregate.mtx.initializeIncentivizedAds();

Related: