Android & iOS app code

You can style a native ad directly in Android or iOS app code. This is a good choice for sophisticated app developers who want full control of their rendering in apps. The resulting native creatives can serve as traditional ads; contact us to join the beta for programmatic eligibility.

Navigate to the App code design editor

  1. Sign in to Google Ad Manager.
  2. Click Delivery and then Native
  3. Click Create native ad.
  4. Click Select in the "Android & iOS app code" box.
    The "Define ad settings" page appears.

Define ad settings

You have the option to create a custom native ad format for traditional ads. However, creating and using a custom format will prevent you from serving programmatic ads.

To serve programmatic ads, or to select an existing custom format for traditional ads, skip “Create a custom native format” and move to “App implementation”.

Create a custom native format

Formats contain the variables that make up the content of your ad, such as a headline, image, body, app icon, and call to action.

  1. Enter an internal Name and Description for the new custom native ad format.
    This is the name that will appear as an option when selecting a native ad format for a new creative.
  2. Click Add variable.
  3. Select the type and settings for the variable.
  4. In the “Variable” pop-up, click Continue.
  5. Add as many variables as needed.

App implementation

  1. Import the Google Mobile Ads SDK (for Android or iOS), if you haven’t already.
  2. Use the Google Mobile Ads SDK (for Android or iOS) to request native ads from your app. Your mobile developer:
    • Defines a handler that receives the ads’ fields and can render the content as they choose.
    • Can pre-fetch native creatives to minimize latency for end users.
    • Can request multiple native ad formats in a single ad request; Ad Manager will select a native creative from any of the requested formats.
    • Can have banners compete with native ads to maximize performance (for Android or iOS).
  3. Review the native ads creative guidelines when editing app code.
Was this article helpful?
How can we improve it?