class Google::Apis::AnalyticsdataV1alpha::Cohort

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.

Attributes

date_range[RW]

A contiguous set of days: startDate, startDate + 1, …, endDate. Requests are allowed up to 4 date ranges. Corresponds to the JSON property `dateRange` @return [Google::Apis::AnalyticsdataV1alpha::DateRange]

dimension[RW]

Dimension used by the cohort. Required and only supports `firstSessionDate`. Corresponds to the JSON property `dimension` @return [String]

name[RW]

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. Corresponds to the JSON property `name` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/analyticsdata_v1alpha/classes.rb, line 201
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/analyticsdata_v1alpha/classes.rb, line 206
def update!(**args)
  @date_range = args[:date_range] if args.key?(:date_range)
  @dimension = args[:dimension] if args.key?(:dimension)
  @name = args[:name] if args.key?(:name)
end