Use GPT passbacks

Traffic remnant line items or serve ads on another publisher's website
This article describes the use of the passback feature of Google Publisher Tag (GPT).

GPT allows you to generate tags with “passback” functionality. These tags can be used in any situation where an ad request to a third party should ultimately be filled by an ad trafficked in your own Ad Manager network.

Use passback tags to traffic remnant or fallback line items

Passback tags can be used when a third-party server doesn't have an ad to serve or when an ad doesn't meet the minimum CPM/floor price agreed upon with the third party. In these cases, the third-party server instead serves the GPT passback tag, which returns a house ad or other remnant ad from your own Ad Manager network.

See an example

If third-party ad network A wants to return an ad to Ad Manager publisher B, but does not have an eligible ad, ad network A delivers a passback tag, which ultimately returns an ad from Ad Manager publisher B.

Passback for fallback illustration
  1. The webpage makes a call to the Ad Manager ad server using the Ad Manager ad tag.
  2. The Ad Manager ad server returns an ad containing a third-party ad tag.
  3. The third-party ad tag calls the third-party ad server for an ad.
  4. The third-party ad server does not have an eligible ad, so returns a passback ad tag.
  5. The passback ad tag makes a call to Ad Manager to serve an ad matching the specified targeting criteria.
  6. The Ad Manager ad server returns an ad that matches the passback ad tag targeting criteria.

Use passback tags to serve ads on another publisher's website

Passback tags can be used to serve ads from your network to another publisher's website. In these cases, the GPT passback tag would be trafficked by the other publisher and would return an ad from your own Ad Manager network.

See an example

If Ad Manager network A wants to deliver ads to publisher B, Ad Manager network A sends a passback tag to publisher B. Publisher B serves the passback tag, which ultimately returns an ad from Ad Manager network A.

Passback for another publisher illustration
  1. The passback ad tag makes a call to Ad Manager to serve an ad matching the specified targeting criteria.
  2. The Ad Manager server returns an ad that matches the passback ad tag targeting criteria.

Use passback tags to serve video ads

To create video passbacks, use a standard video tag to pass back from a third party to Ad Manager. You can build this tag manually or by using the Ad Manager video tag generator.

Create GPT passback tags

Create a GPT passback tag as a single block of JavaScript code within a single <script> tag in your code snippet. For example:

<script src="https://securepubads.g.doubleclick.net/tag/js/gpt.js">    googletag.pubads().definePassback(
    "/network_ID/first_level_ad_unit/second_level_ad_unit", [468, 60]).display();
</script>

For more information on the definePassback method, see the Google Publisher Tag API reference guide.

Often, when multiple ad servers and ad networks are called from the page, the GPT passback tag is served into one or more iframes. As a result, GPT may not be able to determine the URL where the tag is being served. If you are using Ad Exchange or AdSense to fill these passback impressions, then without a URL, these systems can't send contextual information about the page to buyers. This can lead to lower fill rates or lower CPMs (and in some cases, rejected ad requests). To avoid this, we recommend that you have your third-party network or ad server append .set("page_url", "URL") to the passback tag. For example:

<script src="https://securepubads.g.doubleclick.net/tag/js/gpt.js">    googletag.pubads().definePassback(
    "/network_ID/first_level_ad_unit/second_level_ad_unit", [468, 60]).set("page_url", "mydomain.com/mypage.html").display();
</script>

To pass the URL to a third-party ad network or ad server, use the PATTERN macro (for example, %%PATTERN:url%%) to insert the URL in a third-party tag. Learn how to use the PATTERN macro

Here’s an example of how the URL would flow:

  1. A user visits mydomain.com/mypage.htm. The page requests ads.
  2. Ad Manager serves a third-party network tag and inserts a URL using the PATTERN macro.
  3. The third-party network receives the URL, but can't fill it.
  4. The third party serves the Ad Manager passback into its own iframe, but appends .set("page_url", "URL") to the request. 
  5. Ad Manager receives an ad request with the page URL. Ad Exchange and AdSense can send buyers contextual information.
(Optional) Add key-values to passback tags

To add key-values to the GPT tag, call setTargeting in your code snippet. For example:

<script src="https://securepubads.g.doubleclick.net/tag/js/gpt.js">
  googletag.pubads().definePassback( "/123456/passback/sports", [468, 60])
  .setTargeting("color", "red")
  .setTargeting("sport", ["rugby", "rowing"]).display();
</script>

This example code snippet adds key-values at the page level, not the slot level, setting the same targeting criteria for all ad tags on the page.

For more information on the setTargeting method, see the Google Publisher Tag API reference guide.

(Optional) Add click tracking to passback tags

To add click tracking to the GPT tag, add a clickthrough URL macro to your code snippet to the definePassback call using setClickUrl. The clickthrough URL is dynamically prepended to the clickthrough URL stored on the Ad Manager ad server. For example:

<script src="https://securepubads.g.doubleclick.net/tag/js/gpt.js">
  googletag.pubads().definePassback(
   "/network_ID/first_level_ad_unit/second_level_ad_unit", [468, 60])
  .setClickUrl("%%CLICK_URL_UNESC%%")
  .display();
</script>

For more information on the setClickUrl method, see the Google Publisher Tag API reference guide.

Traffic GPT passback tags

Traffic passback tags as you would any third-party creative. Learn more

Limitations of GPT passback tags

When using passback tags, you cannot:

Avoid infinite loops

Passback ad requests must be unique to ensure they do not create infinite loops, which can cause your web page to fail to load properly.

To avoid looping with passbacks, make sure that subsequent ad requests that are passed back from a third-party ad server to Ad Manager are unique and do not continue to call the same third party for an ad.

We suggest one of the following strategies to ensure that all ad requests in a passback are unique:

  • Use a unique ad unit just to handle passbacks
  • Use a unique key-value to handle passbacks
Avoid daisy chaining

We do not recommend using passbacks for the purpose of daisy chaining (lining up several third parties to try to fill inventory to get the highest CPM from competing networks). An example would be if you called to Ad Manager for an ad and Ad Manager returned a third-party redirect; if the third party doesn’t have an ad, it passes back the ad call to Ad Manager, which then calls to a different third party for an ad. This process continues until an ad, rather than a passback tag, is returned by a third party.

Daisy chaining is not recommended for several reasons. It can increase discrepancies between Ad Manager and the third party; daily discrepancies of up to 20% are considered normal for each link in the daisy chain, and these discrepancies can quickly compound. This setup can also increase the probability of infinite loops. Moreover, because you’re charged for each call to the Ad Manager server, daisy chaining can increase your ad serving costs.

Alternatives to using GPT passback tags

In addition to Ad Manager, AdSense and Ad Exchange can provide your network with remnant ads that have greater value than ads served using passback method.

With AdSense and Ad Exchange, you can control delivery using a minimum CPM at a given priority range. For example, if you have AdSense or Ad Exchange competing at priority 12, and other ads at that priority have a $0.25 CPM value, Ad Manager would only serve these ads if they can deliver a higher-value impression.

Was this helpful?
How can we improve it?