Type Function Return value none Revision 2017.3060 Keywords ads, advertising, KIDOZ, show See also kidoz.load() kidoz.hide() kidoz.*
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"
or "feedView"
ad, only the initial UI handle or button will be shown by default. From this point, the user can slide/tap the handle/button to reveal the ad view. However, both of these ad types can be configured without any UI element for the user to manipulate — in this case, kidoz.show()
will fully reveal the ad view.
kidoz.show( adType )
String. The ad type to show. Valid values include "panelView"
, "feedView"
, "flexiView"
, "interstitial"
and "rewardedVideo"
.
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 kidoz.show( "panelView" ) end end -- Initialize the KIDOZ plugin kidoz.init( adListener, { publisherID="YOUR_PUBLISHER_ID", securityToken="YOUR_SECURITY_TOKEN" } )