Skip to content

Site widget statistics over time

GET
https://api.getsitecontrol.com/v1/sites/{site_id}/widgets/stats/timeline
curl --request GET \
--url 'https://api.getsitecontrol.com/v1/sites/1/widgets/stats/timeline?interval=day&from=2026-04-15' \
--header 'Authorization: Bearer <token>'

Event counts of all widgets of the site, split into buckets. widget_ids, folder_id, is_active, layout and search narrow the count to the live widgets that match every one given; matched says how many, and matched: 0 means no widget matched. Buckets are consecutive days, calendar weeks (Monday to Sunday) or calendar months; the first and the last are cut to the period. Every bucket is present, an empty one with zeros. Counts: show is the widget shown to a visitor (a view), submit a form sent, openUrl a button or link opening a URL, showWidget a button opening another widget, addToCart, applyCoupon and copyToClipboard the matching cart and coupon buttons. rates next to each total gives every action counter divided by show, rounded to 4 places (rates.submit is the conversion rate); a rate is null when show is 0, as it is undefined, not zero.

FieldDescription
site_id
required
Site Id
integer
FieldDescription
interval

Bucket length

string
Allowed values: day week month

Bucket length

from
required
From

First day of the period, UTC, included

string format: date

First day of the period, UTC, included

to
To

Last day of the period, UTC, included; today when omitted

string format: date

Last day of the period, UTC, included; today when omitted

widget_ids
Widget Ids

Only these widget ids from list_widgets, up to 100; repeat for several

Array<integer>
<= 100 items

Only these widget ids from list_widgets, up to 100; repeat for several

is_active
Is Active

True: only widgets that are on; false: only off

boolean

True: only widgets that are on; false: only off

layout

Only widgets of this layout; use it only when the user names one

string
Allowed values: modal bar panel slide_in sidebar fullscreen inline

Only widgets of this layout; use it only when the user names one

search
Search

Part of the name, the id, or words of the widget’s own text

string
>= 1 characters <= 255 characters

Part of the name, the id, or words of the widget’s own text

folder_id
Folder Id

Only the items of this folder, an id from list_folders; 0 is General

integer

Only the items of this folder, an id from list_folders; 0 is General

Successful Response

Media typeapplication/json
WidgetStatsTimeline
object
FieldDescription
period
required
StatsPeriod
object
FieldDescription
date_from
required
Date From

First day, UTC, included

string format: date
date_to
required
Date To

Last day, UTC, included

string format: date
matched
Matched

How many live widgets the filters or ids matched; null without them. 0 means nothing matched, not that nothing happened: check the filters or ids

integer
nullable
interval
required
StatsInterval

Day, calendar week (Monday to Sunday) or calendar month.

string
Allowed values: day week month
items
required
Items

Every bucket of the period in order, empty ones with zeros

Array<object>
WidgetStatsBucket

One timeline item; the first and the last are clipped to the period.

object
FieldDescription
date_from
required
Date From
string format: date
date_to
required
Date To
string format: date
total
required
WidgetMetrics

Event counts keyed by event type; every key is always present.

object
FieldDescription
show
required
Show
integer
submit
required
Submit
integer
openUrl
required
Openurl
integer
showWidget
required
Showwidget
integer
addToCart
required
Addtocart
integer
applyCoupon
required
Applycoupon
integer
copyToClipboard
required
Copytoclipboard
integer
rates
required
Rates

Each action counter of total divided by show, so the conversion rate is rates.submit; every key is always present, null when show is 0

object
FieldDescription
submit
Submit

submit / show; null when there were no shows: the rate is undefined, not zero

number
nullable
openUrl
Openurl

openUrl / show; null when there were no shows: the rate is undefined, not zero

number
nullable
showWidget
Showwidget

showWidget / show; null when there were no shows: the rate is undefined, not zero

number
nullable
addToCart
Addtocart

addToCart / show; null when there were no shows: the rate is undefined, not zero

number
nullable
applyCoupon
Applycoupon

applyCoupon / show; null when there were no shows: the rate is undefined, not zero

number
nullable
copyToClipboard
Copytoclipboard

copyToClipboard / show; null when there were no shows: the rate is undefined, not zero

number
nullable

Example

{
"interval": "day"
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Unsupported GSC-Version

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Missing or invalid API key or access token

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

WWW-Authenticate
string

Authentication scheme: Bearer

Access denied

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Not found

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Validation failed

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Rate limited

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Retry-After
integer

Seconds until the bucket refills

Media typeapplication/problem+json

temporarily_unavailable: the statistics store timed out or is overloaded; the heavy request is spent all the same

Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds