Retention
Retention cohorts: visitors grouped by when they were first seen, and the share of each cohort that came back in each later day, week or month (values[0] is always 1; null means that interval has not happened yet). Also returns the size-weighted average per interval. Use it for “do people come back” questions. Returns the 12 most recent cohorts. Only identified visitors (identify()) and, on sites with persistent visitors, every visitor are counted; daily anonymous ids never return. Takes range (a preset) or from and to, optional compare and filters. Rates are 0..1.
Authorizations
Path Parameters
Query Parameters
Preset period: today (today), yesterday (yesterday), 24h (last 24 hours), 7d (last 7 days), 30d (last 30 days), 90d (last 90 days), mtd (month to date), last_month (last month), ytd (year to date), 12m (last 12 months), all (all time). Defaults to 30d. Use either this or from and to.
today, yesterday, 24h, 7d, 30d, 90d, mtd, last_month, ytd, 12m, all Narrow the data. Repeat the parameter to add filters; all must match. Format: dimension:op:value, for example country:is:DE. Dimensions: page, entry_page, exit_page, hostname, channel, source, referrer, utm_source, utm_medium, utm_campaign, utm_term, utm_content, country, region, city, browser, os, device, language, event, ai_assistant. Operators: is, is_not, contains.