Type description goal

Type for description of goal

Attention.

Access tokens will not be accepted in URL parameters starting February 13, 2019. To continue working with the Yandex.Metrica API, set up authorization by passing the token in the HTTP header.

The outdated authorization method will be temporarily disabled on January 23, January 30, and February 6 for maintenance. Authorization using URL parameters will be unavailable on these dates.

Response format

Action goal


{
    "id" :  < int > ,
    "name" :  < string > ,
    "type" :  < goal_type > ,
    "is_retargeting" :  < boolean > ,
    "flag" :  < goal_market_type > ,
    "conditions" : [ {
        "type" :  < goal_condition_type > ,
        "url" :  < string > 
    }, ... ]
}
ParametersDescription
idGoal ID. Specify this parameter when changing and deleting a counter goal.
nameName of goal.
typeGoal type.

Possible values

  • number — view N pages;
  • action — goal type Event.
  • step — multi-step goal;
  • url — match page URL;
is_retargetingIs the goal retargeting?

Possible values

  • 0 ― false (default);
  • 1 ― true.
flagGoal type for Yandex.Market clients.

Possible values

  • basket — “basket”, page visits of basket;
  • order — “order”, order confirmation page.
conditionsList of structures with goal conditions.
ParametersDescription
typeCondition type.

Possible values

  • regexp — matches regular expression;
  • contain — contains;
  • start — begins with;
  • exact — matches;
  • action — special condition type for goals of action type.
urlPage address or part of page for condition.

Response format

Multi-step goal.


{
    "id" :  < int > ,
    "name" :  < string > ,
    "type" :  < goal_type > ,
    "is_retargeting" :  < boolean > ,
    "steps" : [ {
        "id" :  < int > ,
        "name" :  < string > ,
        "type" :  < goal_type > ,
        "is_retargeting" :  < boolean > ,
        "flag" :  < goal_market_type > ,
        "conditions" : [ {
            "type" :  < goal_condition_type > ,
            "url" :  < string > 
        }, ... ]
    }, ... ]
}
ParametersDescription
idGoal ID. Specify this parameter when changing and deleting a counter goal.
nameName of goal.
typeGoal type.

Possible values

  • number — view N pages;
  • action — goal type Event.
  • step — multi-step goal;
  • url — match page URL;
is_retargetingIs the goal retargeting?

Possible values

  • 0 ― false (default);
  • 1 ― true.
stepsList of steps of multi-step goal.
ParametersDescription
idGoal ID. Specify this parameter when changing and deleting a counter goal.
nameName of goal.
typeGoal type.

Possible values

  • number — view N pages;
  • action — goal type Event.
  • step — multi-step goal;
  • url — match page URL;
is_retargetingIs the goal retargeting?

Possible values

  • 0 ― false (default);
  • 1 ― true.
flagGoal type for Yandex.Market clients.

Possible values

  • basket — “basket”, page visits of basket;
  • order — “order”, order confirmation page.
conditionsList of structures with goal conditions.
ParametersDescription
typeCondition type.

Possible values

  • regexp — matches regular expression;
  • contain — contains;
  • start — begins with;
  • exact — matches;
  • action — special condition type for goals of action type.
urlPage address or part of page for condition.

Response format

Goal type depth.


{
    "id" :  < int > ,
    "name" :  < string > ,
    "type" :  < goal_type > ,
    "is_retargeting" :  < boolean > ,
    "depth" :  < long > 
}
ParametersDescription
idGoal ID. Specify this parameter when changing and deleting a counter goal.
nameName of goal.
typeGoal type.

Possible values

  • number — view N pages;
  • action — goal type Event.
  • step — multi-step goal;
  • url — match page URL;
is_retargetingIs the goal retargeting?

Possible values

  • 0 ― false (default);
  • 1 ― true.
depthNumber of pages viewed by user.

Response format

URL goal.


{
    "id" :  < int > ,
    "name" :  < string > ,
    "type" :  < goal_type > ,
    "is_retargeting" :  < boolean > ,
    "flag" :  < goal_market_type > ,
    "conditions" : [ {
        "type" :  < goal_condition_type > ,
        "url" :  < string > 
    }, ... ]
}
ParametersDescription
idGoal ID. Specify this parameter when changing and deleting a counter goal.
nameName of goal.
typeGoal type.

Possible values

  • number — view N pages;
  • action — goal type Event.
  • step — multi-step goal;
  • url — match page URL;
is_retargetingIs the goal retargeting?

Possible values

  • 0 ― false (default);
  • 1 ― true.
flagGoal type for Yandex.Market clients.

Possible values

  • basket — “basket”, page visits of basket;
  • order — “order”, order confirmation page.
conditionsList of structures with goal conditions.
ParametersDescription
typeCondition type.

Possible values

  • regexp — matches regular expression;
  • contain — contains;
  • start — begins with;
  • exact — matches;
  • action — special condition type for goals of action type.
urlPage address or part of page for condition.

Response format

Offline goal type.


{
    "id" :  < int > ,
    "name" :  < string > ,
    "type" :  < goal_type > ,
    "is_retargeting" :  < boolean > 
}
ParametersDescription
idGoal ID. Specify this parameter when changing and deleting a counter goal.
nameName of goal.
typeGoal type.

Possible values

  • number — view N pages;
  • action — goal type Event.
  • step — multi-step goal;
  • url — match page URL;
is_retargetingIs the goal retargeting?

Possible values

  • 0 ― false (default);
  • 1 ― true.

Response format

The Call type of goal.


{
    "id" :  < int > ,
    "name" :  < string > ,
    "type" :  < goal_type > ,
    "is_retargeting" :  < boolean > 
}
ParametersDescription
idGoal ID. Specify this parameter when changing and deleting a counter goal.
nameName of goal.
typeGoal type.

Possible values

  • number — view N pages;
  • action — goal type Event.
  • step — multi-step goal;
  • url — match page URL;
is_retargetingIs the goal retargeting?

Possible values

  • 0 ― false (default);
  • 1 ― true.