Passing Keywords

Overview

You can pass keywords either through the Decision API request, through JS ad calls, or through a 3rd party CMS.

Sending Keywords via Decision API

In the Decision API Request, include every keyword that you'd like to target on under the keywords property.

As it's an array data type, use brackets, as well as quotation marks around each keyword and commas to separate.

Here's a sample Decision API request sending the keywords of "bunny", "tacocat", and "business":

{
  "placements": [
    {
      "divName": "homepage",
      "networkId": 123,
      "siteId": 456,
      "adTypes": [5]
      }
  ],
  "keywords": ["bunny", "tacocat", "business"],
  "ip": "10.123.123.123"
}

Passing Keywords Through JavaScript Ads

  1. Navigate to the web page with your ad placement code on it.
  2. Pass the keywords in the ad call of the placement by adding the code line ados_setKeywords() to the ad code. An example with the keywords "dodge," "truck," and "SUV" might look like this:

ados_setKeywords('dodge, truck, SUV'); ados_add_placement(1720, 14998, "azk39134", 4).setZone(2992);

Adding ados_setKeywords to your ad tags will set keywords for the entire ad request (which includes all of the placements called in the ad tags).

This means that if you set a keyword for one placement, all of the placements in the tags will also be set for that keyword. To target a specific placement with a keyword, use multiple sets of ad tags, or add ados_load(); after each placement you need to set with a keyword. To set no keyword at all, use ados_setKeywords(""); after the placement.

Passing from CMS

When using a CMS, such as WordPress, there are categories, tags, and other custom fields that are used through the CMS backend and applied to pages. As such, in WordPress you are able to pass the tags that are added to a new page to the ad request. That way, once the page is created and tags, categories, and other elements are applied to it, you can have code automatically add those tags or keywords directly to the ad call. Once this is done, the flight you just targeted to specific keywords will be able to target the correct pages to serve the ads to.