kidoz.load()

Type Function
Return value none
Revision 2017.3060
Keywords ads, advertising, KIDOZ, load
See also kidoz.show()
kidoz.*

Overview

Preloads a KIDOZ ad. Once loaded, You can call kidoz.show() to show it.

Syntax

kidoz.load( adType, options )
adType (required)

String. The ad type to load — see the following sections for details.

options (required)

Table. Options for the ad type — see the following sections for details.

Panel View

This is a special customized view which can slide in/out of the screen (both in horizontal and vertical layout) with minimal interference to the user experience. For this ad type, adType should be "panelView" and the options table accepts these key-value pairs:

adPosition (required)

String. The position of the panel. Valid values include "top" and "bottom".

handlePosition (optional)

String. The position of the handle. Valid values are "left", "right", "center", or "none". Default is "center". If handlePosition is set to "none", the user will not have a UI-based handle to slide the view in and out.

Feed View

This is a full-screen single ad unit. For this ad type, adType should be "feedView" and the options table should be omitted.

Flexi View

Note

This ad type is currently only supported on Android.

This is a small interactive view which hovers over the screen content. For this ad type, adType should be "flexiView" and the options table accepts these key-value pairs:

adPosition (required)

String. The position of the view. Valid values include "top", "bottom", "left", "right", and "center".

align (optional)

String. The alignment of the view. Only applies when adPosition is not set to "center".

  • For adPosition of "top", this can be either "left", "center", or "right". Default is "center".
  • For adPosition of "bottom", this can be either "left", "center", or "right". Default is "center".
  • For adPosition of "left", this can be either "top", "center", or "bottom". Default is "center".
  • For adPosition of "right", this can be either "top", "center", or "bottom". Default is "center".

Interstitial

This is a full-screen single ad unit. For this ad type, adType should be "interstitial" and the options table should be omitted.

Rewarded Video

This is a full-screen single ad unit. For this ad type, adType should be "rewardedVideo" and the options table should be omitted.

Examples

Panel View
kidoz.load( "panelView",
    {
        adPosition = "bottom",
        handlePosition = "left"
    }
)
Feed View
kidoz.load( "feedView" )
Flexi View
kidoz.load( "flexiView",
    {
        adPosition = "left",
        align = "top"
    }
)
Interstitial
kidoz.load( "interstitial" )
Rewarded Video
kidoz.load( "rewardedVideo" )