Monetize your content

Last Updated: May 29, 2019

JW Player's advertising features help you to monetize your content with video ads while keeping your viewers engaged. JW Player supports standard ad types (VAST, VPAID, VMAP), accommodates third-party technologies (Google IMA SDK, FreeWheel SDK), and supports any ad server that returns the previously-mentioned ad types. You can customize your viewers' ad experiences with ad rules, ad breaks, and localized player messaging. And with Video Player Bidding, you can improve the yield from programmatic providers.

To monetize your content with advertising, you must have a JW Player Business or Enterprise license. Please contact our team to upgrade your account.


Get the required items

To begin running advertising through your JW Player, you need the items in the following table.

Item Description
An embedded JW Player A JW Player with content

If you have not already embedded a player or need to embed a new player, review Add an HTML5 player.
JW Player Business or Enterprise license Account plan that enables access to advanced video player features like advertising

Upgrade to a Business or Enterprise license if you would like to access JW Player's advertising features.
An ad tag URL of the ad tag for VAST and IMA plugins, or a string placeholder for FreeWheel

The ad tag should be an active tag generated from an advertising platform in a supported ad format.


Add a pre-roll ad break to a player

The most basic advertising implementation is to run a single VAST ad tag as a pre-roll before each playlist item.

If you are using a cloud-hosted player, you can create an ad schedule in your JW Player dashboard and associate the ad schedule with your cloud-hosted player. The ad schedule will play in every instance of the embedded player.


Use the following steps to add a pre-roll to an embedded player:

  1. Within setup() of an embedded JW Player, add an advertising object.
  2. Define the client property within the advertising object as vast (VAST).
  3. Define the adscheduleid property within the advertising object. Assign a randomly-generated, eight character, alpha-numeric value to this property.
  4. Define a schedule array within the advertising object. At the minimum, you must assign an ad tag to the tag property. You can also assign the URL of a VMAP tag to the schedule property.
As a shortcut, you can define advertising.tag (String) to create a single pre-roll ad break. If you use this shortcut, you cannot add multiple ad breaks.

The advertising.tag property and advertising.schedule[] property cannot be used in the same advertising object.


jwplayer("myElement").setup({
  playlist: "https://cdn.jwplayer.com/v2/playlists/a12bc3D4", 
  advertising: {
    client: "vast",
    adscheduleid: "Az87bY12",
    schedule: [
      {
        tag: "https://www.domain.com/adtag.xml"
      }
    ]
  }
});

You can build on this basic implementation by adding multiple ad breaks, defining ad rules or configuring Video Player Bidding.


Add multiple ad breaks to a player

Use the following steps to add multiple ad breaks to the previous VAST pre-roll example:

  1. Define an additional index within the advertising.schedule array.
  2. Assign an ad tag to the tag property.
  3. When defining the offset property, choose one of the following values to schedule a mid-roll or post-roll ad:

    Mid-roll
      - {number}: (Number) Ad plays after the specified number of seconds.
      - {timecode}: (String) Ad plays at a specific time, in hh:mm:ss:mmm format.
      - {xx%}: (String) Ad plays after xx% of the content has played.

    Post-roll
      - post: (String) Ad plays after the content.

jwplayer("myElement").setup({
  playlist: "https://cdn.jwplayer.com/v2/media/123acb4e",
  advertising: {
    client: "vast",
    adscheduleid: "Az87bY12",
    schedule: [
      {
        offset: "pre",
        tag: "https://www.domain.com/adtag.xml"
      },
      {
        offset: 10,
        tag: "https://www.domain.com/adtag-mid-roll1.xml"
      },
      {
        offset: "00:00:15:000",
        tag: "https://www.domain.com/adtag-mid-roll2.xml"
      },
      {
        offset: "25%",
        tag: "https://www.domain.com/adtag-mid-roll3.xml"
      },
      {
        offset: "post",
        tag: "https://www.domain.com/adtag-post-roll.xml"
      }
    ]
  }
});

You can build on this basic implementation by defining ad rules or configuring Video Player Bidding.



Use this form to provide your feedback.