Analytics
get_analytics_daily_counts
readGet daily analytics counts
Answer "how did the store trend day by day" with the same numbers the merchant admin charts show.
Overview
Returns the per-day counts the merchant admin dashboard and Analytics charts show for the connected Store: orders, products, quote requests, custom design enquiries, designs shoppers started with the AI sign designer, and how many of those designs are on an order now. It covers the last 1 to 90 calendar days (30 by default), oldest first, counted in an IANA timezone (UTC by default). Today is the last day and is still incomplete. Every day is listed, with zero counts on a day with nothing. It contains no customer personal data. It requires the analytics:read scope and has no side effects.
Permission
Requires theanalytics:readpermission. A connection without it answersinsufficient_scopenaming the permission to approve.
Annotations
Prerequisites
- A merchant has connected this store and approved the analytics:read scope.
Arguments
How many calendar days to report, from 1 to 90, today included. Defaults to 30.
The IANA timezone the days are counted in, such as Australia/Sydney. Defaults to UTC.
Result
The timezone the days were counted in and one row per calendar day, oldest first. The 30, 60 and 90 day order totals the merchant admin shows are sums of order_count over those days.
The IANA timezone the days were counted in.
One row per calendar day, oldest first. The last row is today, which is still incomplete.
The calendar day in timezone, as YYYY-MM-DD.
Error cases
The connection was approved without analytics:read.
days is not an integer from 1 to 90, or timezone is not an IANA timezone name.
The last two days in Sydney
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_analytics_daily_counts",
"arguments": {
"days": 2,
"timezone": "Australia/Sydney"
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"structuredContent": {
"request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t",
"store": {
"id": 12,
"name": "Demo Signs"
},
"timezone": "Australia/Sydney",
"days": [
{
"date": "2026-07-18",
"order_count": 2,
"product_count": 5,
"quote_count": 1,
"custom_design_count": 0,
"ai_design_count": 3,
"ordered_ai_design_count": 1
},
{
"date": "2026-07-19",
"order_count": 0,
"product_count": 1,
"quote_count": 0,
"custom_design_count": 1,
"ai_design_count": 0,
"ordered_ai_design_count": 0
}
]
}
}
}A timezone that is not an IANA name (error)
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_analytics_daily_counts",
"arguments": {
"days": 7,
"timezone": "Sydney"
}
}
}{
"jsonrpc": "2.0",
"id": 1,
"result": {
"isError": true,
"structuredContent": {
"error": {
"code": "invalid_parameter",
"title": "Invalid query parameter",
"detail": "timezone must be an IANA timezone name, such as Europe/London.",
"recovery": "Correct the parameter named in parameter. days is an integer from 1 to 90, and timezone is an IANA timezone name, such as Europe/London; days are counted in that timezone.",
"parameter": "timezone"
}
}
}
}