{"title":"Retention","description":"Measure how cohorts that perform a starting event come back and perform a returning event over time.","order":750,"askSuggestions":["What is the difference between Return on and Return on or after?","How do I compare retention across plans or channels?","Why don't my retention numbers match other analytics tools?"],"navigation":true,"body":{"code":"var Component=(()=>{var g=Object.create;var s=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),v=(t,e)=>{for(var i in e)s(t,i,{get:e[i],enumerable:!0})},c=(t,e,i,r)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let o of p(e))!y.call(t,o)&&o!==i&&s(t,o,{get:()=>e[o],enumerable:!(r=f(e,o))||r.enumerable});return t};var b=(t,e,i)=>(i=t!=null?g(m(t)):{},c(e||!t||!t.__esModule?s(i,\"default\",{value:t,enumerable:!0}):i,t)),x=t=>c(s({},\"__esModule\",{value:!0}),t);var d=w((I,h)=>{h.exports=_jsx_runtime});var k={};v(k,{default:()=>u,frontmatter:()=>R});var n=b(d()),R={title:\"Retention\",description:\"Measure how cohorts that perform a starting event come back and perform a returning event over time.\",order:750,askSuggestions:[\"What is the difference between Return on and Return on or after?\",\"How do I compare retention across plans or channels?\",\"Why don't my retention numbers match other analytics tools?\"]};function l(t){let e={a:\"a\",h1:\"h1\",h2:\"h2\",li:\"li\",ol:\"ol\",p:\"p\",strong:\"strong\",ul:\"ul\",...t.components},{DocsPreviewDocument:i,DocsPreviewSection:r,Screenshot:o}=e;return i||a(\"DocsPreviewDocument\",!0),r||a(\"DocsPreviewSection\",!0),o||a(\"Screenshot\",!0),(0,n.jsxs)(i,{anchors:\"retention-insights creating-retention-insights how-this-differs-from-segmentation practical-notes related\",children:[(0,n.jsxs)(r,{sectionId:\"retention-insights\",sectionTitle:\"Retention Insights\",anchors:\"\",ancestors:\"\",index:\"0\",children:[(0,n.jsx)(e.h1,{id:\"retention-insights\",children:\"Retention Insights\"}),`\n`,(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.strong,{children:\"Retention\"}),\" insights plot classic cohort retention: users or other entities who did a \",(0,n.jsx)(e.strong,{children:\"starting event\"}),\" in a period, then whether they performed a \",(0,n.jsx)(e.strong,{children:\"returning event\"}),\" again in later time buckets. Use them to see whether new signups, activated users, or any cohort keep engaging over days or weeks.\"]}),`\n`,(0,n.jsx)(e.p,{children:(0,n.jsx)(e.strong,{children:\"Best for:\"})}),`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsx)(e.li,{children:'Onboarding and activation (\"did they come back after signup?\")'}),`\n`,(0,n.jsx)(e.li,{children:'Habit and repeat usage (\"after first purchase, when do they return?\")'}),`\n`,(0,n.jsxs)(e.li,{children:[\"Comparing cohorts side by side with \",(0,n.jsx)(e.strong,{children:\"Segmented by\"}),\" filters\"]}),`\n`]}),`\n`,(0,n.jsx)(e.p,{children:(0,n.jsx)(e.strong,{children:\"Example questions:\"})}),`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsx)(e.li,{children:'\"What share of signups used the product again on day 1, 7, and 30?\"'}),`\n`,(0,n.jsx)(e.li,{children:`\"After a user's first key action, how does return behavior differ by plan or channel?\"`}),`\n`]}),`\n`]}),(0,n.jsxs)(r,{sectionId:\"creating-retention-insights\",sectionTitle:\"Creating Retention Insights\",anchors:\"\",ancestors:\"\",index:\"1\",children:[(0,n.jsx)(e.h2,{id:\"creating-retention-insights\",children:\"Creating Retention Insights\"}),`\n`,(0,n.jsxs)(e.ol,{children:[`\n`,(0,n.jsxs)(e.li,{children:[\"Open \",(0,n.jsx)(e.strong,{children:\"Insights\"}),\" and create or edit a chart.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[\"In the insight type control, choose \",(0,n.jsx)(e.strong,{children:\"Retention\"}),'. The control is labeled \"Retention insight\" when selected.']}),`\n`,(0,n.jsxs)(e.li,{children:[\"Configure \",(0,n.jsx)(e.strong,{children:\"Starting event\"}),\": the action that puts users into the cohort, for example sign up or first purchase.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[\"Configure \",(0,n.jsx)(e.strong,{children:\"Returning event\"}),': the action that counts as \"retained\", often the same event as the starting event or a deeper engagement event.']}),`\n`,(0,n.jsxs)(e.li,{children:[\"Set \",(0,n.jsx)(e.strong,{children:\"Measured as\"}),\":\",`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"Return on or after\"}),\": a user counts as retained in a bucket if they performed the returning event on that day or any later bucket in the window.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"Return on\"}),\": retained only if they performed the returning event in that specific bucket.\"]}),`\n`]}),`\n`]}),`\n`,(0,n.jsxs)(e.li,{children:[\"Set \",(0,n.jsx)(e.strong,{children:\"Calculated by\"}),\":\",`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"24-hour windows\"}),\": periods are aligned in 24-hour windows from the cohort start.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"Strict calendar day\"}),\": periods follow calendar days, which can differ from rolling 24-hour logic.\"]}),`\n`]}),`\n`]}),`\n`,(0,n.jsxs)(e.li,{children:[\"Optionally add \",(0,n.jsx)(e.strong,{children:\"Segmented by\"}),\" segments to compare multiple cohort curves on the same chart.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[\"Use \",(0,n.jsx)(e.strong,{children:\"Query variables\"}),\" when your chart defines them, such as date range or interval, so the preview matches the period you care about.\"]}),`\n`]}),`\n`,(0,n.jsxs)(e.p,{children:[\"The preview shows a cohort retention visualization. Use the \",(0,n.jsx)(e.strong,{children:\"Results\"}),\" tab for the table and \",(0,n.jsx)(e.strong,{children:\"SQL\"}),\" to inspect the generated queries.\"]}),`\n`,(0,n.jsx)(o,{story:\"charts-retentionchart--single-cohort\",caption:\"Retention insight preview: cohort retention curve over day offsets\",width:\"1856\",height:\"1096\"}),`\n`]}),(0,n.jsxs)(r,{sectionId:\"how-this-differs-from-segmentation\",sectionTitle:\"How this differs from segmentation\",anchors:\"\",ancestors:\"\",index:\"2\",children:[(0,n.jsx)(e.h2,{id:\"how-this-differs-from-segmentation\",children:\"How this differs from segmentation\"}),`\n`,(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.a,{href:\"/docs/product-analytics/segmentation\",children:\"Segmentation insights\"}),\" compare metrics and breakdowns over time. \",(0,n.jsx)(e.strong,{children:\"Retention\"}),\" insights are optimized for \",(0,n.jsx)(e.strong,{children:\"cohort \\xD7 offset\"}),' curves from exactly two events plus retention-specific measurement rules. Use segmentation when you are comparing groups on a single metric; use retention when the question is explicitly \"of people who did X, what percentage did Y again after N days?\"']}),`\n`]}),(0,n.jsxs)(r,{sectionId:\"practical-notes\",sectionTitle:\"Practical notes\",anchors:\"\",ancestors:\"\",index:\"3\",children:[(0,n.jsx)(e.h2,{id:\"practical-notes\",children:\"Practical notes\"}),`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsxs)(e.li,{children:[\"You must select \",(0,n.jsx)(e.strong,{children:\"both\"}),\" starting and returning events before the chart can run; the UI prompts you until both are set.\"]}),`\n`,(0,n.jsx)(e.li,{children:\"Retention uses the same event-step builder as funnels, so you can filter each side of the definition by properties, traits, and segments.\"}),`\n`,(0,n.jsxs)(e.li,{children:[\"Numbers may not match other analytics products exactly, because \",(0,n.jsx)(e.strong,{children:\"Measured as\"}),\", \",(0,n.jsx)(e.strong,{children:\"Calculated by\"}),\", timezone, and event definitions all affect cohort math. Trends and relative comparisons should still be reliable when definitions are held constant.\"]}),`\n`]}),`\n`]}),(0,n.jsxs)(r,{sectionId:\"related\",sectionTitle:\"Related\",anchors:\"\",ancestors:\"\",index:\"4\",children:[(0,n.jsx)(e.h2,{id:\"related\",children:\"Related\"}),`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:\"/docs/product-analytics/funnel\",children:\"Funnel insights\"}),\": sequential steps and conversion, not cohort return over offsets\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:\"/docs/product-analytics/segmentation\",children:\"Segmentation insights\"}),\": time series and breakdowns\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.a,{href:\"/docs/product-analytics/track\",children:\"Product analytics: track\"}),\": instrumenting the events retention depends on\"]}),`\n`]})]})]})}function u(t={}){let{wrapper:e}=t.components||{};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(l,{...t})}):l(t)}function a(t,e){throw new Error(\"Expected \"+(e?\"component\":\"object\")+\" `\"+t+\"` to be defined: you likely forgot to import, pass, or provide it.\")}return x(k);})();\n;return Component;"},"_id":"docs/product-analytics/retention.mdx","_raw":{"sourceFilePath":"docs/product-analytics/retention.mdx","sourceFileName":"retention.mdx","sourceFileDir":"docs/product-analytics","contentType":"mdx","flattenedPath":"docs/product-analytics/retention"},"type":"Docs","path":"/product-analytics/retention","level":2,"parent":"product-analytics"}