The placement creation section describes how the following configuration options are used. Listed below are the available configuration options for your convenience, however, it's recommended that you use the setup guide on your site entry list to create placements.

anchor

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

<script type="text/javascript">
  window["nitroAds"].createAd("top-anchor", {
    format: "anchor",
    anchor: "top"
  });
</script>

demo

If enabled, demo mode will load a static image instead of a live ad. Earnings and tracking for the placement are disabled when in demo mode. This option is used while your site is in local development since we strongly discourage attempting to run an ad auction in a non-production environment.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    demo: true
  });
</script>

format

Note that video formats are not available for your sites by default. Please discuss this with your NitroPay account representative if you would like to serve video ads.

  • display: Traditional static/animated ad format 
  • anchor: Dismissable ad unit that is anchored in place. Default’s to mobile-only 320x50 at bottom of screen. 
  • article: Create multiple ad units interspersed within long-form content 
  • sticky-stack: See the Sticky Stack documentation.
  • video-ac: AnyClip video unit 
  • video-ds: DistroScale video unit 
  • video-inread: Video unit that is embedded in the page 
  • video-slider: Video unit that slides in from the bottom right of the page and scrolls with the user until finished or dismissed
<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    format: "anchor"
  });
</script>

frequencyCap

The amount of time (in seconds) that must pass before a user can be shown another ad in this placement. If not configured or set to 0 the frequency cap will be ignored.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    frequencyCap: 3600 // 1 hour
  });
</script>

mediaQuery

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

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    mediaQuery: "(min-width: 1025px)"
  });
</script>

pageInterval

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

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    format: "article",
    pageInterval: 2
  });
</script>

refreshDisabled

When a bidder wins an auction and their bidder key exists in this array, ad refreshing for the placement will stop early.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    refreshDisabled: ["adsense"]
  });
</script>

refreshLimit

Sets the amount of times an ad unit will run a new auction in the placement to render a new ad for a user that has spent more than the refreshTime on the page. For policy reasons, we don’t allow values greater than 10.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    refreshLimit: 10
  });
</script>

refreshTime

Sets the amount of time in seconds that must pass before another auction is run and the placement renders a new ad. For policy reasons, we don’t allow values less than 30 seconds. See the related refreshLimit option.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    refreshTime: 30,
  });
</script>

refreshVisibleOnly

When enabled, the placement will only refresh ad placements when the ad is visible on the user’s screen. Exchanges track the overall viewability of ads on your page, and some advertisers look at sites with higher viewability scores more favorably when allocating their spend.

Whether or not you should use this option depends on the layout of your site. Your NitroPay account representative can review your layout and provide feedback for optimal usage.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    refreshVisibleOnly: true
  });
</script>

renderVisibleOnly

When enabled, the placement will only run an auction and render an ad unit when the DOM element for your ad is visible on the user’s screen. Exchanges track the overall viewability of ads on your page, and some advertisers look at sites with higher viewability scores more favorably when allocating their spend.

Whether or not you should use this option depends on the layout of your site. Your NitroPay account representative can review your layout and provide feedback for optimal usage.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    renderVisibleOnly: true
  });
</script>

report

When reporting is enabled, a link will appear with the wording and in the position of your choice. When a user clicks the report link, the ad is removed from their DOM and replaced with a form where they can submit basic information on why they are reporting it.

Reports are a great metric for the overall satisfaction in your content/ad ratio. It’s also an invaluable tool our quality team uses to identify and disable problematic ad campaigns.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    report: {
      enabled: true,
      wording: "Report Ad",
      position: "bottom-right"
    }
  });
</script>

sizes

When you specify an array of pixel dimensions such as [[728, 90], [970, 90]] (each array is width in the first index and height in the second) then only ads of those specific sizes will bid.

The most common and supported sizes are:

  • 728x90
  • 300x250
  • 320x50
  • 160x600
  • 300x600
  • 970x90
  • 970x250
<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    sizes: [
      [300, 250],
      [300, 600],
      [120, 600],
      [160, 600],
      [320, 50]
    ]
  });
</script>

skipBidders

Bidders can be (at your request, or our determination) disabled at the site level for all placements regardless of what is configured here. This option allows you to expressly disable one or more bidders on individual placements by providing their bidder key in the array of strings.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    skipBidders: [
      "aol",
      "appnexusAst",
      "brealtime",
      "conversant",
      "districtm",
      "ix",
      "openx"
    ]
  });
</script>

stickyStackLimit

Only applicable with the sticky-stack format.

This option defines 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.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    format: "sticky-stack",
    stickyStackLimit: 5
  });
</script>

stickyStackOffset

Only applicable with the sticky-stack format.

This option defines 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.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    format: "sticky-stack",
    stickyStackOffset: 25
  });
</script>

stickyStackSpace

Only applicable with the sticky-stack format.

This option defines (as a multiplier) the amount of screen heights that will be scrolled before the next ad comes into view. For example, if the viewport is 900px tall and you set this option to 2.5, the ad must stick and then scroll 2,250px before the next ad pushes it off the screen.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    format: "sticky-stack",
    stickyStackSpace: 2.5
  });
</script>

title

Optional parameter that may be used to change the title attribute of iframes created to show ads.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    title: "Banner Ad"
  });
</script>

visibleMargin

When used with renderVisibleOnly or refreshVisibleOnly, this is the off-screen margin used to determine when an ad should begin loading.

By default, this is set to 200 pixels, to allow some time for an ad to load as the user scrolls down the page.

<script type="text/javascript">
  window["nitroAds"].createAd("placement-1", {
    visibleMargin: 250
  });
</script>

Did this answer your question?