Clear search
Close search
Google apps
Main menu

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 agreed upon with the third party. In these cases, the third-party server would instead serve the GPT passback tag, which would return 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 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 the GPT passback tag as a single script block. All of the JavaScript code must be contained within a single <script> tag. Use the following code as an 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 or lower CPMs (and in some cases, rejected ad requests). To avoid this, we recommend that you have your 3rd party network or ad server append .set("page_url", "URL"). 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, you can use the PATTERN macro (for example, %%PATTERN:url%%) to insert the URL in a third-party tag.

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 in place of 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").
  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

If you want to add key-values to the GPT tag, call setTargeting, using the following code as an example:

<script src="">
  googletag.pubads().definePassback( "/123456/passback/sports", [468, 60])
  .setTargeting("color", "red")
  .setTargeting("sport", ["rugby", "rowing"]).display();

The above example code snippet adds page-level key-values, not slot-specific key-values. The same targeting criteria will be set 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

If you want to add click tracking to the GPT tag, you'll need to add a clickthrough URL macro to the definePassback call using setClickUrl. The clickthrough URL will be dynamically prepended to the clickthrough URL stored on the DFP ad server.

<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:

  • Use asynchronous mode in the passback tag you give to the third-party. (The tag on the web page can be sync or async, but we recommend using async.)
  • Use single request architecture (SRA)
  • Deliver companion ads
  • Control AdSense parameters using the set method, except for the page_url attribute.
  • Specify a div ID to render into
Avoid infinite loops

To avoid looping, you must take the appropriate steps when using passbacks to make sure that the subsequent ad requests that are passed-back from the third-party ad server to DFP are unique and therefore do not continue to call the same third party for an ad. Looping indefinitely can cause your web page not to load properly.

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

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

Passback ad requests must be unique to ensure they do not create endless loops.

Avoid daisy chaining

We do not recommend using passbacks for the purposes of daisy chaining. In this process, you’ll call to DFP for an ad and DFP will return a third-party redirect; if the third party doesn’t have an ad, it will passback the ad call to DFP, which will then call 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. Lining up several third-parties like this to try to fill inventory in order to get the highest CPM from competing networks is called a daisy chain of ad calls.

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 looping. Moreover, because you’re charged for each call to the DFP server, daisy chaining can increase your 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 via 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?