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 and 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 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.

  • Create 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.
  • Collapse 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 creatives: Select whether the tag is for an out-of-page creative. Learn more about out-of-page creatives.
  • 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 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

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.

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?

Need more help?

Sign in for additional support options to quickly solve your issue

Search
Clear search
Close search
Google apps
Main menu
Search Help Center
true
true
true
true
true
148
false