Test Your Implementation on the Platform

Test your Meta Audience Network SDK implementation to verify the experience before pushing it to production.

Server Side Testing

Server-side testing involves configuring the Monetization Manager(MoMa) without the need of writing any code in your app. You can test with a device, to see both test ads and production ads, and Test Users, to see demographically targeted production ads.

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 handles the no-fill case.

Add a Test Device

The quickest way to test your integration is to test with a device. This testing lets you see both test ads and production ads. Note, production ads are not demographically targeted. Use test users to test targeting.

  1. In the Monetization Manager, hover over the left side navigation bar and select Integration --> Testing. You must be signed into the Business Manager as an admin.

  2. Toggle the switch to Testing enabled. This toggle enables your devices to be treated as test devices by our ad system and not normal user devices.
  3. Check the box to Use real advertiser content checkbox is checked. This enables you to see real Audience Network advertisements on your test devices. Our ad system will sample a list of ads with different creative types (i.e. videos, images, carousels) or even different locales so you can see how real ads look in your integration. These ads will not generate revenue from any impressions or clicks.

  4. Add test devices either manually entering device IDs or by uploading a CSV. Enter the Google Advertising ID (AAID) for Android devices and the Identifier for Advertising (IDFA) for iOS devices and name each device.

  5. Once you have added a device you can Select Ad Type to be viewed on your device.

  6. Click a Test link to view a specific media type on your device. The media type should appear on your device for 5 minutes after you selected it. Only one media type can be tested at one time.

Add Test Users

Add people to your property to test production ads that have been demographically targeted.

  1. Go to your Business Manager Settings, navigate to Users > People in the left side navigation bar then click the Add button.

  2. Enter the email or emails of the people you want to add to your app and click Next. All invitations give people employee access by default.

  3. When the Assign Access dialog box is displayed, select one of the following from the left-side menu:

    • Apps. Select the app you are adding the tester to, and click the Test app toggle switch. Then, click Invite.
    • Properties. Select the property you are adding the tester to, and click the Test property toggle switch. Then 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.

Test Mobile Apps

  1. Once you have added a test user and added their test device, distribute your app to your test user's devices using your preferred distribution method.
  2. Your test user must have the Facebook app installed on their device and login with the account you added as a test user. This is required to allow Facebook to serve your test user your ads.
  3. Your test user can now trigger a test to see a production ad. See step 5 and 6 of the Add a Test Device section.

When using Testflight to distribute and test your app, you will not be able to see real ads in those test builds. Normally, the Identifier for Advertisers (IDFA) remains constant for a device until a user resets it manually. However, each time a Testflight-distributed app asks for the IDFA, it will get a different IDFA.

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

Starting with iOS 14, you will need to implement the setAdvertiserTrackingEnabled flag, which also applies with test mode enabled.

In This Section

Test with Client-Side Code Insertion

Explains how to temporarily insert code into your app to test your Audience Network implementation on the client side.

Validate Ad Requests with an SSL Proxy

Explains how to use a proxy app to view all of the SSL/HTTPS traffic between your app and the Audience Network ad server.

Integration Checklist and Ads Request Error Codes

Describes how to verify your Audience Network integration and provides a list of possible error codes.