Triggers deprecated

In order to manage the banner spaces properly, the following configurable triggers are available within the UI.

Reload timer

After the timer has counted down the configured time, the next banner will be loaded and inserted into the respective banner space.

Cool down timer

The cool down timer defines the timeframe that lapses before a banner is replaced for each pre-defined banner space. Each time a reload timer is executed, the cool down timer is reset and starts counting down. This timer is also used to freeze the reload timer when the mouse is inactive.

To use those timers, a new instance of the Cooldown util class is needed:

var config = loadConfig(); // the current list of configured ads
var Cooldown = require('io.ox/ads/util').Cooldown;
var cooldown = new Cooldown(config);

The instance can then be used like this:

ext.point('io.ox/ads/leaderboard').extend({
    reload: function (baton) {
        cooldown.touch(baton.data.id).then(function () {
            // do the refresh, only called if space is "cool"
        }, function () {
            // ad space is too hot, did not refresh, but may be collect some metrics?
        });
    }
});

// reset cooldown timer for third banner in configuration
var id = 2;
cooldown.reset(id);

// reset all cooldown timers
cooldown.reset();

Triggered by user

Individual events to execute custom JavaScript code in order to reload, hide or show the respective banner space:

Trigger Description Desktop Mobile
Modulechange A user changes to another module within OX App Suite Supported Supported
Sent an email A user successfully sent an email Supported Supported
Logout A user successfully logged out from OX App Suite Supported Supported
Mouseover A user interacts with the mouse inside the OX App Suite UI Supported Supported