Shared Configurations
This page gives you an overview of configurations that you can apply to all ad formats
Parameter Configuration Details
Below you'll find a list of parameters that can be used for all Ogury Ad formats. There might be differences depending on the used integration type. Note that prebid integration will require camel case notation whereas all other integration types will use snake case notations. All parameters are case sensitive.
ad_unit_id
asset_key
passback
abort_tag_execution
on_ad_show
on_ad_complete
on_position_change
on_no_ad
on_error
Supported Custom Events
Example Configurations
To help you understand and using certain configurations you'll find several examples in the following paragraphs. The examples will use tag based connotation.
How to use Callbacks
Callbacks provide a way to handle different Ad Response situations such as no ad available.
To use the callbacks, you'll need to create the JavaScript Functions that are supposed to be called for the different statuses first. Afterwards you can pass them as values for on_ad_show
, on_no_ad
, on_ad_complete
, on_error
or all together, and they'll be executed for the particular event:
on_ad_show
: the function that is set for this parameter will be triggered when an ad has started to be shown by the Ogury Tag.on_position_change: the function that is set for this parameter will be triggered when an ad has switched from a positionState to another. The positionState value is sent back in the callback.
Possible values for positionState: 'EXPANDED', 'STUCK_MINIMIZED', 'MINIMIZED', 'DEFAULT'.
on_no_ad
: the function that is set for this parameter will be triggered when the Ogury Tag has no ads to serve.on_ad_complete
: the function that is set for this parameter will be triggered when the ad is closed. This happens:if the user clicks on the ad
if the user clicks on the closing button
if the ad is closed automatically after a predefined timeout.
on_error
: the function that is set for this parameter will be triggered when there is an error preventing the ad delivery (unsupported environment, user consent conditions, network errors, rendering errors ...).
The JavaScript Functions have to be defined before you initialize the Ogury Tag.
Integration Example - Tag Based
Callback Arguments
For on_ad_show
and on_position_change
, a positionState String value will be returned as argument of these functions.
When calling the functions configured for on_ad_show
, on_no_ad
, on_ad_complete
and on_error
an Ad Unit JavaScript Object will be returned as argument of these functions.
Ad Unit Object - Tag Based:
Note that some parameters are optional (defined with ?
) and may not be available if they are not configured for the Ogury Tag.
For on_ad_show and on_ad_complete,
an adResponseContext
argument provides more details on the shown ad.
adResponseContext Object:
Note that callbacks can be also added in passback configuration (see below)
Stopping the tag execution
In some scenarios you might need to stop the tag execution and stop the ad request, for instance when handling mobile vs. desktop traffic or when certain elements such as other video players are present on the page.
Example
Passback configuration
It is possible to implement a client side waterfall using the passback configuration. Particularly, you may setup a Passback Object configuration to chain ad requests for distinct ad units.
A typical usage is to target an ad unit with a higher price and another one with a lower price afterwards. A waterfall involving these ad units allows to optimize your monetization and your fill rate.
When the first ad unit will have nothing to serve or fires an error, the tag will check if a passback ad unit has been configured. If yes, the tag will request an ad for the passback ad unit that has been configured.
Passback Object
Note that only ad_unit_id field is mandatory, all others params will be by default inherited from initial ad unit configuration if they are not redefined in passback object.
Ad unit object containing passback configuration:
Complete Example - Tag Based:
You need to replace $OGURY_AD_UNIT_PASSBACK
by the value you received during the configuration in the platform.
The passback ad unit configuration will have by default, inherited configuration of the initial ad unit. It is possible to override it with a new configuration
If you already have a video unit in place, ask your Publisher Manager to create a second Ad Unit or do so by yourself in the Publisher Cloud. Update your existing tag with passback configuration for the new ad unit.
If you don't use the Thumbnail yet, ask your Publisher Manager to create the necessary Assets and Ad Units, insert them into the tag above and integrate it in your website.
Managing overlaps
You may have elements in your web page that need to be temporarily displayed above the Footer Ad in order to allow interactions with the users (i.e, menus, modals ...). In that case you should trigger custom Javascript events that would bring the Footer Ad to background and then to foreground again.
Example
Let's consider the case where you have a page menu identified by burger-menu-id
. You should include code similar to the following in your menu handling function in order to send the Footer Ad to the background.
Afterwards, you should bring the Footer Ad back to foreground as follows:
If the Footer Ad creative is a video, it will stop playing on ogy_hide
event and resumed on ogy_show
.
Please make sure you properly use the events described above as they may impact the viewability and the performance of the ads on your web pages.
Last updated