addEventListener(event_type, callback)

Mtx events

This method can be used to listen for events related to the incentivized advertising API

The addEventListener method takes two arguments, the event type, and a callback function:

NameTypeDescription
event_typeStringType of event to listen for
callbackFunctionFunction to call when the event is triggered

Incentivized ad events

The following event types are currently supported:

NameDescription
adsAvailableAds are now available, and showIncentivizedAd will work
adsUnavailableAds are not available, and showIncentivizedAd will fail
adOpenedAn ad is being displayed
adCompletedAn ad has completed successfully, and the player should be rewarded
adAbandonedAd ad has been closed before completion, the player should not be rewarded

Related: