Test your DFP Mobile In-app setup

To test your app, you can test each item in the workflow and optionally get a network trace to see the full workflow in action. The following steps walk through various testing scenarios. Click here for general DFP testing recommendations.

Verify DFP setup:

  • Check if the publisher ad unit ID supplied to the developer contains the ad unit code and is of the format /NetworkCode/AdUnitCode.
    The ad unit code can differ from the ad unit name.
  • Check the targeting criteria of the line item. For example, If there are any key values being passed from the mobile app, see if you have specifically targeted the line items to those key values.

Verify app setup:

  • Publisher AdUnit ID is correct.
  • App request and response logs show all events firing correctly.
  • App handles device orientation as desired.
  • App handles no fill by listening to the error.
Some pubs use deep link and pass special debug info and key values to test setup.

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 delayed impressions, request is made as close to the ad view time as possible.
  3. If using manual impressions, impression ping is firing when the ad loads.
  4. Rendering size is consistent between different device screen factors.
  5. Capture mobile session traffic using any network trace tool (ex: Charles, Fiddler).
  6. Check for the following request parameters to verify the setup in the a 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.
    • cust_params: should contain any key/values being passed.
    • tag_for_child_directed_treatment: If value is 1, it triggers COPPA behavior.
  7. 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 DFP and -1 when the fill was from an Ad Exchange ad.
    • Header: X-Afma-Ad-Size - contains the size of the creative that served.
Was this article helpful?