class Google::Apis::AnalyticsreportingV4::Cohort

Defines a cohort. A cohort is a group of users who share a common characteristic. For example, all users with the same acquisition date belong to the same cohort.

Attributes

date_range[RW]

A contiguous set of days: startDate, startDate + 1 day, …, endDate. The start and end dates are specified in [ISO8601](en.wikipedia.org/wiki/ ISO_8601) date format `YYYY-MM-DD`. Corresponds to the JSON property `dateRange` @return [Google::Apis::AnalyticsreportingV4::DateRange]

name[RW]

A unique name for the cohort. If not defined name will be auto-generated with values cohort_. Corresponds to the JSON property `name` @return [String]

type[RW]

Type of the cohort. The only supported type as of now is `FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated as `FIRST_VISIT_DATE` type cohort. Corresponds to the JSON property `type` @return [String]

Public Class Methods

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

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

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