Class: Google::Apis::AnalyticsdataV1alpha::Cohort

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/analyticsdata_v1alpha/classes.rb,
generated/google/apis/analyticsdata_v1alpha/representations.rb,
generated/google/apis/analyticsdata_v1alpha/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 firstTouchDate belong to the same cohort.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Cohort

Returns a new instance of Cohort.



185
186
187
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 185

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#date_rangeGoogle::Apis::AnalyticsdataV1alpha::DateRange

A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests are allowed up to 4 date ranges. Corresponds to the JSON property dateRange



170
171
172
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 170

def date_range
  @date_range
end

#dimensionString

Dimension used by the cohort. Required and only supports firstTouchDate. Corresponds to the JSON property dimension

Returns:

  • (String)


175
176
177
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 175

def dimension
  @dimension
end

#nameString

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

Returns:

  • (String)


183
184
185
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 183

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



190
191
192
193
194
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 190

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