Object

AdvertisementAutoPlacement

The object for defining the automatic placement of advertisements.

Properties

bannerType
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.

distanceFromMedia
*

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.

The layout properties for automatically inserted components.

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", "subtitle": "A look at the features of Apple News", "layout": { "columns": 7, "width": 1024, "margin": 75, "gutter": 20 }, "autoplacement": { "advertisement": { "enabled": true, "bannerType": "any", "distanceFromMedia": "10vh", "frequency": 10, "layout": { "margin": 10 } } },}

Relationships

Inherits From

See Also

Dynamic Advertising

Managing Advertisements in Your Article

Set the layout and frequency of ads automatically inserted in an article, and manually suggest specific locations for ad content.

object AutoPlacement

The object for automatically placing components within Apple News Format articles.

object AdvertisingSettings

The object for defining properties that affect the frequency and placement with which banner advertisements and medium rectangle advertisements are automatically placed in your article.

Deprecated