customer-analytics

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-customer-analytics"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/05c9ea55-7ba1-4278-b43c-25f4631b1402/social-card.svg?v=3e7ae33eec8b" alt="customer-analytics" width="600" height="315"></a>
PUThttps://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}Scope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
descriptionstring
namestringrequired
stepsStep[]required
[{label, source: {type: event|action, name|id}, filters?, optional?}], the first required.
Show child parameters
filtersobject
labelstringrequired
optionalboolean
sourceobjectrequired
{type: "event", name} or {type: "action", id}.
window_daysinteger
Conversion window in days (default 14).
{
  "description": "string",
  "name": "string",
  "steps": [
    {
      "filters": {},
      "label": "string",
      "optional": true,
      "source": {}
    }
  ],
  "window_days": 0
}

Code samples

cURL
curl -X PUT "https://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}" \
  -H "Content-Type: application/json" \
  -d '{"description":"string","name":"string","steps":[{"filters":{},"label":"string","optional":true,"source":{}}],"window_days":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": "string",
  "description": "string",
  "id": "string",
  "name": "string",
  "origin": "string",
  "steps": [
    {}
  ],
  "updated_at": "2024-01-01T00:00:00Z",
  "window_days": 0
}
Schema
created_atstringrequired
created_bystring
descriptionstringrequired
idstringrequired
namestringrequired
originstringrequired
template | funnel | scratch
stepsobject[]required
[{label, source: {type, name|id}, filters?, optional}]
updated_atstringrequired
window_daysintegerrequired
400
403
404
409
DELETEhttps://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}Scope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

204
403
404
POSThttps://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}/pathsScope insight:read

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
daysinteger
scopestringrequired
between (to the next required step), before or after_dropoff.
stepintegerrequired
0-based step index.
{
  "days": 0,
  "scope": "string",
  "step": 0
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}/paths" \
  -H "Content-Type: application/json" \
  -d '{"days":0,"scope":"string","step":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "columns": [
    "string"
  ],
  "meta": {
    "bytes_read": 0,
    "cache_hit": true,
    "cache_key": "string",
    "clamped_range": true,
    "computed_at": "2024-01-01T00:00:00Z",
    "execution_ms": 0,
    "next_allowed_client_refresh": "2024-01-01T00:00:00Z",
    "rows_read": 0,
    "sampled": true,
    "sql_hash": "string"
  },
  "rows": [
    [
      {}
    ]
  ]
}
Schema
columnsstring[]required
metaobjectrequired
Show child parameters
bytes_readinteger
Bytes ClickHouse read, like rows_read.
cache_hitbooleanrequired
cache_keystringrequired
Stable hash of the cache key (project, SQL, timezone, canonical query).
clamped_rangebooleanrequired
computed_atstringrequired
When the result was computed (last_refresh).
execution_msinteger
Wall time of the ClickHouse call; None on a cache hit.
next_allowed_client_refreshstringrequired
Before this, refresh: "force_*" recomputes but the dashboards' auto refresh serves the cache.
rows_readinteger
Rows ClickHouse read (its X-ClickHouse-Summary header); None when not reported.
sampledbooleanrequired
sql_hashstringrequired
rowsobject[][]required
400
404
503
GEThttps://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}/progress

Parameters

project_idstringpathrequired
idstringpathrequired
entitystringqueryrequired
keystringqueryrequired
group_type_indexintegerquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}/progress?entity=<entity>&key=<key>"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 {journey_id, completed, steps: StepProgress[]}
400
404
503
POSThttps://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}/runScope insight:read

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
daysinteger
Look-back in days (default 30).
{
  "days": 0
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}/run" \
  -H "Content-Type: application/json" \
  -d '{"days":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 {journey_id, days, steps: StepFlow[]}
400
404
503
POSThttps://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}/steps/promoteScope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
eventstringrequired
A path node: a custom event name, or a page path starting with /.
labelstring
optionalboolean
positioninteger
0-based insert position (default: the end).
{
  "event": "string",
  "label": "string",
  "optional": true,
  "position": 0
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/customer-journeys/{id}/steps/promote" \
  -H "Content-Type: application/json" \
  -d '{"event":"string","label":"string","optional":true,"position":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
GEThttps://lucidace.com/v1/projects/{project_id}/usage-metricsScope insight:read

Parameters

project_idstringpathrequired
applies_tostringquery
limitintegerquery
cursorstringquery

Code samples

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

Responses

200 Page of UsageMetricRow, newest first
Example
{
  "data": [
    {
      "applies_to": "string",
      "calc": "string",
      "created_at": "2024-01-01T00:00:00Z",
      "created_by": "string",
      "description": "string",
      "display": "string",
      "filters": {},
      "format": "string",
      "group_type_index": 0,
      "id": "string",
      "interval_days": 0,
      "math_property": "string",
      "name": "string",
      "source": {},
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "next_cursor": "string"
}
Schema
dataUsageMetricRow[]required
Show child parameters
applies_tostringrequired
person | group | both
calcstringrequired
count | sum
created_atstringrequired
created_bystring
descriptionstringrequired
displaystringrequired
number | sparkline
filtersobject
formatstringrequired
numeric | currency
group_type_indexinteger
idstringrequired
interval_daysintegerrequired
7, 30 or 90.
math_propertystring
namestringrequired
sourceobjectrequired
{kind: events, matchers: [...]} or {kind: warehouse, table, timestamp_field, key_field}.
updated_atstringrequired
next_cursorstring
400
404
POSThttps://lucidace.com/v1/projects/{project_id}/usage-metricsScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
applies_tostring
person, group or both (default).
calcstring
count (default) or sum of math_property.
descriptionstring
displaystring
number (default) or sparkline.
filtersobject
Property group {and|or: [...]} applied to every matcher.
formatstring
numeric (default) or currency.
group_type_indexinteger
Restrict a group metric to one group type (0 to 4).
interval_daysinteger
7, 30 or 90 days (default 30).
math_propertystring
namestringrequired
sourceobjectrequired
{kind: "events", matchers: [{type: "event"|"action", name|id, filters?}]} (matchers are OR-ed) or {kind: "warehouse", table, timestamp_field, key_field}.
{
  "applies_to": "string",
  "calc": "string",
  "description": "string",
  "display": "string",
  "filters": {},
  "format": "string",
  "group_type_index": 0,
  "interval_days": 0,
  "math_property": "string",
  "name": "string",
  "source": {}
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/usage-metrics" \
  -H "Content-Type: application/json" \
  -d '{"applies_to":"string","calc":"string","description":"string","display":"string","filters":{},"format":"string","group_type_index":0,"interval_days":0,"math_property":"string","name":"string","source":{}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "applies_to": "string",
  "calc": "string",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": "string",
  "description": "string",
  "display": "string",
  "filters": {},
  "format": "string",
  "group_type_index": 0,
  "id": "string",
  "interval_days": 0,
  "math_property": "string",
  "name": "string",
  "source": {},
  "updated_at": "2024-01-01T00:00:00Z"
}
Schema
applies_tostringrequired
person | group | both
calcstringrequired
count | sum
created_atstringrequired
created_bystring
descriptionstringrequired
displaystringrequired
number | sparkline
filtersobject
formatstringrequired
numeric | currency
group_type_indexinteger
idstringrequired
interval_daysintegerrequired
7, 30 or 90.
math_propertystring
namestringrequired
sourceobjectrequired
{kind: events, matchers: [...]} or {kind: warehouse, table, timestamp_field, key_field}.
updated_atstringrequired
400
403
404
409

Updated