web

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-web"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/c98607d6-613a-4769-ba8d-1fd655470740/social-card.svg?v=3e7ae33eec8b" alt="web" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/web/digestScope insight:read

Parameters

project_idstringpathrequired
daysintegerquery
1..=90, default 7

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/web/digest"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "summary": {
    "from": "2024-01-01T00:00:00Z",
    "highlights": [
      {
        "current": 0,
        "dimension": "string",
        "key": "string",
        "kind": "string",
        "previous": 0,
        "score": 0,
        "text": "string"
      }
    ],
    "overview": {
      "current": {
        "avg_engagement_time_s": 0,
        "avg_events_per_session": 0,
        "avg_session_duration_s": 0,
        "bounce_rate": 0,
        "engaged_sessions": 0,
        "engagement_rate": 0,
        "pageviews": 0,
        "sessions": 0,
        "views_per_session": 0,
        "visitors": 0
      },
      "delta": {
        "avg_engagement_time_s": 0,
        "avg_events_per_session": 0,
        "avg_session_duration_s": 0,
        "bounce_rate": 0,
        "engaged_sessions": 0,
        "engagement_rate": 0,
        "pageviews": 0,
        "sessions": 0,
        "views_per_session": 0,
        "visitors": 0
      },
      "precomputed": {
        "computed_at": "string",
        "through": "2024-01-01T00:00:00Z"
      },
      "previous": {
        "avg_engagement_time_s": 0,
        "avg_events_per_session": 0,
        "avg_session_duration_s": 0,
        "bounce_rate": 0,
        "engaged_sessions": 0,
        "engagement_rate": 0,
        "pageviews": 0,
        "sessions": 0,
        "views_per_session": 0,
        "visitors": 0
      }
    },
    "tables": [
      {
        "rows": [
          {
            "avg_session_duration_s": 0,
            "bounce_rate": 0,
            "key": "string",
            "pageviews": 0,
            "scroll_depth": 0,
            "sessions": 0,
            "visitors": 0
          }
        ],
        "title": "string"
      }
    ],
    "to": "2024-01-01T00:00:00Z"
  },
  "text": "string"
}
Schema
summaryobjectrequired
Show child parameters
fromstringrequired
highlightsHighlight[]required
Picked by comparing with the previous period: headline first, then the largest moves.
Show child parameters
currentnumberrequired
dimensionstringrequired
Breakdown title (Referrers, ...); empty for the headline and rates.
keystringrequired
kindstringrequired
headline, gainer, decliner, new or rate.
previousnumberrequired
scorenumberrequired
Ranking weight: share of the period's visitors that moved (the headline is 1).
textstringrequired
The sentence shown.
overviewobjectrequired
Show child parameters
currentobjectrequired
deltaOverviewDelta
precomputedPrecomputed
previousOverview
tablesSummaryTable[]required
Show child parameters
rowsBreakdownRow[]required
titlestringrequired
tostringrequired
textstringrequired
Plain-text rendering (what the weekly email sends).
400
404
503
GEThttps://lucidace.com/v1/projects/{project_id}/web/dimensionsScope insight:read

Parameters

project_idstringpathrequired

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/web/dimensions"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Array of WebDimension by name
Example
[
  {
    "created_at": "2024-01-01T00:00:00Z",
    "id": "string",
    "kind": "string",
    "name": "string",
    "property": "string",
    "rules": [
      {}
    ]
  }
]
Schema
created_atstringrequired
idstringrequired
kindstringrequired
property | content_group
namestringrequired
propertystring
The pageview property a property dimension groups by.
rulesobject[]required
Ordered {group, pattern} rules of a content_group dimension.
404
POSThttps://lucidace.com/v1/projects/{project_id}/web/dimensionsScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
kindstringrequired
property groups pageviews by property; content_group by the first matching rule.
namestringrequired
1 to 60 characters of letters, digits, space, _ and -; unique in the project.
propertystring
rulesContentRuleBody[]
Show child parameters
groupstringrequired
Group name, 1 to 80 characters.
patternstringrequired
Page path pattern; * matches any run of characters, e.g. /blog/*.
{
  "kind": "string",
  "name": "string",
  "property": "string",
  "rules": [
    {
      "group": "string",
      "pattern": "string"
    }
  ]
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/web/dimensions" \
  -H "Content-Type: application/json" \
  -d '{"kind":"string","name":"string","property":"string","rules":[{"group":"string","pattern":"string"}]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "id": "string",
  "kind": "string",
  "name": "string",
  "property": "string",
  "rules": [
    {}
  ]
}
Schema
created_atstringrequired
idstringrequired
kindstringrequired
property | content_group
namestringrequired
propertystring
The pageview property a property dimension groups by.
rulesobject[]required
Ordered {group, pattern} rules of a content_group dimension.
400
403
404
409
DELETEhttps://lucidace.com/v1/projects/{project_id}/web/dimensions/{id}Scope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/web/dimensions/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

204
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/web/directoryScope insight:read

Folder tree of the site with per-folder rollups, parents before children.

Parameters

project_idstringpathrequired
depthintegerquery
fromstringquery
tostringquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/web/directory"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
[
  {
    "bounce_rate": 0,
    "depth": 0,
    "entries": 0,
    "pageviews": 0,
    "parent": "string",
    "path": "string",
    "sessions": 0,
    "visitors": 0
  }
]
Schema
bounce_ratenumber
Share of those sessions with at most one pageview (0..1); null without entries.
depthintegerrequired
0 for the root.
entriesintegerrequired
Sessions that started at or below this node.
pageviewsintegerrequired
parentstring
Parent folder path; null for the root.
pathstringrequired
/ for the root, otherwise the folder path without a trailing slash.
sessionsintegerrequired
visitorsintegerrequired
400
404
503
GEThttps://lucidace.com/v1/projects/{project_id}/web/goalsScope insight:read

Parameters

project_idstringpathrequired
limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/web/goals"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Page of Goal, oldest first
Example
{
  "data": [
    {
      "created_at": "2024-01-01T00:00:00Z",
      "event": "string",
      "id": "string",
      "kind": "string",
      "name": "string",
      "pathname": "string",
      "source": {},
      "value": 0,
      "value_property": "string"
    }
  ],
  "next_cursor": "string"
}
Schema
dataGoal[]required
Show child parameters
created_atstringrequired
eventstring
Event name, for event goals.
idstringrequired
kindstringrequired
event, pageview, action or warehouse.
namestringrequired
pathnamestring
Exact $pathname, for pageview goals.
sourceobject
Query source of action / warehouse goals ({"type":"action","id":..} or {"type":"warehouse","table":..,"timestamp_field":..,"distinct_id_field":..}).
valuenumber
Fixed value credited per conversion.
value_propertystring
Property holding the conversion's revenue (not pageview goals; excludes value).
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/web/goalsScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
distinct_id_fieldstring
warehouse goals: the row column holding the converter's distinct id (else each row is its own converter).
kindstringrequired
event (a custom event name), pageview (an exact path), action (a saved action id) or warehouse (a synced warehouse table name).
namestringrequired
targetstringrequired
Event name, $pathname, action id or warehouse table.
timestamp_fieldstring
warehouse goals: the row column holding the conversion time (required).
valuenumber
Fixed value credited per conversion (0 to 1e9).
value_propertystring
Property carrying each conversion's revenue (not pageview goals; not together with value).
{
  "distinct_id_field": "string",
  "kind": "string",
  "name": "string",
  "target": "string",
  "timestamp_field": "string",
  "value": 0,
  "value_property": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/web/goals" \
  -H "Content-Type: application/json" \
  -d '{"distinct_id_field":"string","kind":"string","name":"string","target":"string","timestamp_field":"string","value":0,"value_property":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "event": "string",
  "id": "string",
  "kind": "string",
  "name": "string",
  "pathname": "string",
  "source": {},
  "value": 0,
  "value_property": "string"
}
Schema
created_atstringrequired
eventstring
Event name, for event goals.
idstringrequired
kindstringrequired
event, pageview, action or warehouse.
namestringrequired
pathnamestring
Exact $pathname, for pageview goals.
sourceobject
Query source of action / warehouse goals ({"type":"action","id":..} or {"type":"warehouse","table":..,"timestamp_field":..,"distinct_id_field":..}).
valuenumber
Fixed value credited per conversion.
value_propertystring
Property holding the conversion's revenue (not pageview goals; excludes value).
400
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/web/goals/candidatesScope insight:read

Parameters

project_idstringpathrequired
fromstringquery
tostringquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/web/goals/candidates"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Custom events by volume (at most 20)
Example
[
  {
    "event": "string",
    "events": 0,
    "is_goal": true,
    "persons": 0,
    "utm_coverage": 0
  }
]
Schema
eventstringrequired
eventsintegerrequired
is_goalbooleanrequired
Already a goal.
personsintegerrequired
utm_coveragenumber
Share of the event's sessions that arrived with a utm_source (0..1).
400
404
503

Updated