Appearance
Insights API
Behavior insights (Insights module): frustration rate, top issues, page elements, journeys.
All paths are relative to https://your-site.com/api/v1. Send Authorization: Bearer <token> and Accept: application/json; see authentication and errors.
| Method | Path | What it does |
|---|---|---|
| GET | /sites/{site}/insights | Frustration rate and top issues |
| GET | /sites/{site}/insights/elements | Pages and the elements clicked on one |
| GET | /sites/{site}/insights/journeys | The most common journeys |
| GET | /sites/{site}/insights/journeys/steps | One step of the journeys explorer |
GET /sites/{site}/insights
Frustration rate and top issues
Share of sessions with rage clicks, dead clicks or errors (and the period before), and the pages and elements that frustrate most (worst first). Plan feature insights.enabled.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
period | query | string | One of: 24h, 7d, 14d, 30d. Default "7d". |
Responses
- 200 — OK
- 403 — Not allowed (not an administrator, or outside the token's abilities).
- 404 — Missing, or another account's.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.frustration | object | ||
data.frustration.sessions | integer | ||
data.frustration.frustrated | integer | ||
data.frustration.rate | number | ||
data.frustration.previous_rate | number | ||
data.issues | object[] | ||
data.issues[].kind | string | One of: page, element. | |
data.issues[].url | string | ||
data.issues[].selector | string | ||
data.issues[].label | string, nullable | ||
data.issues[].views | integer | ||
data.issues[].clicks | integer | ||
data.issues[].rage | integer | ||
data.issues[].dead | integer | ||
data.issues[].errors | integer | ||
data.issues[].score | integer |
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/insights" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"GET /sites/{site}/insights/elements
Pages and the elements clicked on one
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
period | query | string | One of: 24h, 7d, 14d, 30d. Default "7d". | |
url | query | string | The page (query and fragment are ignored). |
Responses
- 200 — The most viewed pages (at most 50) and the page's elements by clicks (at most 100).
- 404 — Missing, or another account's.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.pages | object[] | ||
data.elements | object[] | ||
data.elements[].selector | string | ||
data.elements[].label | string, nullable | ||
data.elements[].clicks | integer | ||
data.elements[].rage | integer | ||
data.elements[].dead | integer | ||
data.elements[].share | number |
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/insights/elements" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"GET /sites/{site}/insights/journeys
The most common journeys
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
period | query | string | One of: 24h, 7d, 14d, 30d. Default "7d". |
Responses
- 200 — Sessions' first pages (two to five), the most common first (at most 20).
- 404 — Missing, or another account's.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.sessions | integer | ||
data.journeys | object[] | ||
data.journeys[].pages | string[] | ||
data.journeys[].sessions | integer |
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/insights/journeys" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"GET /sites/{site}/insights/journeys/steps
One step of the journeys explorer
Of the period's sessions whose first pages were after (in order; none = all sessions): how many there are, where they went next (at most 15 pages, with their share) and how many left the site there. Journeys are followed for their first five pages; after those followed is false.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
site | path | integer | yes | |
period | query | string | One of: 24h, 7d, 14d, 30d. Default "7d". | |
after[] | query | string[] | Pages taken so far (paths), at most 5. At most 5 items. |
Responses
- 200 — The step.
- 404 — Missing, or another account's.
- 422 — Validation failed.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.sessions | integer | ||
data.followed | boolean | ||
data.next | object[] | ||
data.next[].page | string | ||
data.next[].sessions | integer | ||
data.next[].share | number | ||
data.exits | integer | ||
data.exit_rate | number |
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/insights/journeys/steps" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"