這份文件已更新。
中文(香港) 的翻譯尚未完成。
英文更新時間:4月16日
中文(香港) 更新時間:3月27日

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.

若使用 Testflight 來散佈及測試應用程式,您無法在這些測試組建中看到實際的廣告。一般而言,除非用戶手動重設裝置,否則裝置的廣告客戶識別碼 (IDFA) 都會維持不變。但是,每當 Testflight 發佈的應用程式要求 IDFA 時,都會得到不同的 IDFA。

若要解決這個問題,您可以開啟測試模式以便顯示測試廣告。

從 iOS 14 開始,您需要採用 setAdvertiserTrackingEnabled 標示,這在啟用測試模式時同樣適用。

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.