List of goals

Returns information about counter goals.

Request

GET

https://api-metrica.yandex.net/management/v1/counter/{counterId}/goals

Path parameters

Name

Description

counterId*

Type: integer<int32>

ID of the counter for which you want to get a list of goals.
Example: 2215573

Query parameters

Name

Description

callback

Type: string

Callback function that processes the API response.

useDeleted

Type: boolean

Information on deleted goals.

Default: false

Responses

200 OK

OK

Body

application/json
{
    "goals": [
        {
            "id": 0,
            "name": "string",
            "type": "string",
            "default_price": 0,
            "goal_source": "string",
            "is_favorite": false
        }
    ]
}

Name

Description

goals

Type: GoalE[]

Counter goals.

GoalE

Name

Description

name*

Type: string

Goal name.

Min length: 0

Max length: 255

type*

Type: string

Goal type:

  • url: Pageviews.
  • number: Number of views.
  • step: Multi-step goal.
  • action: JavaScript event.
  • phone: Click on phone number.
  • email: Click on email.
  • payment_system: Payment system.
  • messenger: Click-through to a messenger.
  • file: File download.
  • search: Site search.
  • social: Click-through to social media accounts.
  • visit_duration: Session duration.

default_price

Type: number<double>

Default goal cost.

goal_source

Type: string

Indicates how the goal was created:

  • user: The goal was created by a Yandex Metrica user.
  • auto: The goal was created automatically. Such goals include automatic goals and the Call goal (created when passing call data).

id

Type: integer<int64>

ID of the goal. Specify this parameter when changing and deleting a counter goal.

is_favorite

Type: boolean

Whether the goal is favorite:

  • 0: False (default).
  • 1: True.