Clear search
Close search
Google apps
Main menu

Use passbacks to traffic remnant ads (GAM tags)

This article describes how to create a passback using GAM tags. For information on creating a passback using Google Publisher Tags (GPT), see this help article.

This article describes a custom implementation of passbacks using GAM tags in DFP Small Business; we cannot offer additional support beyond what's written here. Included is general information about their use should you decide that they are the proper fit for your needs.

Passback line items are used with third-party advertisers for a number of reasons. Primarily, passback line items return a house ad or other remnant ad within DFP when the third-party doesn't have an ad to serve or when this ad doesn't meet the minimum CPM agreed upon with the third-party.

Before beginning this process, you should have generated a passback ad tag in DFP to which remnant or house inventory is targeted. The third-party should then take this ad tag and traffic it in their network as the lowest-priority ad, one that will serve if no eligible ads are found.

Please note that because passback implementations require at least two calls to DFP for an ad (one for the first ad call from the page and the second from the passback tag given to your third-party), two impressions will be counted in DFP.

How to set up a passback

You have two different options for setting up a passback:

Set up passback line items using a unique ad unit

To use a unique ad unit solely for passback trafficking:

  1. Ensure that you have no run-of-network line items in your network. For this procedure to work, all of your network's line items must be explicitly targeted to an ad unit or placement.

    To make a line item run-of-network while still using pass backs, target it either to a placement that contains all current ad units or all ad units directly.

  2. Create an ad unit to be used when a passback is served. (Learn how to create ad units)

  3. Target all remnant line items to this ad unit. Ensure that none of these line items contain creatives with third-party redirect code, as this can result in an infinite loop of server calls.

    (Learn how to apply targeting criteria to a line item)

  4. Create a tag that will be passed back to DFP in case the third party doesn't have any remnant line items. Include the pass back ad unit you just created in that tag. Give this tag to your third party to traffic as the lowest-priority eligible ad in their network. You need only give them the body of the ad tag, not the headers.

    When this tag is passed back to DFP, only the remnant line items you specifically targeted to the pass back ad unit will be eligible to serve to it.

Set up passback line items using key-values

If you'd like to set up passback line items without using a dedicated ad unit, try the following approach, which uses key-value pairs:

  1. Create a unique key with two different values to be used when a passback is served. For example, you could create a 'Redirect' key with the values 'true' and 'false':

    red=true, red=false

    (Learn how to create key-values)

  2. Target all of your remnant line items against both values using an OR condition:

    red=false OR red=true

    This ensures that your remnant line items will be eligible to serve to both of the ad tags you'll be creating below. (Learn how to apply targeting criteria to a line item)

  3. Target the line items that will redirect to the third-party ad network only to the key-value red=false.

  4. Make sure the ad tag on your page contains the key-value red=false. This will be the first ad request to DFP. Both your remnant line items and the line items that will redirect to the third-party ad server will be eligible to serve to this ad tag.

  5. Create an ad tag that includes only the key-value red=true and give it to your third party to traffic as the lowest-priority eligible ad in their network. This ad tag will be passed back to DFP if the third party doesn't have any remnant ads. This will be the second and final ad request to DFP.

    Only your remnant line items will be eligible to serve to the ad tag passed back to DFP.


More information

How passback ad serving works

Below is a diagram of how passbacks work in DFP, which is useful for understanding this process.

  1. A page makes an ad request to DFP for an ad using the DFP ad tag on the page.

  2. DFP returns a line item containing third-party code.

  3. The page uses the third-party code to make a request to a third-party ad server.

    Non-passback scenario: If a matching ad is available, an ad is served from the third-party ad server.

  4. If no matching ad is available on the third-party ad server, the server returns (i.e. passes back) the DFP ad tag that you have provided your third party.

  5. The page makes a second ad request to DFP using the passback tag contained in the third-party ad.

  6. A house ad or other specifically targeted line item is returned from DFP.

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 call that same third party for an ad. Looping happens when steps 3-6 in the diagram above repeat indefinitely, which 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.
It's very important that passback ad requests are unique in order to ensure that the ad request doesn't 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.

Alternatives to using passbacks

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/Ad Exchange competing at priority 12, and other ads at that priority have a .25 CPM value, DFP would only serve these ads if they can deliver a higher value impression.

Using passbacks with the Google Publisher Tag

You can use passbacks with the Google Publisher Tag (GPT). Asynchronous tags can be passed along without additional changes, but synchronous tags require a small change to the <head> portion of the tag. A sample complete synchronous passback tag is provided below:

<script src=''></script>
<script type='text/javascript'>
googletag.defineSlot('/network_ID/ad_unit', [728, 90], 'div-gpt-ad-random_number-0')
.setTargeting('key', 'value');
<div id='div-gpt-ad-random_number-0'>
<script type='text/javascript'>
If your GPT tag contains multiple ad units, the div IDs must be unique within the tag.

The guidelines above are not guaranteed to work across every combination of browser, ad server, and ad tag type and are not a supported use of the product. Work closely with your web developer to implement them if you decide they are the proper fit for your needs.

If your passback partner is using the legacy DFP platform or another that treats the '/' character as a relative path, please remove the character from the defineSlot line before sending the tag:

googletag.defineSlot('12345/adunit', [728, 90], 'div-gpt-ad-123456789-0');


Was this article helpful?