inmobi-ad-tracker-iat | Setting up Facebook Audience Network as an ad source

Ad Source Details:

How to Set Up the Facebook Audience Network Ad Source

Step 1: Log on to http://platform.aerserv.com/ and click on the Ad Sources link at the top of the page

Step 2: Click the + or the Add New Ad Source button on thepage

Step 3: Enter a Name for the ad source (example: Facebook Interstitial)

Step 4: Select Facebook as the ad source

Step 5: Enter the following fields that are specific to the Facebook ad source:

FIELD DESCRIPTION REQUIRED/OPTIONAL EXAMPLE
Placement ID Audience Network Placement ID

To see test ads, you may prepend a test ad type to your placement.

Required

839999212758459_841267789298268

Banner Ad Size Select the banner size - leave blank for Interstitial Ads. Required

BANNER_HEIGHT_50

Test Device ID Retrieve the ID from the debug log: When testing your app with Facebook's ad units you must specify the device hashed ID to ensure the delivery of test ads. This ID is available from the debug log. Optional

Step 6: Enter aCPM (example: 3.50)

Step 7: Select a placement(s) for assigning this ad source

Step 8: Select any desired geo or device targeting

Step 9: Click Save

Step 10: Download the AerServ SDK

Locating the Facebook Audience Network Placement ID

  1. Log onto the Facebook Developer account platform and click on Account
  2. Click the My Apps Tab
  3. Click Audience network
  4. Copy the Placement ID
Adding the optional FacebookTestDeviceId

When you run your app on the simulator, test ads will show by default and indicate a successful ad serving call in your app. When testing on a device, however, you must enable test ads by copying the hashed device ID that is printed to the console and set it in code via a dedicated function.

To enable test ads, use the following:

Android:

AerServConfig config = new AerServConfig(this, YOUR_AERSERV_PLACEMENT); 
config.setDebug(true);
  

iOS:

  • Objective C:
    [AerServSDK enableTestMode:YES];
        
  • Swift:
    AerServSDK.enableTestMode(true)
        

You may also see test ads by prepending a test ad type to your Facebook placement. Please consult the Audience Network Guide from Facebook, for more details.

IMPORTANT: Remove this prefix before releasing your application to your end users! For any questions, please reach out to your account manager.

Optional Banner Ad Size

BANNER_HEIGHT_50: (Default) Phone ad size (320x50)

BANNER_HEIGHT_90: Tablet ad size (320x90)

RECTABLE_HEIGHT_250: Medium Rectangle ad size (300x250)

Android

Add the following settings inside your application's build.gradle:

implementation 'com.facebook.android:audience-network-sdk:5.9.1'
  

iOS

Step 1. Add the following frameworks from the folder network-support/Facebook/FBAudienceNetwork.framework to your project frameworks.

  1. FBAudienceNetwork.framework
  2. FBSDKCoreKit.framework

Add the following library to Target > Build Phases > Link Binary With Libraries:

libc++.tbd