The module Google AdManager allow you to easily use Google AdManager (now becomes DoubleClick for Publisher) in your Drupal site. It provides also sophisticated method to display different ad slot in the same block.

Configuration

In the module settings page at "admin/settings/google_admanager" you can add ad slots and your GAM account settings. In Drupal 7, the URL is "admin/config/system/google_admanager".

This module creates automatically a block for each ad slots. You can use those blocks like any normal block.

Advanced settings

Superslot

In the module settings page, you can create superslot. Each superslot contains many ad slots which you can configure in the block configuration page, each ad slot has its own visibility setting (by PHP code). For example:

  • Display ad slot in every page: return TRUE;
  • Display ad slot on pages where the global variable $section is equal to 'tech': return ($GLOBALS['section'] == 'tech');

Ad slot with empty textfield is considered unused and is deleted from superslot. If you want to add more ad slots, fill these textfields, click "Save", then you'll get 3 more available textfields.

Lazy loading

The module will allow you to opt-in the lazy method to insert advertising code just before </body> closing tag. This helps page loading performance.

This is a testing feature, and is not officially supported by Google. Turn it off if you have problem, and report in the module issue queue.