Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The array activeAdUnits declares the ad-units to run an initial auction on this page. Only include ad-units that are available on this page.
The presence of the activeAdUnits array will run an automatic auction for the ad-units listed in the array, even if AdEngine is configured to do manual auction.
Set to undefined if the ad-units should be auctioned in manual-auction mode only. For doing an auction of all units in auto-auction mode, set to undefined or do not declare at all.
If no auction is to be produced, heading directly to the ad server phase (e.g., to refresh some publisher GPT ad units), either set activeAdUnits array to be an empty array or null.
Find more information about ad-units, their naming, and usage in the documentation of startAuction.

adengine.activeLots

The array activeLots declares the auction lots to run an initial auction on this page and/or have some special configuration like lazy loading, video URLs or override settings for GPT ad unit path or auction sizes. Only include lots that are available on this page.
Having the activeLots field in the snigelPubConf object will take precedence over the activeAdUnits field. This means that if both activeAdUnits and activeLots fields are defined in the object, only the last one will be used.
AuctionLot object structure is the same as documented in the startAuction document, and can give one more freedom to define in which divs in the publisher's page will the ad units run, or set special behaviors for the units like lazy loading or specific auction sizes.
The presence of the activeLots array will run an automatic auction for the lots listed in the array, even if AdEngine is configured to do manual auction.
Set to undefined if the ad-units should be auctioned in manual-auction mode only. For doing an auction of all units in auto-auction mode, set to undefined or do not declare at all.
If no auction is to be produced, heading directly to the ad server phase (e.g., to refresh some publisher gpt ad units), either set activeLots array to be an empty array or null.
Find more information about auction lots, their naming, and usage in the documentation of startAuction.

adengine.additionalGptAdSlotIds

The array additionalGptAdSlotIds declares GPT ad-units using their div element id. GPT ad-units are defined using googletag.defineSlot. These additional ad-units will be passed to the Ad Manager without being processed by AdEngine. This allows running all ads through a single call to Ad Manager.

...

The boolean sensitiveContent is used to declare pages that contain sensitive/inappropriate text, image, audio, video, or any other type of content that violate Google Publisher Policies. In case of sensitive content on a page, declare "sensitiveContent": true, which will skip Google AdServer in the bidding process, preventing policy violations, and will render header bidding ads only.

...

AdEngine is using the concept of a command queue to queue API commands even before the full stack is loaded. This is the same concept as being used by GPT and AdSense.
The command queue is a structure created even before AdEngine object is complete and ready to execute. This is intended to avoid having commands lost by having an incomplete object. When the adngin object is ready to execute its functions, it then processes the command queue and executes whatever commands are there, guaranteeing a logical order of execution provided by the event system (e.g., the startAuction command cannot run before the configuration commands are run).
So to execute a command in AdEngine, it should be added to the command queue, which is a Javascript array, using the notation adngin.queue.push(), as shown below:

...

All available functions for AdEngine can be found in AdEngine's API reference documentation.

adnginLoaderReady event

...

Wait for AdEngine loader to be ready, then use the command queue to run an auction of all available ad tags using startAuction.

Code Block
<script data-cfasync="false" type="text/javascript">
  window.addEventListener('adnginLoaderReady', function() {
    adngin.queue.push(function() {
      // trigger a new auction
      adngin.cmd.startAuction();
    });
  });
</script>
<script data-cfasync="false" async src="https://cdn.snigelweb.com/adengine/**site.domain**/loader.js" type="text/javascript"></script>

...

Wait for AdEngine loader to be ready, then use the command queue to add GPT ad-units using setGoogletagAdSlotElementIds and run an auction of all available ad tags using startAuction.

Code Block
<script data-cfasync="false" type="text/javascript">
  // define ad-slot using googletag defineSlot
  window.googletag = window.googletag || { cmd: [] };
  googletag.cmd.push(function() {
    googletag.defineSlot("/1234567/incontent", [160, 600], "incontent-div").
      addService(googletag.pubads());
  });
</script>
<script data-cfasync="false" type="text/javascript">
  window.addEventListener("adnginLoaderReady", function() {
    adngin.queue.push(function() {
      adngin.cmd.setGoogletagAdSlotElementIds(["incontent-div"]);
      adngin.cmd.startAuction();
    });
  });
</script>
<script data-cfasync="false" async src="https://cdn.snigelweb.com/adengine/**site.domain**/loader.js" type="text/javascript"></script>

...