In-Article Ad
Direct Integration of the In-Article format into the publisher's web pages
Last updated
Direct Integration of the In-Article format into the publisher's web pages
Last updated
For all the pages where you want to display an Ogury ad, copy one of the following snippets on the placement of your choice inside the page's body.
If you can't or don't want to create the tags by yourself, Ogury can provide a so called Ad Tag. This means that all configuration is done in the Ogury Interface and you don't need to worry about anything. A custom code would look like the tag below and you can use it like any other ad tag:
CC-SOME-ID
corresponds to a unique custom code id that Ogury creates for you and will be automatically replaced for you when providing the Ad Tag
Below you'll find a list of parameters for the In-Article Ad format, that can be used to customize the rendering of the ad. Those parameters have to be defined in the params
object.
It is possible to show the In-Article Ad inside a predefined ad slot in your page for initial positioning.
You can enable embedding inside an ad slot by using the ad_slot_selector
parameter. It is based on the javascript querySelector
method and has to be filled with the HTML element identifier of an ad slot in your page. For example, if your ad slot is defined by:
Then, the configuration snippet should contain:
Alternatively you can work with class names, but make sure that they are unique throughout the page:
You can also chain class names by connecting them with dots:
When an in-article ad is finished, the ad slot is restored to its initial position.
If you are not specifying an ad slot selector, the In-Article will be inserted at the same level of the frame where our script is executed.
Example:
In this example, the In-Article Ad will be inserted into the div slot-1
. This is the first parent div where the script is executed.
For direct integration, if you don't want to specify an adSlotSelector, you should put the script into the div where you want to display the In-Article Ad.
Example:
By default, the In-Article Ad will be compatible with all formats (300x250, landscape and reveal)
Reveal
300x250
Landscape
Description
HTML Identifier that allows the In-Article Ad to render in a predefined HTML container
Prebid.js Notation
adSlotSelector
Required
no
Type
String
Example Value
'#in-article-slot-1'
Description
Defines where the ad should be rendered in relation to the given ad slot. Position can be before, after or inside the defined ad slot element. It will be ignored if ad_slot_selector is undefined.
Prebid.js Notation
adSlotSelectorPosition
Required
no
Type
String
Default Value
'CHILD'
Example Value
'CHILD | PREVIOUS | NEXT'
Description
Only the first element is taking into consideration for the moment. It's to declare the header of the website to adjust the size and position of the reveal format.
Prebid.js Notation
fixedElements
Required
no
Type
Array<String>
Example Value
['#header']