Goals of one campaign
get_campaign_goalsEvery goal (funnel marked is_goal) for one campaign of list_campaigns: the campaign's visitor-days at each step, and numbers: its conversions, rate and revenue, exactly the row's goal numbers in list_campaigns with that goal. Step 1 is the campaign's visitors when the funnel starts with any page view (first_step_is_any_pageview), else null. Each goal counts from its own goal.data_from: read its coverage, and goal_note, before quoting. Dates are the project's calendar days, YYYY-MM-DD (timezone: get_project); timestamps are UTC. Omit from/to for the last 28 complete days, ending yesterday. Today is still in progress: a range including it reads as a drop against complete days. Quote counts with every percentage; a big change on a small count is noise, not a finding.
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": {
"key": "<key>"
},
"name": "get_campaign_goals"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Last day, YYYY-MM-DD in the project's timezone, inclusive. Default: yesterday, the last complete day. | |
| key | Yes | The campaign's key from list_campaigns: the JSON array [utm_campaign, utm_source, utm_medium], as a string. | |
| from | No | First day, YYYY-MM-DD in the project's timezone, inclusive. Default: 27 days before 'to'. | |
| trait | No | Only count visitors carrying this session trait value; each goal's steps count by its funnel's trait_scope. | |
| project | No | Project ID, from list_projects. Required when this connection covers more than one project; may be left out when it covers one (and with an API key, which belongs to one project). |