Get analytics performance
get_analytics_performanceReturns the Google Analytics 4 numbers of the Analytics page for the site’s connected property: active users, sessions, new users, bounce rate and the number of traffic sources, with the change against the previous period of the same length; a daily series; the 25 top traffic sources and their daily series; the 25 top pages by views; and the 25 top countries. bounceRate and share are fractions from 0 to 1. Keytomic keeps each result for up to 6 hours, so generatedAt says when GA4 was read. For the events of the site, use list_analytics_events.
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": {
"projectId": "<projectId>"
},
"name": "get_analytics_performance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | No | Only sessions on this device category. | all |
| country | No | Only sessions from this country, as an ISO 3166-1 alpha-2 code such as "US". Omit for every country. | |
| endDate | No | Last day, YYYY-MM-DD. Defaults to yesterday. | |
| projectId | Yes | Site to act on, from list_sites. Only its connected Google Analytics property is used. | |
| startDate | No | First day, YYYY-MM-DD. Defaults to 28 days ending on endDate, as on the Analytics page. | |
| trafficSegment | No | "organic" keeps sessions from the Organic Search channel. "llm" keeps sessions from AI assistants such as ChatGPT, Perplexity and Gemini. | all |
| comparePreviousPeriod | No | Also read the previous period of the same length, for the deltas. false sets each delta to null. |