Serve ads on partner sites with passback tags

If you want ads from your network to serve on a partner site, you can send Google Publisher Tags (GPT) to the other publishers to traffic as third-party ads on their ad server.

Watch related Publisher University training

To serve ads on your partner's website:

  1. Ask your webmaster to create the GPT tag as a single script block. All of the JavaScript code must be contained within a single <script> tag. Use the following code as a template:

    <script src="https://www.googletagservices.com/tag/js/gpt.js">   googletag.pubads().definePassback('/network_ID/first_level_ad_unit/second_level_ad_unit', [468, 60]).display();
    </script>
  2. Send the tag to your partner.

Add click tracking to the tag

If your partner wants to add click tracking to the GPT tag, they'll need to add a clickthrough URL macro to the .definePassback call. The clickthrough URL will be dynamically prepended to the clickthrough URL stored on the Ad Manager ad server.

<script src="https://www.googletagservices.com/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>

Add key-values

To add key-values to the GPT tag, call .setTargeting:

<script src="https://www.googletagservices.com/tag/js/gpt.js">
   googletag.pubads().definePassback('/123456/passback/sports', [468, 60])
      .setTargeting("color", "red")
      .setTargeting("sport", ["rugby", "rowing"])
      .display();
</script>
Was this article helpful?
How can we improve it?