---
title: AdvertisementAutoPlacement
framework: applenewsformat
role: symbol
role_heading: Object
path: applenewsformat/advertisementautoplacement
---

# AdvertisementAutoPlacement

The object for defining the automatic placement of advertisements.

## Declaration

```data
object AdvertisementAutoPlacement
```

## Properties

bannerType: A specific banner type that should be automatically inserted based on the frequency value. If advertisement placement is enabled, only banners of the defined size type are inserted. conditional: An instance or array of automatic placement properties that can be applied conditionally, and the conditions that cause them to take effect. distanceFromMedia: The minimum required distance between automatically inserted advertisement components and media, such as Video and Photo. Advertisements will show next to media if distanceFromMedia is not specified. To maintain a minimum distance of half a screen height from your media content, use a value of around 10vh. For more information, see Specifying Measurements for Components. enabled: A Boolean that defines whether placement of advertisements is enabled. frequency: A number from 0 to 10, defining the frequency for automatically inserting ads into articles. Setting this value to 1 automatically inserts a dynamic advertisement in the first possible location below the screen bounds. Setting this value to 2 inserts a dynamic advertisement in the first possible location below the screen bounds, and another between the first dynamic advertisement and the end of the article. Increasing the frequency value increases the frequency of dynamic advertisements below the first screen bounds. Setting this value to 0, or omitting it, results in no advertisements. layout: The layout properties for automatically inserted components.

## Mentioned in

Apple News Format Release Notes

## Discussion

Discussion Use the AdvertisementAutoPlacement object to insert dynamic advertisements between Body, Chapter, Section, or Container components in an article. Example {   "version": "1.9",   "identifier": "SampleArticle",   "language": "en",   "title": "Apple News",   "layout": {     "columns": 20,     "width": 1024,     "margin": 60,     "gutter": 20   },   "autoplacement": {     "advertisement": {       "enabled": true,       "bannerType": "any",       "distanceFromMedia": "10vh",       "frequency": 10,       "layout": {         "margin": 10       }     }   },   … }

## Relationships

### Inherits From

- [AutoPlacement](applenewsformat/autoplacement.md)

## See Also

### Dynamic Advertising

- [Managing Advertisements in Your Channel](applenews/managing-advertisements-in-your-channel.md)
- [AutoPlacement](applenewsformat/autoplacement.md)
- [AdvertisingSettings](applenewsformat/advertisingsettings.md)
