Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

Functionality

AdEngine supports additional ad units in the page, externally created through the googletag object in GPT. These can be Ad Manager only units, a special campaign, etc., that are not directly set in AdEngine, but can be managed by AdEngine on pair with the other units.
To add these units to AdEngine, the adngin.cmd.setGoogletagAdSlotElementIds() api API function needs to be called as a part of AdEngine's functional configuration. Alternatively, it can be added using declarative configuration.

Syntax

function adngin.cmd.setGoogletagAdSlotElementIds(parameter, callback)

...

Code Block
CallbackResult = {
  message: "<string holding a debug log of the function call result>",
  data: <Array holding the slot element ids for the added units>
}COPY

The callback function will receive the above object as the first parameter and a boolean value translating the function call success status as the second parameter.

...

Adding GPT ad-units to AdEngine will pass them to the Google Ad Server additionally to the AdEngine ad-units during the auction process. This improves page performance by using a single request to refresh all ads. It will also simplify the page code as there no extra code required to to manually call the ad server for the additional GPT ads.

...

The function can be called after AdEngine loader is ready and the AdEngine queue is defined, see functional configuration for more details.

Example

Adding the googletag ad unit slots "outstream" and "sidebar" to AdEngine using the command queue and event system

...