Cohort reports create a time series of user retention for the cohort. For example, you could select the cohort of users that were acquired in the first week of September and follow that cohort for the next six weeks. Selecting the users acquired in the first week of September cohort is specified in the cohort object. Following that cohort for the next six weeks is specified in the cohortsRange object.
The report response could show a weekly time series where say your app has retained 60% of this cohort after three weeks and 25% of this cohort after six weeks. These two percentages can be calculated by the metric cohortActiveUsers/cohortTotalUsers and will be separate rows in the report.
Defines a cohort selection criteria. A cohort is a group of users who share a common characteristic. For example, users with the same firstSessionDate belong to the same cohort.
Assigns a name to this cohort. The dimension cohort is valued to this name in a report response. If set, cannot begin with cohort_ or RESERVED_. If not set, cohorts are named by their zero based index cohort_0, cohort_1, etc.
dimension
string
Dimension used by the cohort. Required and only supports firstSessionDate.
The cohort selects users whose first touch date is between start date and end date defined in the dateRange. This dateRange does not specify the full date range of event data that is present in a cohort report. In a cohort report, this dateRange is extended by the granularity and offset present in the cohortsRange; event data for the extended reporting date range is present in a cohort report.
In a cohort request, this dateRange is required and the dateRanges in the RunReportRequest or RunPivotReportRequest must be unspecified.
This dateRange should generally be aligned with the cohort's granularity. If CohortsRange uses daily granularity, this dateRange can be a single day. If CohortsRange uses weekly granularity, this dateRange can be aligned to a week boundary, starting at Sunday and ending Saturday. If CohortsRange uses monthly granularity, this dateRange can be aligned to a month, starting at the first and ending on the last day of the month.
CohortsRange
Configures the extended reporting date range for a cohort report. Specifies an offset duration to follow the cohorts over.
Required. The granularity used to interpret the startOffset and endOffset for the extended reporting date range for a cohort report.
startOffset
integer
startOffset specifies the start date of the extended reporting date range for a cohort report. startOffset is commonly set to 0 so that reports contain data from the acquisition of the cohort forward.
If granularity is DAILY, the startDate of the extended reporting date range is startDate of the cohort plus startOffset days.
If granularity is WEEKLY, the startDate of the extended reporting date range is startDate of the cohort plus startOffset * 7 days.
If granularity is MONTHLY, the startDate of the extended reporting date range is startDate of the cohort plus startOffset * 30 days.
endOffset
integer
Required. endOffset specifies the end date of the extended reporting date range for a cohort report. endOffset can be any positive integer but is commonly set to 5 to 10 so that reports contain data on the cohort for the next several granularity time periods.
If granularity is DAILY, the endDate of the extended reporting date range is endDate of the cohort plus endOffset days.
If granularity is WEEKLY, the endDate of the extended reporting date range is endDate of the cohort plus endOffset * 7 days.
If granularity is MONTHLY, the endDate of the extended reporting date range is endDate of the cohort plus endOffset * 30 days.
Granularity
The granularity used to interpret the startOffset and endOffset for the extended reporting date range for a cohort report.
Enums
GRANULARITY_UNSPECIFIED
Should never be specified.
DAILY
Daily granularity. Commonly used if the cohort's dateRange is a single day and the request contains cohortNthDay.
WEEKLY
Weekly granularity. Commonly used if the cohort's dateRange is a week in duration (starting on Sunday and ending on Saturday) and the request contains cohortNthWeek.
MONTHLY
Monthly granularity. Commonly used if the cohort's dateRange is a month in duration and the request contains cohortNthMonth.
CohortReportSettings
Optional settings of a cohort report.
JSON representation
{"accumulate": boolean}
Fields
accumulate
boolean
If true, accumulates the result from first touch day to the end day. Not supported in RunReportRequest.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["Defines the selection criteria for grouping users into cohorts based on shared characteristics, such as their first session date."],["Specifies an extended reporting date range to follow cohorts over time, allowing for analysis of user retention and behavior."],["Enables the creation of time series reports that track user retention for a specific cohort over a defined period, such as weeks or months."],["Offers optional settings to customize cohort reports, including the ability to accumulate results from the first touch day to the end day and name cohorts for easy identification."],["Utilizes granularity options like daily, weekly, and monthly to align with the cohort's date range and reporting needs."]]],["Cohort reports track user retention over time. To generate a report, you define `cohorts`, specifying user grouping criteria (e.g., `firstSessionDate`) within a `dateRange`. `CohortsRange` determines the reporting duration beyond the initial `dateRange` using `startOffset` and `endOffset`, with `granularity` (`DAILY`, `WEEKLY`, `MONTHLY`) determining time period lengths. Each cohort can be named, and a report can track multiple named cohorts. `CohortReportSettings` provides optional configurations, such as accumulating results over time.\n"]]