public final class CohortSpec extends GeneratedMessageV3 implements CohortSpecOrBuilder
The specification of cohorts for a cohort report.
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.
For examples, see Cohort Report
Examples.
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.
Protobuf type google.analytics.data.v1beta.CohortSpec
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
COHORTS_FIELD_NUMBER
public static final int COHORTS_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
COHORTS_RANGE_FIELD_NUMBER
public static final int COHORTS_RANGE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
COHORT_REPORT_SETTINGS_FIELD_NUMBER
public static final int COHORT_REPORT_SETTINGS_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static CohortSpec getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static CohortSpec.Builder newBuilder()
newBuilder(CohortSpec prototype)
public static CohortSpec.Builder newBuilder(CohortSpec prototype)
public static CohortSpec parseDelimitedFrom(InputStream input)
public static CohortSpec parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static CohortSpec parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CohortSpec parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static CohortSpec parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CohortSpec parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CohortSpec parseFrom(CodedInputStream input)
public static CohortSpec parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static CohortSpec parseFrom(InputStream input)
public static CohortSpec parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static CohortSpec parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CohortSpec parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<CohortSpec> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getCohortReportSettings()
public CohortReportSettings getCohortReportSettings()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
getCohortReportSettingsOrBuilder()
public CohortReportSettingsOrBuilder getCohortReportSettingsOrBuilder()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
getCohorts(int index)
public Cohort getCohorts(int index)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
Parameter |
---|
Name | Description |
index | int
|
getCohortsCount()
public int getCohortsCount()
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
Returns |
---|
Type | Description |
int | |
getCohortsList()
public List<Cohort> getCohortsList()
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
getCohortsOrBuilder(int index)
public CohortOrBuilder getCohortsOrBuilder(int index)
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
Parameter |
---|
Name | Description |
index | int
|
getCohortsOrBuilderList()
public List<? extends CohortOrBuilder> getCohortsOrBuilderList()
Defines the selection criteria to group users into cohorts.
Most cohort reports define only a single cohort. If multiple cohorts are
specified, each cohort can be recognized in the report by their name.
repeated .google.analytics.data.v1beta.Cohort cohorts = 1;
Returns |
---|
Type | Description |
List<? extends com.google.analytics.data.v1beta.CohortOrBuilder> | |
getCohortsRange()
public CohortsRange getCohortsRange()
Cohort reports follow cohorts over an extended reporting date range. This
range specifies an offset duration to follow the cohorts over.
.google.analytics.data.v1beta.CohortsRange cohorts_range = 2;
getCohortsRangeOrBuilder()
public CohortsRangeOrBuilder getCohortsRangeOrBuilder()
Cohort reports follow cohorts over an extended reporting date range. This
range specifies an offset duration to follow the cohorts over.
.google.analytics.data.v1beta.CohortsRange cohorts_range = 2;
getDefaultInstanceForType()
public CohortSpec getDefaultInstanceForType()
getParserForType()
public Parser<CohortSpec> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
hasCohortReportSettings()
public boolean hasCohortReportSettings()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
Returns |
---|
Type | Description |
boolean | Whether the cohortReportSettings field is set.
|
hasCohortsRange()
public boolean hasCohortsRange()
Cohort reports follow cohorts over an extended reporting date range. This
range specifies an offset duration to follow the cohorts over.
.google.analytics.data.v1beta.CohortsRange cohorts_range = 2;
Returns |
---|
Type | Description |
boolean | Whether the cohortsRange field is set.
|
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public CohortSpec.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CohortSpec.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public CohortSpec.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides