Build Google Publisher Tags

Generate ad tags

View related Skillshop training course

You can easily customize and generate ad tags from the Ad Manager interface without having to manually edit code.

It is possible to create ad tags from multiple places within the Ad Manager interface, depending on the type of tags you wish to create. For instance, you are given the option of generating Audience pixel tags immediately after creating Audience segments. Learn more

Generate an ad tag

  1. Sign in to Google Ad Manager.
  2. Navigate to Inventory and then Ad units.
  3. Find the ad unit for which you want to create an ad tag and click on its name to see its details.
  4. Select the Tags tab on the ad unit details page.
  5. Select the type of tag you want to generate and click Continue. Options vary depending on the tag type selected. Learn more

  6. Make additional selections based on the tag type selected and click ContinueLearn more
  7. From "Tag results", copy the generated tags and send them to your web developer.

Your web developer should includes the generated tags into the source code for the web page on which you want serve ads.

Options for each tag type

Options vary depending on the tag type selected.

The tag generator may not have all functionality available in the Google Publisher Tag API.

Google Publisher Tag

Google Publisher Tag is an ad tagging library for display ads which allows you to dynamically build ad requests. 

  • Create passback tag: This functionality can be used in any situation where an ad request to a third-party should ultimately be filled by an ad trafficked in your network. Learn more
  • Single request: Single request architecture (SRA) means that instead of sending individual ad requests to Ad Manager servers, the browser is able to send one request notifying the server of all ad units on the page. This enables guaranteed roadblocking. Learn more
  • Collapse empty divs: If you know that the ad slot is rarely filled, you can instruct the browser to collapse empty divs. Learn more
  • Page-level key-values: Set custom attributes across all ad slots on the page to use less code and ensure ad slots have the same targeting attributes. Learn more
  • Out-of-page creatives: Select whether the tag is for an out-of-page creative. Learn more
  • Sizes: Select the inventory sizes for the tag. You can see applicable size options by clicking into this field. More than one size may be available. This is not applicable to out-of-page creatives. Learn more
  • Ad slot key-values (optional): Set custom attributes for specific ad slots on a page. Learn more

Mobile Application Tag

The Mobile Application tag generates the ad unit ID and ad sizes for mobile app ads, which you can share with your developer. There are no additional options after selecting this ad type. Learn more in developer documentation:

As an alternative to ad tags, you might consider using the Google Mobile Ads SDK. Refer also to the Google Ads SDK developers documentation.

AMP Tag

  • Multiple size validation: When an ad has multiple sizes, secondary sizes must not be larger than the corresponding dimensions of the primary size. Also, the secondary sizes must not be smaller than 2/3 of the primary size. Deselect this value to turn off the validation. Learn more
  • AMP placeholders: Select this value to add code for placeholders and fallback.
  • Child-directed treatment: Select this value to add to code to help facilitate compliance with the Children’s Online Privacy Protection Act (COPPA). Learn more
  • Inventory unit sizes: Select the inventory sizes for the tag. You can see applicable size options by clicking into this field. More than one size may be available. This is not applicable to out-of-page creatives. Learn more
  • Ad slot key-values (optional): Set custom attributes for specific ad slots on a page. Learn more

Ad Exchange Tag

For "Display", "Mobile app", and "In-stream video" ads, Ad Exchange tags are only available for eligible ad units.

  • ​Inventory unit sizes: Select the inventory sizes for the tag. You can see applicable size options by clicking into this field. More than one size may be available. This is not applicable to out-of-page creatives. Learn more

Google Publisher Tag for Video and Audio

Video and audio ad tags contain all the information required for a video and audio ad request, including information about the master video and audio ad and optional companion ads.

  • Enable for live traffic: Generate an ad tag for live stream video. This ensures the ability to handle heavy live stream traffic volumes, where all ad breaks are delivered at the same time.
Was this helpful?
How can we improve it?