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 output parameter.

Input data

The input data structure in JSON is shown below.

{
   "method": "GetRetargetingGoals",
   "param": {
      /* GetRetargetingGoalsRequest */
      "Logins": [
         (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
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": (long),
         "Name": (string),
         "GoalDomain": (string),
         "Type": (string),
         "Login": (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 tag 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.
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 tag 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

Python

{
   'Logins': ['agrom','larry']
}

PHP

array(
   'Logins' => array('agrom','larry')
)

Perl

{
   'Logins' => ['agrom','larry']
}