Campaigns
list_campaignsVisitors from links tagged with utm_campaign or utm_source, grouped by utm_campaign, utm_source and utm_medium of their first page view that day, paged, with top utm_content, utm_term and landing pages; total_visitors is all of them. No data before sources_from. goal adds a goal's conversions per row: read goal_note. get_campaign_goals: every goal's steps for one row. 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. unique_sessions (visitors) is approximate: counted per day from a daily-rotating hash and summed over days, so a returning visitor counts once per day, and shared or changing networks merge or split people.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_campaigns"
}
}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. | |
| from | No | First day, YYYY-MM-DD in the project's timezone, inclusive. Default: 27 days before 'to'. | |
| goal | No | A goal's funnel ID (list_funnels, is_goal true). Adds goal numbers to every row (conversions, conversion_rate, and revenue and revenue_per_visitor when the goal has a value), plus goal and goal_totals. Read goal_note before quoting them. Not a goal: 404. | |
| page | No | Page number, from 1. | |
| limit | No | Campaigns per page, 1-100. Default 50. | |
| trait | No | Only count visitors carrying this session trait value. | |
| search | No | Case-insensitive substring of the campaign, source, medium, or any utm_content or utm_term. | |
| 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). | |
| sort_by | No | visitors (default) or campaign; with goal also conversions, conversion_rate, revenue or revenue_per_visitor (rows without a value last). | |
| sort_dir | No | desc or asc. Default: desc, asc for campaign. |