Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface NitroAdOptions

Placement options

Hierarchy

  • NitroAdOptions

Index

Properties

Optional acceptable

acceptable: undefined | false | true

Set this to create an acceptable ads placement. Default is false.

deprecated

No longer used. Any ad placements with this defined will be ignored.

Optional anchor

Used with anchor format to specify if anchor should be at the top or bottom of screen. Defaults is bottom.

Optional anchorBgColor

anchorBgColor: undefined | string

Used with anchor format to define the background color. Default is rgb(255 255 255 / 80%)

Optional anchorPersistClose

anchorPersistClose: undefined | false | true

Used with anchor to specify that the close action should be persistent for the entire browser session. Default is false, meaning clicking on close will only close the anchor for the current page.

Optional className

className: undefined | string

Used with formats that generate ad placements on the page without static holders to provide css selectors.

contentRating

contentRating: string

Used to filter demand by content safety.

Optional delayLoading

delayLoading: undefined | false | true

Delay loading until DOMContentLoaded. Recommended only for responsive placements when external stylesheets must be loaded first to determine size. This delays the start of ad auction, which may slightly reduce ad performance. Default is false.

Optional demo

demo: undefined | false | true

Display a static placeholder instead of making ad calls, for testing.

Optional floating

floating: FloatingOptions

Settings for floating format.

format

Placement format. Default is display.

Optional frequencyCap

frequencyCap: undefined | number

Duration in seconds for per-user frequency cap. If set, this placement will only be shown to the user every frequencyCap seconds.

Optional geoAllow

geoAllow: string[]

Array of 2-letter country/region codes. If set, this placement will only be shown to users in these regions. In addition to ISO 3166-1 alpha-2 codes, 'XX' is unknown, and 'T1' is tor users.

Optional geoDeny

geoDeny: string[]

Array of 2-letter country/region codes. If set, this placement will not be shown to users in these regions. In addition to ISO 3166-1 alpha-2 codes, 'XX' is unknown, and 'T1' is tor users.

Optional group

group: undefined | string

Optional internal identifier. This is currently only used to group ad placements within the reporting of our protection layer.

Optional interstitial

interstitial: InterstitialOptions

Options for interstitial placements.

example
interstitial: {
    triggers: {
        unhideWindow: true,
    },
},

Optional keywords

keywords: undefined | string

Comma separated list of keywords describing the page. Use this to override the site keywords setting for placements on specific parts of site. Example: 'video games, fps, doom'.

Optional mediaQuery

mediaQuery: undefined | string

Specifies an optional media query that must be matched for an ad placement to display.

Optional outstream

outstream: OutstreamOptions

Outstream video support. Default is 'auto'.

Optional pageInterval

pageInterval: undefined | number

Optional parameter used with article format to specify how many pages of content should appear between ad placements. Defaults to 1.

Optional rail

rail: undefined | string

Used with rail format to specify if the rail should be placed on the left or right side of the screen. Default is left.

Optional railCollisionWhitelist

railCollisionWhitelist: string[]

Used with rail format to specify any elements that should be ignored when detecting collisions for the rail. These can be class names (.className) or ids (#id). The wildcard * can be used to ignore all collisions.

Optional railDistance

railDistance: undefined | number

Used with rail format to specify the amount of total amount of pixels the side rail will scroll with the user, set 0 for as far as possible.

Optional railOffsetBottom

railOffsetBottom: undefined | number

Used with rail format to specify the amount of pixels between the bottom of the page and where the ad stops scrolling.

Optional railOffsetTop

railOffsetTop: undefined | number

Used with rail format to specify the amount of pixels between the top of the page and where the ad becomes sticky.

Optional railSpacing

railSpacing: undefined | number

Used with rail format to specify the amount of pixels on the left and/right of the page between the ad and the edge of the screen. Default is 10

Optional railStack

railStack: undefined | false | true

Used with rail format to change the format to 2x 300x250 stacked. If true, the sizes option will be ignored. Default is false

Optional refreshDisabled

refreshDisabled: string[]

List of bidders for whom refreshing should be disabled. If specified, refreshing will be stopped when one of these is filled.

Optional refreshLimit

refreshLimit: undefined | number

The maximum number of times an ad placement can be refreshed per page view.

Optional refreshTime

refreshTime: undefined | number

The amount of time in seconds that must pass before another auction is run and the placement renders a new ad.

Optional refreshVisibleOnly

refreshVisibleOnly: undefined | false | true

Only refresh when placement is in view. Default is true.

Optional renderVisibleOnly

renderVisibleOnly: undefined | false | true

Delay initial ad rendering until the placement's dom element is about to enter view. visibleMargin can be used to adjust how much buffer margin is used.

Optional report

Optional rewarded

rewarded: RewardedOptions

sizes

sizes: [][]

List of valid sizes for placement. Sizes should be specified as [x, z].

Optional skipBidders

skipBidders: string[]

List of bidders to be excluded from auction.

Optional stickyStackLimit

stickyStackLimit: undefined | number

Used with sticky-stack format to specify the maximum amount of ads that will be rendered in the column. If the maximum is reached, the final ad will scroll with the user until the end of page without creating any additional units.

Optional stickyStackOffset

stickyStackOffset: undefined | number

Used with sticky-stack format to specify the amount of space (in pixels) between the ad and the top of the screen when it's sticky, and also the space in between ads that are swapping.

Optional stickyStackResizable

stickyStackResizable: undefined | false | true

Used with sticky-stack format to specify if the stack should add more placements if more space becomes available. Default is false.

Optional stickyStackSpace

stickyStackSpace: undefined | number

Used with sticky-stack format to specify the amount of space between ad units as a multiple of the total viewport height (minimum 1.25)

targeting

Optional placement targeting information. This can be used to specify tags such as content category or other values which can be used for ad unit targeting. The key must be a string, and the value can be a single string or number, or an array of either strings or numbers.

example
targeting: {
    location: 'top',
    categories: ['games', 'sports'],
},

Optional title

title: undefined | string

Override default title attribute of placement iframe.

Optional video

Optional visibleMargin

visibleMargin: undefined | number

The off-screen margin in pixels, used to determine when a placement is about to enter view. Default is 200.

Generated using TypeDoc