The Google Publisher Tag (GPT) module enables serving of DoubleClick for Publishers (DFP) ads on Drupal websites.

The GPT module supports Premium and Small Business (SB) DFP accounts.

Get started

If you have not used ad manager before please read the ad manager documentation, as it covers most of the process for using GPT.

Before continuing you should have the ad manager and GPT modules installed with the administer ad manager permission enabled for your role.

Javascript targeting permission

If you will want to make use of advanced functionality that allows targeting GPT using Javascript variables/functions then you'll need to visit the permissions page (admin/people/permissions) and enable the Set Javascript targeting permission for your role.

Configuration

GPT ad manager settings form fieldsetBefore being able to display any GPT ads on your site you'll need to visit the ad manager settings page (admin/structure/ad-manager/settings) and set some configuration.

On the ad manager settings page there will be a Google Publisher Tags fieldset containing multiple options for configuring how GPT should function on your site. At a very minimum you'll need to populate the Network code field, with the value from the Admin tab of your DFP console, and save.

Placing ad slots on pages

Creating, editing, and placing ad units on your site are all covered in the ad manager documentation.

Targeting

The GPT module allows for two levels of targeting.

The first level is slot-level targeting, which allows setting of key-value pairs to target on the specific ad unit. This is done from the ad provider settings form, accessed when creating/editing an ad unit.

The second level of targeting is page-level, which sets key-value pairs to target all ads on a page.

GPT entity targeting

The GPT module has another module bundled with it to support setting targeting values on individual entities. This module is called GPT Entity Targeting and is accessible from the modules install page (admin/modules).

GPT entity targeting vertical tab formBefore being able to make use of GPT entity targeting the set entity targeting permission must be enabled for the desired roles from the permissions page (admin/people/permissions).

Once installed and with the proper permissions a user can edit any page entity (such as nodes, taxonomy terms, etc) and access the Google Publisher Tags fieldset on the entity's edit form. The fieldset will either be in the vertical tabs, if the entity makes use of them, or near the bottom of the form.

Any settings made in the GPT entity targeting form on an entity will affect page-level targeting and settings on pages where that entity is the primary content of the page.