Ogury Prebid.js Adapter

The Ogury Prebid Adapter is a module connecting Prebid.js framework to Ogury's ad network. It enables you to request and render Ogury ads. This documentation provides integration guidelines.

Prerequisites

  • If your website will be trafficked in a country where GDPR applies, you must have implemented a consent management platform (CMP) which is compliant with TCF v2 and includes the Ogury vendor ID (31). The consentManagement Prebid.js module has also to be enabled so that the Ogury Prebid.js can access consent information.

  • Your website needs to be integrated and set up with Prebid.js. Please refer to the Prebid.js documentation for more details.

  • Desktop environment is not supported

Supported format

The Ogury Prebid.js Adapter currently supports In-Article, Thumbnail, Header Ad and Footer Ad formats.

Compatible Prebid.js modules

The Ogury Prebid.js adapter is currently compatible with the following Prebid.js modules

  • consentManagement: required to support the EU GDPR regulation

  • priceFloors: used to specify bid price floors. Note that prices need to be specified in USD or converted to USD.

Limitation

You cannot use a Prebid integration with a Direct Integration on the same page. Besides, we are not supporting multi placements on the same page, which means you should declare only one adUnit per page.

Adding the Ogury Prebid Adapter to your Prebid.js library

The Ogury Prebid Adapter needs to be included in the Prebid.js script you use for mobile web header bidding.

The Ogury Prebid Adapter is fully supported by the official Prebid.js since version 6.6.0 . This is the minimal version you should use. However, we recommend using the latest available version to benefit from functional and maintenance updates.

Download the latest version

You can download or build the latest version of Prebid.js with Ogury Prebid Adapter here: https://docs.prebid.org/download.html

You only need to include Ogury to your selected adapters to download a ready to use Prebid.js script.

Building prior versions

Although the officially supported Ogury Prebid Adapter is available since version 6.6.0 of Prebid.js, it is compatible with earlier 5.x and 4.x versions and can be used through a custom build from source code.

Assuming that you have a copy of the Prebid.js target version that you can build based on the official documentation:

  1. Go to your Prebid.js folder cd Prebid.js

  2. Download the latest Ogury Prebid Adapter files to the modules folder. You may do it using wget as follows:

    wget https://github.com/prebid/Prebid.js/raw/master/modules/oguryBidAdapter.md -O ./modules/oguryBidAdapter.md
    wget https://github.com/prebid/Prebid.js/raw/master/modules/oguryBidAdapter.js -O ./modules/oguryBidAdapter.js
    wget https://github.com/prebid/Prebid.js/raw/master/test/spec/modules/oguryBidAdapter_spec.js -O ./test/spec/modules/oguryBidAdapter_spec.js
  3. Build the Prebid.js library including the Ogury Prebid Adapter. You may use the gulp command for that:

    gulp build --modules=oguryBidAdapter,... //add here other modules you use for your website

A successful build generates a production ready prebid.js library in this folder: build/dist/prebid.js

Configure the Ogury Prebid Adapter

A typical Prebid.js ad unit configuration looks like the following:

    var adUnits = [
        {
            code: 'iframe-1',
            mediaTypes: {
                banner: {
                    sizes: [[1, 1]],
                }
            },
            bids: [
                {
                    bidder: "ogury",
                    params: {
                        adUnitId: '$OGURY_AD_UNIT',
                        assetKey: '$OGURY_ASSET_KEY'
                    }
                }
                // You may have other Prebid.js bidder adapters to configure here
            ]
        }
    ];

You need to replace $OGURY_AD_UNIT and $OGURY_ASSET_KEY by the values you received at Step 1 and Step 2.

If the code field (corresponding to 'iframe-1' in the example above) is the identifier of the div where the ad will be displayed, it will be used to close the div and avoid blank space.

In order to enable Thumbnail/Header Ad/Footer Ad, please make sure you use banner as media type. Concerning the sizes configuration, we can bid on any size but will return our own creative dimensions that can differ from the prebid configuration.

Thumbnail Ads will use by default a maximum of 180x180 pixels on the user's screen. This is the currently defined compromise between the readability of the content of the ad and the user experience. Additionally, this size maximizes the fill rate as it allows access to 16/9 and 4/3 for video and display.

Header Ad will have default position to 16/9 according to the viewport width of the user.

Footer Ad will have by default a 100% width size according to the viewport width of the user and 100px of height. Note that if 100px is higher than 25% of the full screen height, Footer Ad can take, in this particular case, only a 80px height in order to respect "Coalition for Better Ads" recommandations.

Enable user syncing

The Ogury Prebid Adapter currently relies on pixel-based user syncing performed by Prebid.js. This feature is enabled by default but if you need to customize the configuration, please make sure that the Ogury Prebid Adapter is allowed to perform user syncing.

pbjs.setConfig({
    userSync: {
        filterSettings: {
            image: {
                bidders: ['ogury'],  // add other adapters here if needed
                filter: 'include'
            }
        }
    }
});

More details on Prebid.js user syncing can be found here.

Update your ads.txt

Make sure to add your Ogury ID to your ads.txt file.

Optional configuration

Ad server configuration: Google Ad Manager example

Ogury Prebid Adapter can be configured along with Google Ad manager as an ad server. A typical configuration should be similar to what is described in the official Prebid.js documentation.

Here is an example of a working GAM creative:

Ogury Formats are not compatible withSafeFramedelivery. Thus it has to be unchecked.

Creative Sizes

Ogury has proprietary formats that don't follow the common IAB Ad space sizes. While Ogury returns a creative size that is defined in the prebid ad unit configuration, the real creative size differs depending on the used format and returned media type.

Bid floor

The Ogury Prebid Adapter supports bid floor management. You can optionally set a floor as defined in the price floor Prebid.js documentation.

The Ogury Prebid Adapter supports only floors expressed in USD. Please make sure that you have defined your price floor in that default currency or you have properly configured currency conversion.

Customize your Ad Format

If you want to adjust the rendering of your selected Ogury Ad Format please refer to the individual ad format sections:

Two things to keep in mind when doing adjustments:

  • For Prebid you'll need to switch the configuration parameters from snake case to camel case notation

  • All configuration options will be listed in the params Object

Bidder configuration :

{
   {
    bidder: "ogury",
    params: {
        assetKey: string,                 // MANDATORY
        adUnitId: string,                 // MANDATORY
        xMargin?: number,                 // Thumbnail only 
        yMargin?: number,                 // Thumbnail only 
        gravity?: string,                 // Thumbnail only
        headerSelector?: string,          // Header Ad only
        headerAdDomPosition?: string      // Header Ad only
        adSlotSelector?: string           // Header, In-Article and Footer only
        adSlotSelectorPosition?: string   // Header and In-Article only
        fixedElements?: ['string']        // In-Article only
        onAdShow?: function,
        onPositionChange?: function,
        onAdComplete?: function,
        onError?: function
    }
 }

Note that some parameters are optional (defined with ?) and may not be available if they are not configured in the Prebid configuration.

Vendor Mapping

If you're are using prebid's gdprEnforcement module and you're not using the most recent Ogury Adapter or Prebid version, you might need to map the Ogury Bid Adapter to the right vendor ID, otherwise Ogury won't be able to perform the necessary cookie synching.

pbjs.setConfig({
    gvlMapping: {
	ogury: 31,
    }
});

Last updated