Basic GAM Outstream Integration

Setup

  1. Setup a 1×1 Ad Unit in GAM, or reuse an existing 1×1 Ad Unit. If you would like to position the Unruly Video Ad in the same location as the 1×1, tell your Unruly contact. Alternatively Unruly can inject its video ad in the best location regardless of which 1×1 loaded the tag.
  2. Traffic the Universal Tag to the 1×1 as a standard rich media 1×1 creative. It is important to uncheck the ‘Serve into a SafeFrame’ checkbox on the creative set up page. GAM defaults new creatives to serving into ‘safeframes’. The safeframe prevents communication back to the outer page the tag is loaded on. In GAM, the checkbox can be found when setting up the Creative on a Line Item. See the screenshot below:
    dfp-safe-frame

Setup with Passback

Unruly supports passing back (waterfall, fallback) to a different ad provider on each impression when Unruly does not have an ad to serve.

  1. Ask your Unruly contact for a Universal Tag as per previous instructions above, specifying you’d like to use the additional Passback Integration. In this request, please send the tag you wish to pass back to. Please note the other ad provider’s tag should behave like an outstream ad, and must support trafficking in a 1×1 adslot. Unruly can not pass back to traditional display networks.
  2. Setup a 1×1 Ad Unit in GAM, or reuse an existing 1×1 Ad Unit. If you would like to position the Unruly Video Ad in the same location as the 1×1, tell your Unruly contact. Alternatively Unruly can inject its Video Ad in the best location regardless of which 1×1 loaded the tag.
  3. Traffic the Universal Tag to the 1×1 as a standard rich media 1×1 creative. It is important to uncheck the Serve into a SafeFrame checkbox as mentioned above.

The Universal Tag provided by Unruly with your passback tag inside will look similar to:

<script>
var unruly = window.unruly || {};
unruly.native = unruly.native || {};
unruly.native.siteId = 1009158;
unruly.native.onFallback = function() {
  return "<scr"+"ipt type='text/javascript' src='http://www.googletagservices.com/tag/js/gpt.js'>" + "googletag.pubads().definePassback('/network_ID/first_level_ad_unit/second_level_ad_unit', [1, 1]).display();" + "</scr" + "ipt>";
}
</script>
<script src="//video.unrulymedia.com/native/native-loader.js"></script>

More information about the onFallback() callback can be seen here.