Testing Your Audience Network Implementation

When you integrate Facebook Audience Network into your mobile website or app, use the latest Audience Network SDK in your integration to include the most recent bug fixes and improvements, and test your implementation preferably on physical devices to verify the real experience before rolling it out to production. Audience Network offer server side and client side testing methods:

Server Side Testing

Server side testing methods involve configuring Monetization Manager(MoMa) without the need of writing any code in your app:

Client Side Testing

Client side testing method involves temporarily inserting code in your app:

For additional information. see the following topics:

Method 1: Testing with a Device ID

Testing with a test app lets you see both test ads and production ads. However, the production ads are not demographically targeted. It's the quickest way to test your integration.

To test with a test app:

  1. Go to the business overview page in Monetization Manager.
  2. Make sure you are logged in as the admin of your Business Manager.
  3. Hover over the home icon in the left-hand navigation, and go down to Integration --> Testing
  4. Click on the Test Devices tab,and in the Enable testing for your devices section, make sure that Testing enabled is enabled and the Use real advertiser content checkbox is checked.
  • Testing enabled: This toggle enables the test device group. If this is turned off, the whole test device settings won't take any effect and the test devices will be treated as normal user devices by our ad system.
  • Use real advertiser content: This enables you to see real Audience Network advertisements during your testing on the test devices, but you won't generate revenue from the impressions or clicks. Our system will sample a list of ads with different creative types (i.e. videos, images, carousels) or even different locale so you can see how real ads look in your integration.

To add devices into your test devices list, use you can use the manual input or follow the CSV template to upload multiple devices at the same time.

The identification we use for test devices are Identifier for Advertising (IDFA) for iOS devices, and Google Advertising ID (AAID) for Android devices. The device names are for your own reference. Here are several ways you can find out these ids for your mobile device:

  • Use utilities that displays the IDFA or AAID you can find from Play Store or App Store.
  • Use the API to retrieve these ids programmatically on Android or iOS.
  • On most Android you can go to Settings -> Google -> Ads to see your AAID displayed.

After you added your devices into the list and enabled testing for the test device list, when you send an ad request from your test device we will return the corresponding testing ad to facilitate your integration testing.

Method 2: Testing with Test Users

Testing with test users lets your testers see production adds demographically targeted at their characteristics. To test with test users, you add people to your app in the Business Manager and add them as testers in the app dashboard. Then, these assigned testers use your app or mobile website while logged in to Facebook.

To add people in Business Manager:

  1. Go to your Business Settings, and in the left-hand navigation, choose People under Users.
  2. In the People pane, click Add.
  3. In the Invite People dialog box, enter the email or emails of the people you want to add to your app, choose their access level, and click Next.
  4. In the Assign Access dialog box, choose Apps from the left-hand menu. Click on the app you want to add a tester for, and toggle the App Tester button.
  5. Click Invite.

If you are using any mediation layer, please make sure that the mediation layer is sending requests to Audience Network. If you have testing enabled on the mediation layer, it may not be sending any requests to our servers.

To test mobile apps:

  1. After making sure your testers are added to your business manager settings page, distribute the app to your testers' devices using your preferred distribution method.
  2. Each of the people you added needs to have the Facebook app installed on their device and log in to it using the Facebook user ID that you added to the Testers role. This is required because Facebook needs to recognize the user as a person in your business in order to return an ad.
  3. The person testing can now launch your app and trigger the placements that you want to test. They should see a production ad.

To test mobile websites:

  1. Each of the testers you added needs to launch the mobile browser that they will use to test your mobile website and log in to Facebook using the Facebook user ID that you added to the Testers role. This is required because Facebook needs to recognize the user as a Tester on the app in order to return an ad even when the app is not yet approved.
  2. The tester can now launch your mobile website and do the steps needed to trigger the placements that you want to test. They should see a production ad.

When testing your ad placements, Facebook will intentionally send a no-fill for about 20% of requests to allow you to test how your app or mobile website handles the no-fill case.

When using Testflight to distribute and test your app, you will not be able to see real ads in those test builds. Instead, you will need to set test mode as shown below in order to get ads from Audience Network. Each time a Testflight-distributed app asks for the the Identifier for Advertisers (IDFA), it will get a different IDFA. Normally, IDFA remains constant for a device until a user resets it manually. But when a Testflight build asks for the IDFA from the operating system, it doesn’t get the "real" IDFA. Instead, it gets a "dummy" IDFA that changes each time the app asks for it.

To resolve this issue, you can turn on the test mode to allow the test ad to be shown.