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
- Sign in to Google Ad Manager.
- Click Delivery Native
- Click Create native ad.
- Click Select in the "Android & iOS app code" box.
The "Define ad settings" page appears.
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.
- 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.
- Click Add variable.
- Select the type and settings for the variable.
- In the “Variable” pop-up, click Continue.
- Add as many variables as needed.
- Import the Google Mobile Ads SDK (for Android or iOS), if you haven’t already.
- 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).
- Review the native ads creative guidelines when editing app code.