Skip to content

Click points on a page

GET
/api/v1/analytics/clicks
curl --request GET \
--url 'https://digize.com/api/v1/analytics/clicks?path=example&viewport=phone&days=30&limit=2000' \
--header 'x-api-key: <x-api-key>'

Where people click on one page at one width (phone under 768px wide, tablet under 1024px, desktop): the newest click points, each with x in percent of the page’s width, y in pixels from its top and the page’s height then, marked as a click, a dead click or a rage click; the clicks, dead clicks and rage clicks on each element; and how far down views at that width get. For a heatmap or a scroll map, or to see what people try to click.

Needs the analytics:read permission.

path
required

The page’s path, such as /pricing, without its query string.

string
/^\/[A-Za-z0-9\-._~!$&()*+,;=:@%/]{0,255}$/

The page’s path, such as /pricing, without its query string.

viewport
string
default: desktop
Allowed values: phone tablet desktop
days

The window: the last 1 to 90 days, to now.

integer
default: 30 >= 1 <= 90

The window: the last 1 to 90 days, to now.

siteId

One site, by its id (sites in analytics.pages.list lists them); every site when left out.

string
/^[A-Za-z0-9_-]{1,64}$/

One site, by its id (sites in analytics.pages.list lists them); every site when left out.

limit

How many points, the newest first.

integer
default: 2000 >= 1 <= 5000

How many points, the newest first.

Done

Media typeapplication/json
object
unavailable
required
Any of:
object
reason
required
string
Allowed values: token upstream
message
required
string
from
required
string format: date-time
to
required
string format: date-time
days
required
number
path
required
string
viewport
required
string
Allowed values: phone tablet desktop
width
required
object
min
required
number
max
required
number | null
views
required
number
clicks
required
number
deadClicks
required
number
rageClicks
required
number
pageHeight
required

The median page height, in pixels, when clicked.

number | null
points
required
Array<object>
object
x
required

Percent of the page’s width.

number
y
required

CSS pixels from the top of the page.

number
pageH
required
number
kind
required
string
Allowed values: click dead rage
sampled
required

More clicks than points: the newest are shown.

boolean
scroll
required

Views at this width that got at least mark percent down the page, and their share of the views at this width that scrolled or loaded it: a scroll map.

Array<object>
object
mark
required
number
views
required
number
share
required
number | null
elements
required
Array<object>
object
label
required
string
selector
required
string
clicks
required
number
deadClicks
required
number
rageClicks
required
number

Example

{
"unavailable": {
"reason": "token"
},
"viewport": "phone",
"points": [
{
"kind": "click"
}
]
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}