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
Static Fields
COHORTS_FIELD_NUMBER
public static final int COHORTS_FIELD_NUMBER
Field Value
COHORTS_RANGE_FIELD_NUMBER
public static final int COHORTS_RANGE_FIELD_NUMBER
Field Value
COHORT_REPORT_SETTINGS_FIELD_NUMBER
public static final int COHORT_REPORT_SETTINGS_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static CohortSpec getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static CohortSpec.Builder newBuilder()
Returns
newBuilder(CohortSpec prototype)
public static CohortSpec.Builder newBuilder(CohortSpec prototype)
Parameter
Returns
public static CohortSpec parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static CohortSpec parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static CohortSpec parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CohortSpec parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static CohortSpec parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CohortSpec parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static CohortSpec parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static CohortSpec parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static CohortSpec parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static CohortSpec parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static CohortSpec parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CohortSpec parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<CohortSpec> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getCohortReportSettings()
public CohortReportSettings getCohortReportSettings()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
Returns
getCohortReportSettingsOrBuilder()
public CohortReportSettingsOrBuilder getCohortReportSettingsOrBuilder()
Optional settings for a cohort report.
.google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3;
Returns
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
Returns
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
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;
Returns
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
Returns
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;
Returns
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;
Returns
getDefaultInstanceForType()
public CohortSpec getDefaultInstanceForType()
Returns
getParserForType()
public Parser<CohortSpec> getParserForType()
Returns
Overrides
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
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
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public CohortSpec.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CohortSpec.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public CohortSpec.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions