Android & iOS app code for native

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 programmatic or traditional ads.

Native ads with a width or height smaller than 32 dp (Android) or 32 pts (iOS) won’t serve when using the “Android & iOS app code” option. Ads this small can be difficult to see or interact with and may adversely affect the display quality of advertiser assets.

For native video ads, the main asset MediaView must be at least 120x120 dp (Android) or 120x120 pts (iOS). Ads with main asset MediaViews smaller than this won't serve video demand.

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. (Optional) Enter your app name in the "OMID partner name" field to enable Open Measurement.
  3. Click Add variable.
  4. Select the type and settings for the variable.
  5. In the “Variable” pop-up, click Continue.
  6. 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 helpful?
How can we improve it?