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 Tags (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 DFP 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 DFP network.

See an example

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

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 DFP network.

See an example

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

Use passback tags to serve video ads

To create video passbacks, use a standard video tag to pass back from a third party to DFP. You can build this tag manually or by using the DFP 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="">    googletag.pubads().definePassback(
    "/network_ID/first_level_ad_unit/second_level_ad_unit", [468, 60]).display();

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="">    googletag.pubads().definePassback(
    "/network_ID/first_level_ad_unit/second_level_ad_unit", [468, 60]).set("page_url", "").display();

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 The page requests ads.
  2. DFP 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 DFP passback into its own iframe, but appends .set("page_url", "URL") to the request. 
  5. DFP 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="">
  googletag.pubads().definePassback( "/123456/passback/sports", [468, 60])
  .setTargeting("color", "red")
  .setTargeting("sport", ["rugby", "rowing"]).display();

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 DFP ad server. For example:

<script src="">
   "/network_ID/first_level_ad_unit/second_level_ad_unit", [468, 60])

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 infiinite 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 DFP 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 DFP for an ad and DFP returned a third-party redirect; if the third party doesn’t have an ad, it passes back the ad call to DFP, 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 DFP 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 DFP server, daisy chaining can increase your ad serving costs.

Alternatives to using GPT passback tags

In addition to DFP, 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, DFP would only serve these ads if they can deliver a higher-value impression.

Was this article helpful?
How can we improve it?