Skip to main content

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​

ParameterTypeRequiredDescription
idstringYesThe storefront UUID from Get Storefronts / Get Storefront. A value that is not a UUID returns 400.

Query Parameters​

ParameterTypeRequiredDefaultDescription
typestringNosummaryWhich breakdown to return. One of summary, daily, sources, countries, devices, partners, realtime.
datestringNolast7daysDate 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.
timezonestringNostore timezoneIANA 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_percent is an integer 0-100. 13 means 13%. Do not treat it as a 0-1 ratio.
  • Revenue amount is integer minor units (e.g. cents). 45000 with currency "usd" is 450.00 USD. currency is a lowercase ISO code. revenue is [] when there are no completed attributed orders.
  • avg_duration_seconds is in seconds.
  • pageviews_percent on devices is a 0-100 share of pageviews, to one decimal. 100 means 100%.

Date Range​

Present on every breakdown except realtime. It is the server's resolution of your date slug and timezone into concrete dates.

FieldTypeNullableDescription
fromstringNoFirst day of the window (YYYY-MM-DD, inclusive).
tostringNoLast day of the window (YYYY-MM-DD, inclusive).
timezonestringNoIANA 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.

FieldTypeNullableDescription
currencystringNoLowercase ISO currency code.
amountintegerNoRevenue in minor units (e.g. cents). 45000 with "usd" is 450.00 USD.
orders_countintegerNoNumber 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 [].

FieldTypeNullableDescription
summary.visitorsintegerNoUnique visitors in the period.
summary.pageviewsintegerNoTotal pageviews in the period.
summary.views_per_visitnumberNoAverage pageviews per visit.
summary.avg_duration_secondsintegerNoAverage visit duration, in seconds.
summary.bounce_rate_percentintegerNoBounce rate as an integer 0-100 (13 means 13%).
summary.revenuearrayNoRevenue 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": []
}
]
}
FieldTypeNullableDescription
daily[].datestringNoThe day (YYYY-MM-DD).
daily[].visitorsintegerNoUnique visitors on that day.
daily[].revenuearrayNoRevenue 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": []
}
]
}
]
}
FieldTypeNullableDescription
sources[].sourcestringNoSource label (e.g. Google, Direct).
sources[].visitorsintegerNoUnique visitors from this source.
sources[].revenuearrayNoRevenue per currency for this source. See Revenue Entry.
sources[].urlsarrayNoReferrer URLs within this source.
urls[].referrerstringYesThe referrer URL. null when the visit had no referrer.
urls[].visitorsintegerNoUnique visitors from this referrer.
urls[].revenuearrayNoRevenue 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": []
}
]
}
FieldTypeNullableDescription
countries[].country_codestringYesISO-2 country code, uppercase (e.g. US). null when the country is unknown.
countries[].visitorsintegerNoUnique visitors from this country.
countries[].revenuearrayNoRevenue 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": []
}
]
}
FieldTypeNullableDescription
devices[].device_typestringNoDevice type (typically desktop, mobile, tablet, or unknown).
devices[].pageviewsintegerNoPageviews from this device type.
devices[].pageviews_percentnumberNoShare of total pageviews (0-100, one decimal). 100 means 100%.
devices[].revenuearrayNoRevenue 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": []
}
FieldTypeNullableDescription
partners[].partnerstringNoPartner identifier (the ?ref= value).
partners[].visitorsintegerNoUnique visitors attributed to this partner.
partners[].revenuearrayNoRevenue 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
}
FieldTypeNullableDescription
visitorsintegerNoVisitors 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."
}