create_goal
Create a conversion goal in Yandex Metrika to track page visits, page count thresholds, multi-step funnels, or JavaScript events. Define conditions and goal type to measure specific user actions.
Instructions
Create a new conversion goal for a counter. Supports types: 'url' (page visit), 'number' (page count threshold), 'step' (multi-step funnel), 'action' (JavaScript event).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"counter_id": "<counter_id>",
"name": "<name>",
"type": "<type>"
},
"name": "create_goal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Goal display name | |
| type | Yes | Goal type: 'url' (page visit), 'number' (page count), 'step' (multi-step funnel), 'action' (JS event) | |
| conditions | No | Conditions array. Required for url, step, action goal types. | |
| counter_id | Yes | Counter ID to create the goal in |