Documentation · API reference
GET/api/v1/sites/{site}/retention

Of the visitors first seen in a week or month

Of the visitors first seen in a week or month, the share who came back.

Parameters

sitein the address
neededA site's id or name
grainin the query
week or month
whatin the query
visit, or goal:<name>

The answer

Status 200

RetentionReport

back_first
number or nullBack in the first period after the one they were first seen in: the mean over the cohorts old enough to say, and how many those are.
back_first_cohorts
integerneeded
back_fourth
number or nullStill coming in the fourth period.
back_fourth_cohorts
integerneeded
by_source
list of RetentionSplitneeded
cohorts
list of CohortRowneeded
coverage
Coverageneeded
days_to_return
number or nullMedian days until a visitor's second day.
grain
stringneeded`week` or `month`.
site
stringneeded
what
stringneeded`visit`, or a goal's name.

Asking

With your token from Settings
curl https://tidekeeper.eu/api/v1/sites/example.org/retention \
    -H "Authorization: Bearer $TIDEKEEPER_TOKEN"
With your token from Settings
const answer = await fetch("https://tidekeeper.eu/api/v1/sites/example.org/retention", {
  headers: {
    Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`,
  },
}).then((r) => r.json());