Search Images Maps Play YouTube News Gmail Drive More »
Sign in

The Google Publisher Tag

The Google Publisher Tag generator

The Google Publisher Tag ad unit generator can automatically generate the HTML and JavaScript necessary to integrate one or more ad units on a desktop or mobile page. Using the ad unit tag generator is optional, but generally easier and less error-prone than manually writing code.

To generate tags for one or more ad units:

  1. In your DFP account, click the Inventory tab.

  2. Click Generate tags on the left-hand panel.

  3. Select ad units by clicking Add next to the appropriate ad unit names. (You may generate tags for all ad units at once or page by page.)

  4. Click Generate tags. A text field appears, containing the full HTML for the page, including the selected ad units.

  5. Follow the comments in the HTML to cut and paste the code into your page.

You may choose to edit the code in order to add optional attributes like key/value targeting.

View sample Google Publisher Tags.