← Back to Dimensions

Retention Type

RetentionRetail

Classifies the method used to measure user retention by defining the return logic applied to a cohort. It categorises retained users into standard analytical retention frameworks such as classic/unbounded retention, rolling retention, bracketed retention, and strict day-N retention so teams can compare retention results consistently across reports and tools.

Business Use Case

A growth team compares D7 retention for a mobile app using Strict Day-N Retention versus Rolling Retention to understand whether users are returning exactly on day 7 or simply returning any time after day 7. Finance and product teams then align on one retention type for board reporting to avoid conflicting KPI values.

Business Criticality

High

Journey / Navigation Area

Digital Analytics

Scope

User

Formula

CASE WHEN retention_logic IN ('classic','unbounded') THEN 'Classic Retention' WHEN retention_logic IN ('rolling') THEN 'Rolling Retention' WHEN retention_logic IN ('bracketed','range') THEN 'Bracketed Retention' WHEN retention_logic IN ('strict','day_n','exact_day') THEN 'Strict Day-N Retention' ELSE 'Other' END

Calculation Notes

1️⃣ Define and govern allowed values centrally for retention types. 2️⃣ Populate retention dimensions in the semantic layer or BI model, not on every digital event. 3️⃣ Use the same cohort start rule across all retention types (e.g., first_seen_date). 4️⃣ Strict Day-N counts return only on the exact day; rolling counts return on or after the target day. 5️⃣ Bracketed retention counts return within a defined range (e.g., days 7-13). 6️⃣ Classic retention refers to exact-period cohort retention in dashboards. 7️⃣ Avoid mixing user-based and account-based retention definitions in the same field.

Technical Details

Data Typestring
Lookback WindowUser, Time based - Daily/Monthly/Yearly, Global

Events

Data Mappings

W3 Data Layer
{
  "event": "retention_measurement",
  "retention": {
    "type": "Classic Retention",
    "logic": "user returned in exact analysis period based on cohort start date",
    "cohort_date": "2026-04-01",
    "return_window": "day_7"
  }
}
GA4 Data Layer
{
  "event": "retention_measurement",
  "retention_type": "Classic Retention",
  "retention_logic": "classic",
  "cohort_date": "2026-04-01",
  "return_window": "day_7"
}
Adobe Client Data Layer
{
  "event": "retention_measurement",
  "xdm": {
    "_experience": {
      "analytics": {
        "customDimensions": {
          "eVars": {
            "eVar42": "Classic Retention"
          }
        }
      }
    },
    "retention": {
      "type": "Classic Retention",
      "logic": "classic",
      "cohortDate": "2026-04-01",
      "returnWindow": "day_7"
    }
  }
}
XDM Mapping
{
  "path": "_experience.analytics.customDimensions.eVars.eVar42",
  "additional_mappings": {
    "retention.type": "xdm:retention.type",
    "retention.logic": "xdm:retention.logic",
    "retention.cohortDate": "xdm:retention.cohortDate",
    "retention.returnWindow": "xdm:retention.returnWindow"
  }
}

SQL Queries

Google Analytics 4 (BigQuery)
WITH user_activity AS (SELECT user_pseudo_id AS user_id, DATE(MIN(TIMESTAMP_MICROS(event_timestamp))) AS cohort_date, DATE(TIMESTAMP_MICROS(event_timestamp)) AS activity_date FROM `project.dataset.raw_events`, UNNEST(event_params) AS params WHERE params.key = 'event_name' AND params.value.string_value = 'purchase' GROUP BY user_id, activity_date), retention_base AS (SELECT user_id, cohort_date, activity_date, DATE_DIFF(activity_date, cohort_date, DAY) AS days_since_cohort FROM user_activity) SELECT user_id, cohort_date, CASE WHEN days_since_cohort = 7 THEN 'Strict Day-N Retention' WHEN days_since_cohort >= 7 THEN 'Rolling Retention' WHEN days_since_cohort BETWEEN 7 AND 13 THEN 'Bracketed Retention' ELSE 'Classic Retention' END AS retention_type FROM retention_base WHERE days_since_cohort >= 0;
Adobe Experience Platform (AEP Query Service)
WITH user_activity AS (SELECT identityMap.ECID[0].id AS user_id, DATE(MIN(eventTimestamp)) AS cohort_date, DATE(eventTimestamp) AS activity_date FROM xdmExperienceEvent WHERE eventType = 'commerce.purchases' GROUP BY user_id, activity_date), retention_base AS (SELECT user_id, cohort_date, activity_date, DATEDIFF(activity_date, cohort_date) AS days_since_cohort FROM user_activity) SELECT user_id, cohort_date, CASE WHEN days_since_cohort = 7 THEN 'Strict Day-N Retention' WHEN days_since_cohort >= 7 THEN 'Rolling Retention' WHEN days_since_cohort BETWEEN 7 AND 13 THEN 'Bracketed Retention' ELSE 'Classic Retention' END AS retention_type FROM retention_base WHERE days_since_cohort >= 0;

Source Data

Digital Analytics, Business Intelligence, CRM, Product Analytics, Data Warehouse

Dependencies

Prerequisite: List the dependencies required for this Dimension

Events:

sign_upfirst_key_action

Report Attributes

Dimensions: Retention type, Cohort date, Return window, User segment Metrics: Retained users, Retention rate, Active users, Churn rate KPIs: D1 retention, D7 retention, D30 retention, Repeat purchase rate

Segment Eligibility

True

Governance

Data SensitivityInternal

Derived Dimensions

Governance

Created byswapnamagantius
Created on4/28/2026
Last modified bydevyendarm
Last modified on6/3/2026
StatusPUBLISHED

GitHub

View related Pull Requestcatalog/dimensions/retention-type.yml

Community Discussion