This article contains information on how to configure popups and some examples of code. Besides, we explore various options you may want to use while running popup campaigns. Finally, we give our advice on how and when to use these options.

In order to configure the code you have to add options as shown below:

<script>
var _aso=_aso||{}; 
_aso.queue=_aso.queue||[]; 
_aso.queue.push(function () {
    _ASO.PuOptions = {
        idzone: XXXXX,
        //options here
    };
    _ASO.loadPuHelper(); 
});
</script>
<script data-cfasync="false" async="async" type="text/javascript" src="https://media.aso1.net/js/code.min.js"></script>

Available options for popup code

mode

Our ad server supports several popup modes, so you can use any of them (keep limitations in mind).

The list of supported popup modes:

  1. TabUnder
  2. TabUp (default)
  3. PopUp
  4. PopUnder 

Please note that modes 3 and 4 may not work properly in some browsers, i.e. Google Chrome. If a browser doesn't support a mode then an ad will be opened as a TabUnder. We have a special fallback mode for Google Chrome that can be enabled by adding "chromeFallback: true" to the options.

_ASO.PuOptions = {
    idzone: XXXXX,
    mode: 1
};

bindTo

This option is used to bind pops to some specific tag names or classes. The value is an array of strings.

Use case: if you'd like trigger ads only when users click on images rather than on any blank space (one of the recommendations for non-abusive popunders).

Example:

_ASO.PuOptions = {
    idzone: XXXXX,
    bindTo: ['a', 'img', '.content-area']
};

ignoreTo

It acts similar to bindTo, but is used to restrict the popup script to open when users click on ignored elements/ DOM nodes. The value is an array of strings.

Use case: you may not want to trigger ads on navigation or control elements, so you can use this option to disable that. For example, play button on a video player or top navigation menu. And that might be a good idea since this is one of the recommendations for non-abusive pops.

Example:

_ASO.PuOptions = {
    idzone: XXXXX,
    ignoreTo: ['.igmoreMe', '.playButton', '.mainMenu']
};

cappingInterval (in seconds)

By using this option you can define impressions capping at the browser's side (client-based capping).

Default value is 30 sec. Minimal possible value is 15 sec.

In example bellow, the popup will be opened as often as 1 time per an hour:

_ASO.PuOptions = {     
    idzone: XXXXX,     
    cappingInterval: 3600 
};

ifChrome

Since Google Chrome browser is the most sensitive to popups ad format, we added a special option in order to easier configure Chrome-specific options.

The value of this option should be either false (if you need to completely disable popups in Chrome) or callback function where you can specify Chrome related options.

Popups disabled in Chrome:

_ASO.PuOptions = {
    idzone: XXXXX,
    ifChrome: false
};

Special config for Chrome:

_ASO.PuOptions = {
    idzone: XXXXX,
    ifChrome: function(opts) {
        opts.bindTo = ['.content-block'];
    }
};

IfMobile

It's good practice to have a special configuration for mobile devices. To make it easier we added this option.

The value of this option should be either false (if you need to completely disable popups on mobiles) or callback function where you can specify mobile related options.

Popups disabled on mobile devices:

_ASO.PuOptions = {
    idzone: XXXXX,
    ifMobile: false
};

Special config for mobile devices:

_ASO.PuOptions = {
    idzone: XXXXX,
    ifMobile: function(opts) {
        opts.ignoreTo = ['.play-button'];
    }
};

How to configure popups – full code examples

1. In order to comply with Google policies, you should not trigger pops on every site's element. Instead, you have to trigger them in the content area only (navigation, menus must not trigger pops).

<script>
var _aso=_aso||{}; 
_aso.queue=_aso.queue||[]; 
_aso.queue.push(function () {
    _ASO.PuOptions = {
        idzone: XXXXX,
        ifChrome: function(opts) {
            opts.bindTo = ['.content-area-class'];
        }
    }
    _ASO.loadPuHelper();
});
</script>
<script data-cfasync="false" async="async" type="text/javascript" src="https://media.aso1.net/js/code.min.js"></script>

2. In order to change popups behavior on mobile video sites, you may need to exclude the play button (or the entire player) from elements that trigger pops.

<script>
var _aso=_aso||{}; 
_aso.queue=_aso.queue||[]; 
_aso.queue.push(function () {
    _ASO.PuOptions = {
        idzone: XXXXX,
        ifMobile: function(opts) {
            opts.ignoreTo = ['.player', '.play-button'];
        }
    }
    _ASO.loadPuHelper();
});
</script>
<script data-cfasync="false" async="async" type="text/javascript" src="https://media.aso1.net/js/code.min.js"></script>

We hope this article will help you to configure popups easily and, more importantly, according to your needs. Running pop ads may be a tough task, so we wish the best of luck with that.