Build Google Publisher Tags

Generate ad tags

Auto-generate ad tags to avoid editing code manually

View related Skillshop training course

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

It is possible to create ad tags from multiple places within Ad Manager, depending on the type of tags you wish to create. For instance, you can generate Audience pixel tags immediately after creating Audience segments.

Partner with a trusted expert
Partner with a trusted monetization expert - Google Certified Publishing Partners can help you optimize your ad setup and grow your revenue.

Generate an ad tag

An example of generating an ad tag in Ad Manager.
  1. Sign in to Google Ad Manager.
  2. Click Inventory, then Ad units.
  3. Find the ad unit for which you want to create an ad tag and click its name to see 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 for each tag type may vary.

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

Your web developer should include the generated tags in the source code for the web page on which you want to 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 (GPT)

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

  • Passback tag: Use in any situation where an ad request to a third-party should ultimately be filled by an ad trafficked in your network. Learn more about Google Publisher Tag (GPT) passback functionality.
  • 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 activates guaranteed roadblocking. Learn more about SRA requests.
  • Empty divs: If you know that the ad slot is rarely filled, you can instruct the browser to collapse empty divs. Learn more about collapsing empty divs.
  • 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 about key-values.
  • Out-of-page creative: Select whether the tag is for an out-of-page creative. Learn more about out-of-page creatives.
  • Live traffic: Select if you are generating an ad tag for live stream video. This handles heavy live stream traffic volumes where all ad breaks are delivered at the same time.
  • 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.
  • Ad slot key-values (optional): Set custom attributes for specific ad slots on a page. Learn more about key-values.

Mobile Application Tag

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

Developer documentationLearn more in the Google Mobile Ads developer documentation for Android and iOS.

As an alternative to ad tags, you can use the Google Mobile Ads SDK.

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 about multi-size ads.
  • 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 about how to tag an ad request for child-directed treatment.
  • 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.
  • Ad slot key-values (optional): Set custom attributes for specific ad slots on a page.

Ad Exchange Tag

Learn how to generate an Ad Exchange Tag.

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.

  • 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.
  • Player SDK type: Select the video player implementation type where this tag is used:
    • Google IMA SDK (recommended): The player requests video ads using the IMA SDK.
    • Google IMA Adapter: The adapter is a VPAID-compatible media file that loads the IMA SDK and enables ad requests and video rendering. It should only be used in environments that support JavaScript and in players that are not directly integrated with the IMA SDK.
    • No SDK: This should only be used by publishers who are either not monetizing video content through Ad Exchange, or who are serving content on platforms that do not support the IMA SDK or adapter, and the publishers have been given special instructions for implementation.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
15407534058319797037
true
Search Help Center
true
true
true
true
true
148