Get Storefront Analytics
Retrieve a single analytics breakdown for one storefront (Creator page).
One call returns one breakdown, selected with the type parameter. Map the
question to a type: summary for totals and revenue, daily for trends,
sources for referrers, countries, devices, partners for affiliate
performance, or realtime for a live count. To assemble a dashboard, call this
endpoint in parallel with different type values.
The {id} is the storefront UUID from Get Storefronts /
Get Storefront. Draft and unpublished storefronts still
return analytics. A storefront with no traffic returns zeros and empty revenue
arrays, not 404.
Request
GET /storefronts/{id}/analytics
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The storefront UUID from Get Storefronts / Get Storefront. A value that is not a UUID returns 400. |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | No | summary | Which breakdown to return. One of summary, daily, sources, countries, devices, partners, realtime. |
date | string | No | last7days | Date range. Either a named slug (today, last7days, last14days, last30days, last3months, lastMonth, monthToDate, yearToDate, last12months, all) or a custom range as YYYY-MM-DD,YYYY-MM-DD (inclusive). Same slugs as Get a Statistic. Ignored for type=realtime. |
timezone | string | No | store timezone | IANA timezone name (e.g. America/New_York). Determines how the date range and visitor days are bucketed, and is echoed back in date_range.timezone. Defaults to your store's timezone. Unknown values return 422. |
An unknown type, a malformed date, or an unknown timezone returns a 422
(see Validation Error).
Example Request — summary, last 7 days
curl -X GET "https://cart.easy.tools/api/v1/storefronts/b10f5980-d653-4494-ad1c-6a9d68c96d19/analytics" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Example Request — daily trend
curl -X GET "https://cart.easy.tools/api/v1/storefronts/b10f5980-d653-4494-ad1c-6a9d68c96d19/analytics?type=daily&timezone=America/New_York" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Example Request — live visitor count
curl -X GET "https://cart.easy.tools/api/v1/storefronts/b10f5980-d653-4494-ad1c-6a9d68c96d19/analytics?type=realtime" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response
Success Response (200)
The body shape is determined by the requested type, and every shape carries a
type field echoing it. All breakdowns except realtime include a date_range
(the resolved window the figures cover).
Reading the numbers
bounce_rate_percentis an integer 0-100.13means 13%. Do not treat it as a 0-1 ratio.- Revenue
amountis integer minor units (e.g. cents).45000withcurrency"usd"is 450.00 USD.currencyis a lowercase ISO code.revenueis[]when there are no completed attributed orders. avg_duration_secondsis in seconds.pageviews_percenton devices is a 0-100 share of pageviews, to one decimal.100means 100%.
Date Range
Present on every breakdown except realtime. It is the server's resolution of
your date slug and timezone into concrete dates.
| Field | Type | Nullable | Description |
|---|---|---|---|
from | string | No | First day of the window (YYYY-MM-DD, inclusive). |
to | string | No | Last day of the window (YYYY-MM-DD, inclusive). |
timezone | string | No | IANA timezone used for the day boundaries. |
Revenue Entry
The objects in every revenue array. One entry per currency. revenue is []
when there are no completed attributed orders.
| Field | Type | Nullable | Description |
|---|---|---|---|
currency | string | No | Lowercase ISO currency code. |
amount | integer | No | Revenue in minor units (e.g. cents). 45000 with "usd" is 450.00 USD. |
orders_count | integer | No | Number of completed attributed orders. |
Summary (type=summary)
Period totals — visitors, pageviews, bounce rate, and revenue per currency.
{
"type": "summary",
"date_range": {
"from": "2026-08-21",
"to": "2026-08-28",
"timezone": "America/New_York"
},
"summary": {
"visitors": 120,
"pageviews": 210,
"views_per_visit": 1.75,
"avg_duration_seconds": 47,
"bounce_rate_percent": 13,
"revenue": [
{
"currency": "usd",
"amount": 45000,
"orders_count": 3
}
]
}
}
When there are no completed attributed orders, revenue is [].
| Field | Type | Nullable | Description |
|---|---|---|---|
summary.visitors | integer | No | Unique visitors in the period. |
summary.pageviews | integer | No | Total pageviews in the period. |
summary.views_per_visit | number | No | Average pageviews per visit. |
summary.avg_duration_seconds | integer | No | Average visit duration, in seconds. |
summary.bounce_rate_percent | integer | No | Bounce rate as an integer 0-100 (13 means 13%). |
summary.revenue | array | No | Revenue per currency. See Revenue Entry. Empty when there are no completed attributed orders. |
Daily (type=daily)
Per-day visitor and revenue trend, one row per day in the window. Every
calendar day is present, including zeros. There is no 120-day empty-array cap
(unlike Get Page Analytics). date=all returns
the full per-day series.
{
"type": "daily",
"date_range": {
"from": "2026-08-21",
"to": "2026-08-28",
"timezone": "America/New_York"
},
"daily": [
{
"date": "2026-08-21",
"visitors": 0,
"revenue": []
},
{
"date": "2026-08-22",
"visitors": 0,
"revenue": []
},
{
"date": "2026-08-23",
"visitors": 0,
"revenue": []
},
{
"date": "2026-08-24",
"visitors": 0,
"revenue": []
},
{
"date": "2026-08-25",
"visitors": 1,
"revenue": []
},
{
"date": "2026-08-26",
"visitors": 0,
"revenue": []
},
{
"date": "2026-08-27",
"visitors": 1,
"revenue": []
},
{
"date": "2026-08-28",
"visitors": 0,
"revenue": []
}
]
}
| Field | Type | Nullable | Description |
|---|---|---|---|
daily[].date | string | No | The day (YYYY-MM-DD). |
daily[].visitors | integer | No | Unique visitors on that day. |
daily[].revenue | array | No | Revenue per currency for that day. See Revenue Entry. |
Sources (type=sources)
Traffic sources, each with a drill-down of its referrer URLs.
{
"type": "sources",
"date_range": {
"from": "2026-08-21",
"to": "2026-08-28",
"timezone": "America/New_York"
},
"sources": [
{
"source": "Direct",
"visitors": 1,
"revenue": [],
"urls": [
{
"referrer": null,
"visitors": 1,
"revenue": []
}
]
}
]
}
| Field | Type | Nullable | Description |
|---|---|---|---|
sources[].source | string | No | Source label (e.g. Google, Direct). |
sources[].visitors | integer | No | Unique visitors from this source. |
sources[].revenue | array | No | Revenue per currency for this source. See Revenue Entry. |
sources[].urls | array | No | Referrer URLs within this source. |
urls[].referrer | string | Yes | The referrer URL. null when the visit had no referrer. |
urls[].visitors | integer | No | Unique visitors from this referrer. |
urls[].revenue | array | No | Revenue per currency for this referrer. See Revenue Entry. |
Countries (type=countries)
Visitors and revenue by country.
{
"type": "countries",
"date_range": {
"from": "2026-08-21",
"to": "2026-08-28",
"timezone": "America/New_York"
},
"countries": [
{
"country_code": "US",
"visitors": 1,
"revenue": []
}
]
}
| Field | Type | Nullable | Description |
|---|---|---|---|
countries[].country_code | string | Yes | ISO-2 country code, uppercase (e.g. US). null when the country is unknown. |
countries[].visitors | integer | No | Unique visitors from this country. |
countries[].revenue | array | No | Revenue per currency for this country. See Revenue Entry. |
Devices (type=devices)
Device-type split. Rows are keyed by pageviews (not visitors), and
pageviews_percent is the row's share of total pageviews (0-100, one decimal).
Typical device_type values are desktop, mobile, tablet, and unknown.
{
"type": "devices",
"date_range": {
"from": "2026-08-21",
"to": "2026-08-28",
"timezone": "America/New_York"
},
"devices": [
{
"device_type": "desktop",
"pageviews": 5,
"pageviews_percent": 100,
"revenue": []
}
]
}
| Field | Type | Nullable | Description |
|---|---|---|---|
devices[].device_type | string | No | Device type (typically desktop, mobile, tablet, or unknown). |
devices[].pageviews | integer | No | Pageviews from this device type. |
devices[].pageviews_percent | number | No | Share of total pageviews (0-100, one decimal). 100 means 100%. |
devices[].revenue | array | No | Revenue per currency. See Revenue Entry. |
Partners (type=partners)
Affiliate partner performance. Only traffic and orders attributed to a ?ref=
partner are counted, so partner totals can be less than the storefront's
summary.
{
"type": "partners",
"date_range": {
"from": "2026-08-21",
"to": "2026-08-28",
"timezone": "America/New_York"
},
"partners": []
}
| Field | Type | Nullable | Description |
|---|---|---|---|
partners[].partner | string | No | Partner identifier (the ?ref= value). |
partners[].visitors | integer | No | Unique visitors attributed to this partner. |
partners[].revenue | array | No | Revenue per currency for this partner. See Revenue Entry. |
Realtime (type=realtime)
Visitors on the storefront in the last 5 minutes — a live snapshot. This
breakdown has no date_range, and ignores date and timezone.
{
"type": "realtime",
"visitors": 0
}
| Field | Type | Nullable | Description |
|---|---|---|---|
visitors | integer | No | Visitors on the storefront in the last 5 minutes. |
Error Responses
Bad Request (400)
Returned when {id} is not a UUID.
{
"message": "Invalid storefront ID"
}
Not Found Error (404)
Returned when the UUID does not exist, belongs to another store, or points at a deleted storefront.
{
"message": "Storefront not found"
}
Validation Error (422 Unprocessable Entity)
Returned when type is unknown, date is malformed, or timezone is unknown.
{
"message": "The selected type is invalid.",
"errors": {
"type": [
"The selected type is invalid."
]
}
}
Unauthorized (401)
{
"message": "Unauthenticated."
}
Forbidden (403)
Returned when your API key has not been granted access to the requested store.
{
"message": "You do not have API access to the requested store."
}
Too Many Requests (429)
Returned when you exceed the rate limit. The Retry-After response header gives
the number of seconds to wait.
{
"message": "Too many requests. Please retry after 60 seconds."
}