targetingUser
Target a banner by user characteristics.
Targeting by user characteristics is a type of targeting where the characteristics for selecting a target audience are determined by an Adfox client. Every characteristic contains a set of values that represent what the site knows about the page or its visitor. The targeting values are sent from the site using the ad tag.
To set up targeting, enable the characteristic and add a list of values.
In the ad tag, add a value or list of values separated by a colon to the puidN
parameter (where N is the characteristic number from 1 to 63) to select ad campaigns targeted by these values.
All values are enabled by default. For this reason, you need to disable v0
— which represents the unknown, not set
value — to ensure that your targeting works correctly. To do this, specify v0=0
in your request.
Request format
https://adfox.yandex.com/api/v1
? object=banner
& action=target
& actionObject=targetingUser
& objectID=<integer>
& isRedefined=<integer>
& criteriaID=<integer>
& vN=<integer>
|
ID of the object that the action is performed on. |
|
Redefine targeting. Acceptable values:
|
|
Characteristic ID. Acceptable values:
|
|
Where N in the parameter name is the ID of a characteristic value. Acceptable values:
All values are enabled by default. For this reason, you need to disable the
|
* Required parameter
Response format
<response>
<status>
<code>{integer}</code>
</status>
</response>
Response parameters
|
Request processing status. A value of |
Sample request and response
Request:
https://adfox.yandex.com/api/v1?object=banner&action=target&actionObject=targetingUser&objectID=474205&criteriaID=1&v0=0&v5345=1&isRedefined=1
Response:
<response> <status> <code>0</code> </status> </response>
Other actions with the object
Read also about other actions with the banner
object:
- Get a list of banners.
- Add a banner.
- Edit a banner.
- Get summary information on targeting at the banner level.
- Get information on banner placement.
- Get statistics on campaigns/banners/placements for the day.
- Target a banner by geography.
- Target a banner by keywords.
- Target a banner by URL.
- Target a banner by gender, age, or income.
- Target a banner by frequency.
- Target a banner by time.
Where N in the parameter name is the ID of a characteristic value.
Acceptable values:
-
0
: Disable. -
1
: Enable.
Required parameter.
ID of the object that the action is performed on.
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 from higher levels and use the parameters set at the current level.
The ID of a characteristic.
Acceptable values: 1≤N≤63
, where N is the characteristic number from 1 to 63 inclusive.