Skip to main content
← /features/insights
TRACKLAYER · RETENTION ANALYTICS

Cohort retention —
see why your channels diverge.

TrackLayer's cohort retention view groups customers by acquisition cohort (month), tracks retention across time periods, and segments by acquisition channel. See attribution-shift detection, at-risk customer identification, and channel ROI clarity in one dashboard.
WHY COHORT RETENTION MATTERS
  • Attribution-shift detection: See when a channel's early-month retention diverges from later-month baseline (Phase 3.7)
  • At-risk customer identification: Find cohorts dropping below retention threshold before they fully churn
  • Channel ROI clarity: Compare LTV across channels with retention context — not just first-month revenue
  • Post-deploy regression detection: If a checkout change hurts channel-specific retention, you'll see it immediately

Most attribution tools show you conversion events. TrackLayer shows you what happens after — which customers stay active, which channels retain them, and why some channels deliver better ROI than they look on day one.

$ v_cohort_retention · sample view
// cohort_retention · materialized view
SELECT * FROM v_cohort_retention
cohort_month: 2026-03
acquisition_channel: Meta
M+0
M+1
M+2
M+3
M+4
M+5
retention_rate: 0.72
n/a
0.89
0.81
0.76
0.71
0.68
// 6 rows returned (Meta, Google, TikTok, Klaviyo, Direct, Email)
// Dashboard surface: /insights/cohort-retention renders heatmap with channel grouping
§ 01

How TrackLayer's cohort retention works.

v_cohort_retention materialized view + dashboard surface. Group by cohort_month × channel. Future-month cells show 'not yet observed' instead of falsely 0%.
§ 01
Define cohort month
Cohort month = first purchase month. Group all customers by month of first purchase.
§ 02
Track retention over time
For each cohort, track % of customers with purchase in subsequent months (M+0 through M+5).
§ 03
Segment by channel
Cross-tabulate by acquisition_channel (Meta, Google, TikTok, Klaviyo, Direct, Email).
§ 04
Materialized view
v_cohort_retention is a materialized view refreshed nightly. Query is fast, no joins on dashboard.
§ 05
Dashboard heatmap
/insights/cohort-retention shows retention heatmap with channel filter and cohort selection.
§ 06
Future-month handling
Cells where cohort_age >= future months show 'not yet observed' instead of 0%. Prevents misleading downward trends.
// v_cohort_retention · schema
CREATE MATERIALIZED VIEW v_cohort_retention AS
SELECT
  cohort_month,
  acquisition_channel,
  m0_retention_rate,
  m1_retention_rate,
  m2_retention_rate,
  m3_retention_rate,
  m4_retention_rate,
  m5_retention_rate,
  cohort_size
FROM (
  SELECT
    DATE_TRUNC(event_time, 'MONTH') AS cohort_month,
    acquisition_channel,
    -- M+0: same-month retention (purchases within 30 days)
    COUNT(DISTINCT customer_id) FILTER (
      WHERE event_name = 'purchase' AND
      event_time BETWEEN cohort_month AND cohort_month + INTERVAL '30 days'
    ) OVER (PARTITION BY cohort_month, acquisition_channel)::FLOAT / NULLIF(COUNT(DISTINCT customer_id)
      FILTER (WHERE event_name = 'purchase') OVER (PARTITION BY cohort_month, acquisition_channel), 0),
    -- M+1 through M+5: retention for months 1-5
    ... [calculated per month_offset]
  FROM events
  GROUP BY cohort_month, acquisition_channel
);
-- Refreshed nightly for dashboard performance
§ 02

Data accuracy: future-month cells show 'not yet observed'.

A common problem in cohort charts is falsely treating future months as 0% retention. TrackLayer handles this correctly — cells that can't be observed yet display as empty/null instead of zero.

The problem

Future months are impossible to observe. When you view a March 2026 cohort in April 2026, the retention rate for months 4, 5, and 6 cannot exist yet — no data has been collected.

Many cohort tools treat these as 0% retention, which creates a misleading downward trend. The chart shows a declining line when in reality the data just doesn't exist yet.

How TrackLayer fixes it

Conditional null display.v_cohort_retention marks cells where cohort_age >= future_months as NULL. Dashboard renders "not yet observed" with a subtle visual cue.

Auto-refresh. Materialized view refreshes nightly. As time passes, NULL cells become actual retention rates automatically — no manual refresh needed.

§ 03

Per-channel benchmarks.

Compare Meta, Google, Klaviyo, and Direct channels side-by-side. See which channels retain customers better and which channels have the steepest drop-off.
META
0.81
▲ +0.09 vs avg

Strong M+0 retention. Meta customers convert early and stay engaged.
GOOGLE
0.72
▼ -0.12 vs avg

Steeper drop-off. High intent, lower second-month retention.
KLAVIYO
0.76
○ 0.00 vs avg

Email-first retention. Lower first-month, strong email engagement.
DIRECT
0.68
○ 0.00 vs avg

Consistent drop-off. Lower intent than paid channels.

Insight: Meta shows strongest retention but highest CAC. Klaviyo shows lower first-month retention (email-heavy) but stable engagement. Google has high intent (lower first-month) but steeper decline — may indicate quality issues.

§ 04

How it links to LTV prediction.

Cohort retention and LTV prediction (Phase 7.4 + 8.6) share the RFM customer model. Combine retention behavior with monetary value to predict full lifetime value.
SHARED CUSTOMER MODEL
  • RFM = Recency (days since last purchase) + Frequency (purchases in 90 days) + Monetary (spend in 90 days)
  • LTV prediction uses RFM quintiles (champion/loyal/at_risk/potential/lost)
  • Cohort retention adds time-dimension to RFM: see if customer segments retain differently over months
  • Combined view: A high-Monetary but low-Frequency customer may have high LTV but low retention
// rfm_segments · cohort crossover
customer_id | rfm_segment | predicted_ltv | m0_retention | m1_retention | m2_retention | acquisition_channel
------------+-------------+--------------+-------------+-------------+-------------+-------------+--------------------
cust_abc    | loyal        | $842         | 0.81        | 0.76        | 0.74        | Meta
cust_def    | at_risk      | $326         | 0.42        | 0.28        | 0.21        | Google
cust_ghi    | champion     | $2,147        | 0.89        | 0.84        | 0.81        | Klaviyo
cust_jkl    | lost         | $87          | 0.12        | 0.08        | 0.05        | Direct

// Insight: Google has high predicted LTV ($326) but poor retention (21% by M2)
// Action: Investigate Google post-purchase flow or consider channel optimization
// HOW IT COMPARES

Other tools vs TrackLayer Cohort Retention.

CAPABILITYTRACKLAYERStapeElevar
Cohort retention dashboard~~
Channel-attributed cohorts
Future-month 'not yet observed'
Materialized view (fast query)~
LTV crossover insights
Dashboard heatmap surface~~
TRACKLAYER
Cohort retention dashboard
Channel-attributed cohorts
Future-month 'not yet observed'
Materialized view (fast query)
LTV crossover insights
Dashboard heatmap surface
Stape
Cohort retention dashboard
~
Channel-attributed cohorts
Future-month 'not yet observed'
Materialized view (fast query)
LTV crossover insights
Dashboard heatmap surface
~
Elevar
Cohort retention dashboard
~
Channel-attributed cohorts
Future-month 'not yet observed'
Materialized view (fast query)
~
LTV crossover insights
Dashboard heatmap surface
~
// AVAILABLE ON

Pro and Enterprise.

Cohort retention is part of Pro tier ($299/mo). Enterprise adds custom cohort windows, export to warehouse, and LTV prediction integration.
PRO · $299/moENTERPRISE · custom
§ A

Channel-attributed cohorts

Group by acquisition channel. Meta, Google, TikTok, Klaviyo, Direct.

§ B

Retention heatmap

Visualize cohort × month matrix. Filter by channel, drill into cohorts.

§ C

Future-month handling

'Not yet observed' cells. No false zero trends.

§ D

LTV crossover

Combined RFM + retention view (Phase 7.4 + 8.6).

NEXT

See channel divergence.
Fix attribution drift.

14-day free trial on the Pro plan. Cohort retention dashboard runs from your first purchase event. No credit card.
START FREE TRIAL →BOOK A DEMO
PRO · $299/MO · 14-DAY TRIAL · NO CC · CANCEL ANYTIME
// RELATED

Other analytics & retention features.

§ 01
Insights Engine
Six AI detectors for delivery quality, coverage gaps, duplicates, identity gaps, quota trajectory, latency outliers.
§ 02
Predictive LTV with RFM
RFM quintiles segment customers into champion/loyal/at_risk/potential/lost. Track segment trajectory. Predicted LTV without warehouse.
§ 03
Predictive Scoring
Score every event 0–100 before send. Bottom-decile events never reach Meta CAPI, lifting EMQ.

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.

We use essential cookies to keep the site secure and functional. Analytics and third-party tags run only with your consent. See our Cookie Policy.