The object for defining the automatic placement of advertisements.
Technology
- Apple News Format 1.9+
Properties
banner Type
string
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.
distance From Media
*
The minimum required distance between automatically inserted advertisement components and media, such as Video and Photo. To maintain a minimum distance of half a screen height from your media content, use a value of around 50vh
. For more information, see Specifying Measurements for Components.
enabled
boolean
A Boolean that defines whether placement of advertisements is enabled.
frequency
integer
A number from 0
to 10
, defining the frequency for automatically inserting BannerAdvertisement components into articles.
Setting this value to 1
automatically inserts a banner advertisement in the first possible location below the screen bounds.
Setting this value to 2
inserts a banner advertisement in the first possible location below the screen bounds, and another between the first banner advertisement and the end of the article.
Increasing the frequency value increases the frequency of banner advertisements below the first screen bounds.
Setting this value to 0,
or omitting it, results in no inserted advertisements.
layout
The layout properties for automatically inserted components.
Discussion
Use the Advertisement
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",
"subtitle": "A look at the features of Apple News",
"layout": {
"columns": 20,
"width": 1024,
"margin": 60,
"gutter": 20
},
"autoplacement": {
"advertisement": {
"enabled": true,
"bannerType": "any",
"distanceFromMedia": "10vh",
"frequency": 10,
"layout": {
"margin": 10
}
}
},
…
}