Create an SSAI strategy

Learn how to set up an SSAI strategy and configure its settings

SSAI strategies allow you to tailor server-side ad experiences for different viewers by defining logic that determines which ad config is delivered during SSAI stitching.

Using the strategy editor, you can create rules based on request attributes, such as query parameters, or run A/B tests to compare ad performance across different ad configs.



Prerequisites

Item Description
Account entitlements Entitlements to unlock feature access:
  • Server-side ad insertion
  • SSAI strategies

For more information, please contact your account representative.
Ad config ID Unique identifier of an ad config

Follow these steps to obtain an ad config ID:
  1. On the Advertising page, click the Ad config tab.
  2. In the ID column, click to copy the ID of your desired ad config.
If you have not already, create an ad config.

NOTE: In a strategy, the ad config ID is used to present your viewer with a specific advertising experience. While you can build the strategy without an ad config ID, it will only show ads if an ad config ID is present.


Create an SSAI strategy

Ad strategy details page

Ad strategy details page

Follow these steps to create an SSAI strategy from your JWX dashboard:

  1. On the Advertising page, under the Ad strategy tab, click Create ad strategy. The ad strategy details page appears.

  2. Enter a Name for the ad strategy.

  3. In the JSON code editor, define your strategy.

  4. Click Save. The new SSAI strategy appears in the list on the Ad strategy tab, along with its strategy ID.

  5. In the row of a strategy, in the ID column, click (copy icon). The strategy ID is copied to your clipboard.

  6. In your SSAI manifest request, add the strategy ID as the value for your ad_config_id. This activates the strategy.

    https://cdn.jwplayer.com/v2/sites/{site_id}/media/{media_id}/ssai.{manifest_extension}?ad_config_id={strategy_id}
    

The new SSAI strategy is now ready to be applied to a viewer session.



Define a strategy

A strategy is composed of a JSON rules array. Each rule contains:

  • A predicates object, defining the conditions that must be met for a viewer to receive an ad experience
  • A weight object, defining the ratio of traffic to direct to the ad experience
  • An action object, defining which ad config to deliver under the predicate’s conditions
{
  "rules": [
    {
      "predicates": [
        { "key": "query/example-param", "op": "equals", "value": "true" }
      ],
      "weight": 2,
      "action": {
        "ad_config_id": "example_config_A"
      }
    },
    {
      "predicates": [
        { "key": "query/example-param", "op": "not-equals", "value": "true" }
      ],
      "weight": 1,
      "action": {
        "ad_config_id": "example_config_B"
      }
    }
  ]
}

Predicates

Field Description
key Query parameter passed in the manifest request
op Comparison operator for the key and value

Possible values:
  • equals
  • not-equals
  • contains
  • not-contains
value Data the key must match for the rule to apply

Weight

Field Description
weight Numeric value that determines how much traffic a rule receives relative to other rules

SSAI uses weight to proportionally split traffic across matching rules, so higher values receive a larger share of requests. For example, weights of 2 and 1 result in an approximate 2:1 traffic split (or 67% and 33%).

Action

Field Description
ad_config_id Unique identifier of the ad config that should be broadcast to the viewer



© 2007- Longtail Ad Solutions, Inc.