Compare periods
compare_periodsA period against the window just before it (previous) or the same dates a year earlier (year): every overview number for both, and the relative change. Changes are null where the site's records don't reach back far enough to compare.
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": "compare_periods"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | A custom range's last day (YYYY-MM-DD), with from. | |
| from | No | A custom range's first day (YYYY-MM-DD), with to. Up to 366 days, not past today. | |
| site | No | The site's id. Optional: the API key's site is the one read. | |
| period | No | A preset period, in the site's time zone. Leave out for the tool's default, or give from and to instead. | |
| compare | No | previous (the window just before; the default) or year (the same dates a year earlier). | |
| filters | No | Visits that match every filter (AND). Each dimension at most once. |