Lifetime Value (LTV)
LTV pivots your link analytics around the acquisition cohort: for every ISO week, it shows how many links were first clicked, how many unique visitors that brought in, and how much attributed revenue those links eventually drove. It’s the bridge between conversion tracking and your dashboard’s engagement metrics.
What “cohort” means here. A cohort is the ISO week of a link’s first click — not a visitor’s. We pivot on the link because conversions attach to
link_id, not to an IP. Two visitors hitting the same link land in the same cohort.
Endpoint
curl 'https://api.elido.app/v1/analytics/workspaces/1/ltv?from=2026-01-01&to=2026-04-01¤cy=USD' \
-H "Authorization: Bearer $ELIDO_INTERNAL_TOKEN"{
"currency": "USD",
"cohorts": [
{
"cohort_week": "2026-03-30",
"links_acquired": 142,
"visitors": 8910,
"clicks_total": 23814,
"revenue_cents": 421500,
"currency": "USD",
"clicks_per_link": 167.7,
"revenue_per_link_cents": 2968,
"revenue_per_visitor_cents": 47.3
}
]
}Query parameters
| Param | Required | Default | Notes |
|---|---|---|---|
from | no | to − 30d | ISO date YYYY-MM-DD. |
to | no | today | ISO date YYYY-MM-DD. |
link_id | no | — | Narrow to a single link. Useful for “is this link a high-LTV link?” deep dives. |
currency | no | USD | Three-letter ISO code. Revenue is filtered to this currency only — no implicit FX conversion. |
Response fields
cohort_week— Monday of the ISO week (YYYY-MM-DD).links_acquired— distinct links whose first ever click in the query window fell in this week.visitors— unique visitors (by IP) who clicked any cohort link, counted across the link’s full lifetime — not just the acquisition week.clicks_total— lifetime click sum across the cohort’s links.revenue_cents— sum of conversions in the requested currency attributed to any cohort link vialink_id. Includes conversions that happened after the query window closed — LTV is a lifetime metric, so the window only scopes acquisition, not revenue.currency— echo of the requestcurrencyparam.clicks_per_link,revenue_per_link_cents,revenue_per_visitor_cents— derived averages, included so the dashboard doesn’t have to redo the math.
What you can do with it
- Spot acquisition weeks that paid off. A high
revenue_per_visitor_centsfor a recent cohort is a signal the channels you ran that week brought in buyers, not browsers. - Compare cohorts across currencies. Run the report twice with
?currency=USDand?currency=EURto split markets cleanly. We intentionally don’t FX-convert. - Catch attribution gaps. A cohort with healthy
clicks_totalbutrevenue_cents = 0usually means the checkout integration forgot to populatemetadata.elido_link_id. Fix that and historic conversions for new links do count once they arrive — the lookup is at conversion-write time.
SDK
import { ElidoApi } from "@elido/sdk";
const api = new ElidoApi({ baseUrl, analyticsBaseUrl, analyticsToken });
const ltv = await api.analytics.ltv(workspaceId, {
from: "2026-01-01",
to: "2026-04-01",
currency: "USD",
});
console.log(ltv.cohorts[0]?.revenue_per_visitor_cents);import "github.com/elidoapp/elido/packages/sdk-go/elido"
c, _ := elido.New(elido.Options{BaseURL: baseURL, Token: token})
res, _ := c.Analytics.LTV(ctx, workspaceID, elido.LTVOptions{
From: "2026-01-01", To: "2026-04-01", Currency: "USD",
})import elido
client = elido.Client(base_url=base_url, token=token)
ltv = client.analytics.ltv(
workspace_id, from_="2026-01-01", to="2026-04-01", currency="USD",
)Self-hosting note
The LTV endpoint joins click data from ClickHouse with conversion
revenue from Postgres. The analytics-api process needs both
CLICKHOUSE_DSN and DATABASE_URL — when DATABASE_URL is
unset, the endpoint still serves but reports revenue_cents = 0
across the board. The engagement view (links / visitors / clicks)
remains accurate.
Endpoint reference
| Method | Path |
|---|---|
GET | /v1/analytics/workspaces/{ws}/ltv |