A/B Testing Targeting

This article describes resources that enable you to read and define A/B testing targeting.

Overview

The Oath Ad Platforms DSP supports AB_TESTING targeting for lines serving display and video ads.

If you have created user groups for A/B testing, you can target those user groups to see the results of your testing.

To learn more, see User Groups.

Endpoint

/traffic/lines/{id}/targeting
  • A GET request enables you to view user groups and other target types targeted by the specified line.
  • A POST request enables you to target user groups and other target types with the specified line.

Resource

The targeting resource is the standard Oath Ad Platforms DSP resource for targeting consumers based on their profiles, behaviors, and ad content.

This resource comprises multiple fields that enable you to specify line targeting across many types of targets including the SEGMENT, EXCHANGES, and AB_TESTING target types.

The targeting resource is defined by the following AB_TESTING targeting type-specific fields:

Table 127 Targeting Fields
Field Description Data Type
id Specifies the line ID. integer
userGroupEntry Specifies the user group entry. object

Note

For a complete list of targeting resource fields, see Targeting Object.

Read User Group Targets

Returns targeting information for the specified line.

GET /traffic/lines/{id}/targeting

Parameters

The line targeting endpoint requires one parameter:

Table 128 Read Targeted User Group Parameters
Parameter Parameter Type Description Data Type Required?
id path Specifies the line ID. number Y

Example Request

The line ID parameter is specified in the path of the resource endpoint:

GET /traffic/lines/356777/targeting

Example Response

The response returns information about the target types enabled for the specified line including the userGroupEntry object.

{
  "response": {
    "types": [
      {
        "name": "AB_TESTING",
        "id": 10,
        "isTargeted": true
      }
  ],
  "userGroupEntry": {
        "id": 32659,
        "name": "sg2",
        "userGroupId": 14962,
        "trafficPercent": 56,
        "lowerBound": 0,
        "upperBound": 55
   },
    "errors": null,
    "timeStamp": "2018-01-12T01:57:40Z"
  }

Add/Update User Group Targets

Adds or updates user group targets for the specified line. Consumers may be targeted based on user group membership.

POST /traffic/lines/{id}/targeting

The AB_TESTING targeting type must be enabled in the body of the application/json payload.

Parameters

The line ID is specified in the path of the URL. All other parameters are specified in the body of the application/json payload.

Table 129 Add/Update User Group Target Parameters
Parameter Parameter Type Description Data Type Required?
id path Specifies the line ID. number Y
userGroupEntry body

Specifies the user group ID.

For POST, you need to supply the id of the user group you want to target, not the entire object. To learn more, see User Group Object.

object Y
types body

Specifies an array of targeting types to update, enable, or disable.

To target user groups, the AB_TESTING targeting type must be enabled.

To learn more, see Targeting Types.

object Y

Example Request

The line ID is specified in the path of the resource endpoint:

POST traffic/lines/365277/targeting/

All other parameters are specified in the body of the application/json payload.

{
  "userGroupEntry": {
    "id": 32658
  },
  "types": [
    {
      "name": "AB_TESTING",
      "isTargeted": true
    }
  ]
}