Documentation
API version 4 and Live 4
Methods
Disabled methods

GetRetargetingGoals (Live)

Returns IDs of available goals and segments.

A direct advertiser can get the goals and segments that are available to delegates.

An advertising agency can get the goals and segments that are available to its clients.

New in the Live 4 version

Added the Type
[no-highlight[

Type of object:

  • goal — Yandex.Metrica goal.
  • segment — Yandex.Metrica segment.
  • audience_segment — Yandex.Audience segment.
]no-highlight]
output parameter.

Input data

The input data structure in JSON is shown below.

{
   "method": "GetRetargetingGoals",
   "param": {
      /* GetRetargetingGoalsRequest */
      "Logins
[no-highlight[

The parameter is used only when making the request on behalf of an advertising agency. Use this parameter to specify an array of client usernames (no more than 100) that you need to get a list of goals and segments for. If the parameter is omitted, the error message 71 is returned. If you specify a non-existing username or a username that does not belong to one of the agency‘s clients, the error message 54 is returned.

For direct advertisers, this parameter is ignored when attempting to set it, and the method returns the goals and segments that are available to at least one of the advertiser‘s delegates.

Required

For advertising agencies

]no-highlight]
": [ (string) ... ] } }
Parameter Description Required
GetRetargetingGoalsRequest object
Logins

The parameter is used only when making the request on behalf of an advertising agency. Use this parameter to specify an array of client usernames (no more than 100) that you need to get a list of goals and segments for. If the parameter is omitted, the error message 71 is returned. If you specify a non-existing username or a username that does not belong to one of the agency's clients, the error message 54 is returned.

For direct advertisers, this parameter is ignored when attempting to set it, and the method returns the goals and segments that are available to at least one of the advertiser's delegates.

For advertising agencies

Output data

The output data structure in JSON is shown below.

{
   "data": [
      {  /* RetargetingGoal */
         "GoalID
[no-highlight[

ID of the goal or segment.

]no-highlight]
": (long), "Name
[no-highlight[

Name of the goal or segment.

]no-highlight]
": (string), "GoalDomain
[no-highlight[

The domain that the Yandex.Metrica counter is installed on.

]no-highlight]
": (string), "Type
[no-highlight[

Type of object:

  • goal — Yandex.Metrica goal.
  • segment — Yandex.Metrica segment.
  • audience_segment — Yandex.Audience segment.
]no-highlight]
": (string), "Login
[no-highlight[

The username of the client this goal or segment belongs to.

]no-highlight]
": (string) } ... ] }

Parameters are described below.

Parameter Description
RetargetingGoal object
GoalID ID of the goal or segment.
Name Name of the goal or segment.
GoalDomain The domain that the Yandex.Metrica counter is installed on.
Type

Type of object:

  • goal — Yandex.Metrica goal.
  • segment — Yandex.Metrica segment.
  • audience_segment — Yandex.Audience segment.
Login The username of the client this goal or segment belongs to.

Examples of input data

{
   'Logins': ['agrom','larry']
}
array(
   'Logins' => array('agrom','larry')
)
{
   'Logins' => ['agrom','larry']
}