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)
         ...
      ]
   }
}
ParameterDescriptionRequired
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.

ParameterDescription
RetargetingGoal object
GoalIDID of the goal or segment.
NameName of the goal or segment.
GoalDomainThe 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.
LoginThe 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']
}