Class: Google::Apis::AnalyticsdataV1beta::Cohort
- Inherits:
-
Object
- Object
- Google::Apis::AnalyticsdataV1beta::Cohort
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/analyticsdata_v1beta/classes.rb,
lib/google/apis/analyticsdata_v1beta/representations.rb,
lib/google/apis/analyticsdata_v1beta/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#date_range ⇒ Google::Apis::AnalyticsdataV1beta::DateRange
A contiguous set of days:
startDate
,startDate + 1
, ...,endDate
. -
#dimension ⇒ String
Dimension used by the cohort.
-
#name ⇒ String
Assigns a name to this cohort.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Cohort
constructor
A new instance of Cohort.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Cohort
Returns a new instance of Cohort.
390 391 392 |
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 390 def initialize(**args) update!(**args) end |
Instance Attribute Details
#date_range ⇒ Google::Apis::AnalyticsdataV1beta::DateRange
A contiguous set of days: startDate
, startDate + 1
, ..., endDate
.
Requests are allowed up to 4 date ranges.
Corresponds to the JSON property dateRange
375 376 377 |
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 375 def date_range @date_range end |
#dimension ⇒ String
Dimension used by the cohort. Required and only supports firstSessionDate
.
Corresponds to the JSON property dimension
380 381 382 |
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 380 def dimension @dimension end |
#name ⇒ String
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
388 389 390 |
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 388 def name @name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
395 396 397 398 399 |
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 395 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 |