AppNexus

Component ID

2893150

Component name

AppNexus

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

695

Component created

Component changed

Component body

AppNexus ads integration module. Very simple to use. The module provides blocks with ability to set Tag IDs, Ad Sizes.

You can also pass global page options:

<?php

use DrupalappnexusPageOpts;

/**
 * Implements hook_page_attachments().
 */
function mymodule_page_attachments(array &$page) {
  $page_opts = (new PageOpts())
    ->setKeywordQuotes()
    ->setMember('YOUR_MEMBER_ID')
    ->setKeyword('var1', 'value')
    ->setKeyword('var2', ['val1', 'val2'])
    ->setKeyword('var3', 1234);
  if ($opts = $page_opts->build()) {
    $page['#attached']['drupalSettings']['appnexus']['opts'] = json_encode($opts);
  }
}