Test your mobile app

Testing mobile in-app ads is different from creating a test page for tags. To test your app for Ad Exchange Mobile In-app ads, you need to make test calls from the app. You can test directly by calling Ad Exchange Mobile In-app from the GMA SDK as well as by calling the ad server where the Ad Exchange tag is trafficked. In this article, we cover testing Ad Exchange directly. To test via Ad Manager ad server, see this article.

Verify Ad Exchange setup

Check if the publisher ad unit ID supplied to the developer contains the ad unit code and is of the format ca-mb-app-pub-XXXXXX/<tag slot code>.

Verify app setup

Verify that:

  1. App request and response logs show all events firing correctly.
  2. App handles device orientation as desired.
  3. App handles no fill by listening to the error.

Check the app request and response

  1. Request is made at the expected slot and time (for example, after every few articles or between every few feeds).
  2. If using interstitials (with delayed impressions), request is made as close to the ad view time as possible.
    Manual impression pings do not work for Ad Exchange.
  3. Rendering size is consistent between different device screen factors.
  4. Capture mobile session traffic using any network trace tool (for example, Charles, Fiddler).
  5. Check for the following request parameters to verify the setup in the request that contains doubleclick.net:80/pagead or doubleclick.net:80/gampad:.
    • format: should contain the correct size requested.
    • iu: should contain the requested publisher ad unit ID.
    • tag_for_child_directed_treatment: If value is 1, it triggers COPPA behavior.
  6. Check the following response parameters to verify the setup:
    • Header: X-Afma-Debug-Dialog — When present, this shows the creative and line item ID that the creative served from. This number could sometimes be -2 when there is no fill from Ad Manager and -1 when the fill is from an Ad Exchange ad.
    • Header: X-Afma-Ad-Size — Contains the size of the creative that served.
Was this helpful?
How can we improve it?