Skip to main content

MRAID compatibility

caution

This feature is experimental

Our SDK can be embedded in an MRAID creative.

Recommandations#

  • Place us in a full size interstitial (often refered to as 320×480)
  • If possible, let BeOp manage the ad close button (it'll appear on format completion, and if inactive after a timeout you can define, defaults to 10s)

With the ad-server managing the close button#

<script src="https://widget.beop.io/sdk.js" async></script>
<div
class="BeOpWidget"
data-expand
></div>
<script>
window.beOpAsyncInit = function () {
BeOpSDK.init({
account: "YOUR_ACCOUNT_ID",
});
BeOpSDK.watch();
};
</script>

With BeOp managing the close button#

warning

Close button management has been deprecated in MRAID v3

<script src="https://widget.beop.io/sdk.js" async></script>
<div
class="BeOpWidget"
data-expand
></div>
<script>
let ready = new Promise(function (resolve) {
if (mraid.getState() == "default") {
resolve();
} else {
mraid.addEventListener(mraid.EVENTS.READY, function() { resolve() });
}
});
ready.then(function () {
mraid.useCustomClose();
});
window.beOpAsyncInit = function () {
BeOpSDK.init({
account: "YOUR_ACCOUNT_ID",
});
BeOpSDK.onPressClose(function () {
ready.then(function () {
mraid.close();
});
}, 5000); // Your desired timeout for the button to appear
BeOpSDK.watch();
};
</script>