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


Shows a KIDOZ ad which was previously loaded via kidoz.load().


This call does not necessarily reveal the actual ad view. For example, if you load a "panelView" ad, only the initial UI handle will be shown by default. From this point, the user can tap the handle to reveal the ad view. However, the panel view can be configured without any UI element for the user to manipulate — in this case, will fully reveal the ad view.

Syntax adType )
adType (required)

String. The ad type to show. Valid values include "panelView", "interstitial", "rewardedVideo", and "banner".


local kidoz = require( "plugin.kidoz" )

local function adListener( event )

    if ( event.phase == "init" ) then  -- Successful initialization
        print( event.provider )
        -- Load a KIDOZ panel view ad
        kidoz.load( "panelView", { adPosition="bottom" } )

    elseif ( event.phase == "loaded" ) then  -- The ad was successfully loaded
        print( event.type )
        -- Show the ad "panelView" )

-- Initialize the KIDOZ plugin
kidoz.init( adListener, { publisherID="YOUR_PUBLISHER_ID", securityToken="YOUR_SECURITY_TOKEN" } )