Skip to content

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.

MethodPathWhat it does
GET/sites/{site}/insightsFrustration rate and top issues
GET/sites/{site}/insights/elementsPages and the elements clicked on one
GET/sites/{site}/insights/journeysThe most common journeys
GET/sites/{site}/insights/journeys/stepsOne 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 ​

NameInTypeRequiredDescription
sitepathintegeryes
periodquerystringOne 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
FieldTypeRequiredDescription
dataobject
data.frustrationobject
data.frustration.sessionsinteger
data.frustration.frustratedinteger
data.frustration.ratenumber
data.frustration.previous_ratenumber
data.issuesobject[]
data.issues[].kindstringOne of: page, element.
data.issues[].urlstring
data.issues[].selectorstring
data.issues[].labelstring, nullable
data.issues[].viewsinteger
data.issues[].clicksinteger
data.issues[].rageinteger
data.issues[].deadinteger
data.issues[].errorsinteger
data.issues[].scoreinteger
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 ​

NameInTypeRequiredDescription
sitepathintegeryes
periodquerystringOne of: 24h, 7d, 14d, 30d. Default "7d".
urlquerystringThe 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
FieldTypeRequiredDescription
dataobject
data.pagesobject[]
data.elementsobject[]
data.elements[].selectorstring
data.elements[].labelstring, nullable
data.elements[].clicksinteger
data.elements[].rageinteger
data.elements[].deadinteger
data.elements[].sharenumber
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 ​

NameInTypeRequiredDescription
sitepathintegeryes
periodquerystringOne 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
FieldTypeRequiredDescription
dataobject
data.sessionsinteger
data.journeysobject[]
data.journeys[].pagesstring[]
data.journeys[].sessionsinteger
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 ​

NameInTypeRequiredDescription
sitepathintegeryes
periodquerystringOne of: 24h, 7d, 14d, 30d. Default "7d".
after[]querystring[]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
FieldTypeRequiredDescription
dataobject
data.sessionsinteger
data.followedboolean
data.nextobject[]
data.next[].pagestring
data.next[].sessionsinteger
data.next[].sharenumber
data.exitsinteger
data.exit_ratenumber
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/insights/journeys/steps" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

Replora: see what your visitors see.