targetingBehavior

Target a campaign by behavior.

Request format

https://adfox.yandex.com/api/v1
  ? object=campaign
  & action=target
  & actionObject=targetingBehavior
  & objectID=<integer>
  & behaviorMode=<integer>
  & [UTLogic=<integer>]
  & [UTNotN=<integer>]
  & [categoryIDN=<integer>]
  & [visitsN=<integer>]
  & [timeoutN=<integer>]
  & [UTSVisitsN=<integer>]
  & [UTSTimeoutN=<integer>]

objectID*

ID of the object that the action is performed on.

behaviorMode*

Use targeting by behavior for users that are labeled using one of the following:

  • 0: A permanent category if the audience is labeled by assigning categories to a site, section, or placement.
  • 1: A temporary category if the audience is labeled using action tracing points.

UTLogic

In targeting by behavior, the advertiser sets the conditions when ad display is allowed.

There are two ways conditions can be applied: any of the given conditions is true and all specified conditions are true. You can set up to 9 conditions. Each condition includes 4 parameters, where N in the parameter name is the condition number from 1 to 9:

  • UTNotN: Labeled/unlabeled users.
  • categoryIDN: If the user is labeled, which category is used.
  • visitsN: How many times the user is labeled.
  • timeoutN:When the user was last labeled.

Specify the conditional logic for serving campaign banners to users.

Acceptable values:

  • 0: Any of the given conditions is true.
  • 1: All specified conditions are true.

UTNotN

Select the target audience: labeled or unlabeled users, where N in the parameter name is the condition number from 1 to 9.

Acceptable values:

  • 0: Condition not set.
  • 1: Labeled users.
  • 2: Unlabeled users.

Default value: 0.

categoryIDN

Specify which category the user must be labeled with, where N in the parameter name is the condition number from 1 to 9.

Acceptable values: Category ID.

Default value: 0 — not set if targeting is for unlabeled users.

See also:

visitsN

Specify how many times the user must be labeled, where N in the parameter name is the condition number from 1 to 9.

Acceptable values: an integer from 1 to 2,147,483,647.

timeoutN

Specify how many days ago the user must be labeled last, where N in the parameter name is the condition number from 1 to 9.

Acceptable values: an integer from 1 to 2,147,483,647.

UTSVisitsN

Specify the minimum number of visits, where N is the condition number.

Acceptable values: an integer from 1 to 2,147,483,647.

UTSTimeoutN

The last visit was no later than the number of days specified, where N is the condition number.

Acceptable values: an integer from 1 to 2,147,483,647.

* Required

Response format

<response>
<status>
  <code>{integer}</code>
</status>
</response>

Response parameters

code

Request processing status. For the key, see Error handling.

Sample request and response

Request:

https://adfox.yandex.com/api/v1?object=campaign&action=target&actionObject=targetingBehavior&objectID=474205&behaviorMode=1

Response:

<response>
<status>
  <code>0</code>
</status>
</response>

Other actions with the object

See more actions with the campaign object: