Tag Integration

Prerequisites

  • A signed addendum
  • A Facebook Audience Network Property Setup for Mobile Web
  • Your payout info and domain added and approved for Audience Network

For Audience Network account setup details, you can review the Getting started guide.

Integration Steps

  • Setup Monetization Manager (Property, Payouts, Domain, Ad Space, Placements)
  • Save your placement id's and which format you created it for (ie. native, 300x250, 320x50)
  • Traffic the below Tag in your Ad Server as a Creative
Be sure to swap in your placement_id and the correct format into the below tag. Placement id should be formatted like this: '12345678910_10987654321'. Accepted formats: '300x250', '320x50', 'native'. For fullwidth use '300x250' and turn it on via Monetization Manager on the Placement Settings level (fullwidth toggle).
<html>
  <body>
    <div style="display:none;">
      <script type="text/javascript" src="https://connect.facebook.net/en_US/fbadnw60-tag.js" async></script>
      <script type="text/javascript">
        window.ADNW = window.ADNW || {};
        window.ADNW.v60 = window.ADNW.v60 || {};
        window.ADNW.v60.slots = window.ADNW.v60.slots || [];
        window.ADNW.v60.slots.push({
          rootElement: document.currentScript.parentElement,
          placementid: '[PLACEMENT_ID]',
          format: '[DISPLAY_FORMAT]',
          testmode: false,
          onAdLoaded: function(rootElement) {
            console.log('Audience Network [[PLACEMENT_ID]] ad loaded');
            rootElement.style.display = 'block';
          },
          onAdError: function(errorCode, errorMessage) {
            console.log('Audience Network [[PLACEMENT_ID]] error (' + errorCode + ') ' + errorMessage);
            [PASSBACK_CODE]
          }
        });
      </script>
    </div>
  </body>
</html>