targetingBehavior
Target a campaign on the placement by behavior.
Request format
https://adfox.yandex.com/api/v1
? object=campaign
& action=targetPlace
& actionObject=targetingBehavior
& objectID=<integer>
& placeID=<integer>
& isRedefined=<integer>
& behaviorMode=<integer>
& [UTLogic=<integer>]
& [UTNotN=<integer>]
& [categoryIDN=<integer>]
& [visitsN=<integer>]
& [timeoutN=<integer>]
& [UTSVisitsN=<integer>]
& [UTSTimeoutN=<integer>]
|
ID of the object that the action is performed on. |
|
Placement ID. |
|
Redefine targeting. Acceptable values:
|
|
Use targeting by behavior for users that are labeled using one of the following:
|
|
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:
Specify the conditional logic for serving campaign banners to users. Acceptable values:
|
|
Select the target audience: labeled or unlabeled users, where N in the parameter name is the condition number from 1 to 9. Acceptable values:
Default value: |
|
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: Default value: See also: |
|
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: |
|
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: |
|
Specify the minimum number of visits, where N is the condition number. Acceptable values: |
|
The last visit was no later than the number of days specified, where N is the condition number. Acceptable values: |
* Required
Response format
<response>
<status>
<code>{integer}</code>
</status>
</response>
Response parameters
|
Request processing status. For the key, see Error handling. |
Sample request and response
Request:
https://adfox.yandex.com/api/v1?object=campaign&action=targetPlace&actionObject=targetingBehavior&objectID=474205&behaviorMode=1&placeID=321&isRedefined=1
Response:
<response> <status> <code>0</code> </status> </response>
Other actions with the object
See more actions with the campaign
object:
- Add a campaign.
- Get a list of campaigns.
- Delete a campaign.
- Edit a campaign.
- Get a list of campaign banners.
- Place a campaign on a site, a site section, or a placement.
ID of the object that the action is performed on.
Placement ID.
Redefine targeting.
Acceptable values:
-
0
: Inherit targeting settings from a higher level. Level hierarchy from top to bottom:- Campaign.
- Campaign on the site.
- Campaign in the site section.
- Campaign on the placement.
- Banner.
-
1
: Cancel targeting settings at higher levels and use the settings of the current level.
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.
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.
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
.
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:
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
.
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
.
Specify the minimum number of visits, where N is the condition number.
Acceptable values: an integer from 1 to 2,147,483,647
.
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