<img src="https://img.shields.io/badge/%20-ENTERPRISE-%23B10031" style="float:left"/><br />

You can configure an active video advertising campaign to target videos with specific metadata. When the line item targeting matches the metadata of the video, the line item becomes eligible to serve.

<br /> <hr />

## Target ads to specific videos

Use the following steps to target specific videos for a campaign:

  1. Set the [custom parameters for the video](πŸ”—ο»Ώ).

  2. Add the [custom parameters to the ad tag](πŸ”—ο»Ώ) to pass the values to your ad server

  3. Set the targeting for advertising campaign line item

<br /> <br />

### Set the video custom parameters

  1. From your <a href="https://dashboard.jwplayer.com/#/content/list" target="_blank">Media Library</a>, click the name of a video. The details page for the video appears. <br />

    ο»Ώ

    If you have a new video, add the video to your library before completing this step.

  2. On the **Basic Information** tab under **Custom Parameters**, add your custom parameters. For example, if the ad targeting is _movie=startrek_, enter _movie_ in the **Key** textbox. Then, enter _startrek_ in the **Value** textbox.

  3. Click **Save**.

<br /> <br />

### Add the custom parameters to the ad tag

  1. From the **Ad Schedules** page, click the name of the ad schedule. The ad schedule detail page appears.

  2. For the specific ad break you need to edit, click **β‹― > Edit**. The ad break properties appear.

  3. At the end of the ad tag, append _&cust_params=_, the custom parameter name, and the macro: `&cust_params=name%3D__item-name__`.<br /><br /> For example: To add _movie=startrek_ to the ad tag, you append `&cust_params=movie%3D__item-movie__` to your ad tag. ​

  4. Click **Done**.

  5. Click **Save**.

<br /> <br />

### Set the targeting for a line item

  1. Open your ad server and find the relevant line item.

  2. Use the JWP custom parameters to set the key-value targeting for the line item. Use the custom parameter **Name** for the key. Use the custom parameter **Value** as the value.<br /><br />For example, if the custom parameter **Name** is _movie_, use this as the targeting key. If the custom parameter **Value** is _startrek_, use this as the targeting value.

<br /> <hr />

## Validate the custom parameter

After adding the custom parameter to the video, the ad tag, and the line item, you should verify that the custom parameter is being passed through the ad tag from JWP to your ad server.

  1. On a page that has the video, open your browser's developer tools panel.

  2. Click on the **Network** tab.

  3. Start the video playback.

  4. Filter the network traffic for the ad tag. If you are using a Google ad tag, you can search for gampad.

  5. Click on the ad tag.

  6. On the **Headers** tab under **Query String Parameters**, locate **cust_params**. You should see your custom targeting listed.

<br />

If you do not see the custom targeting listed, review the steps above for adding the custom parameter to the ad tag. If you still have issues, [submit a support case](πŸ”—ο»Ώ).

<br />