Class: Google::Apis::AnalyticsdataV1beta::RunPivotReportRequest

Inherits:
Object
  • Object
show all
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

The request to generate a pivot report.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RunPivotReportRequest

Returns a new instance of RunPivotReportRequest.



1955
1956
1957
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1955

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

Instance Attribute Details

#cohort_specGoogle::Apis::AnalyticsdataV1beta::CohortSpec

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. Corresponds to the JSON property cohortSpec



1876
1877
1878
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1876

def cohort_spec
  @cohort_spec
end

#currency_codeString

A currency code in ISO4217 format, such as "AED", "USD", "JPY". If the field is empty, the report uses the property's default currency. Corresponds to the JSON property currencyCode

Returns:

  • (String)


1882
1883
1884
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1882

def currency_code
  @currency_code
end

#date_rangesArray<Google::Apis::AnalyticsdataV1beta::DateRange>

The date range to retrieve event data for the report. If multiple date ranges are specified, event data from each date range is used in the report. A special dimension with field name "dateRange" can be included in a Pivot's field names; if included, the report compares between date ranges. In a cohort request, this dateRanges must be unspecified. Corresponds to the JSON property dateRanges



1891
1892
1893
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1891

def date_ranges
  @date_ranges
end

#dimension_filterGoogle::Apis::AnalyticsdataV1beta::FilterExpression

To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics. Corresponds to the JSON property dimensionFilter



1897
1898
1899
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1897

def dimension_filter
  @dimension_filter
end

#dimensionsArray<Google::Apis::AnalyticsdataV1beta::Dimension>

The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys. Corresponds to the JSON property dimensions



1903
1904
1905
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1903

def dimensions
  @dimensions
end

#keep_empty_rowsBoolean Also known as: keep_empty_rows?

If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter. Regardless of this keep_empty_rows setting, only data recorded by the Google Analytics (GA4) property can be displayed in a report. For example if a property never logs a purchase event, then a query for the eventName dimension and eventCount metric will not have a row eventName: " purchase" and eventCount: 0. Corresponds to the JSON property keepEmptyRows

Returns:

  • (Boolean)


1914
1915
1916
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1914

def keep_empty_rows
  @keep_empty_rows
end

#metric_filterGoogle::Apis::AnalyticsdataV1beta::FilterExpression

To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics. Corresponds to the JSON property metricFilter



1921
1922
1923
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1921

def metric_filter
  @metric_filter
end

#metricsArray<Google::Apis::AnalyticsdataV1beta::Metric>

The metrics requested, at least one metric needs to be specified. All defined metrics must be used by one of the following: metric_expression, metric_filter, order_bys. Corresponds to the JSON property metrics



1928
1929
1930
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1928

def metrics
  @metrics
end

#pivotsArray<Google::Apis::AnalyticsdataV1beta::Pivot>

Describes the visual format of the report's dimensions in columns or rows. The union of the fieldNames (dimension names) in all pivots must be a subset of dimension names defined in Dimensions. No two pivots can share a dimension. A dimension is only visible if it appears in a pivot. Corresponds to the JSON property pivots



1936
1937
1938
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1936

def pivots
  @pivots
end

#propertyString

A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see where to find your Property ID. Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/ 1234 Corresponds to the JSON property property

Returns:

  • (String)


1946
1947
1948
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1946

def property
  @property
end

#return_property_quotaBoolean Also known as: return_property_quota?

Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in PropertyQuota. Corresponds to the JSON property returnPropertyQuota

Returns:

  • (Boolean)


1952
1953
1954
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1952

def return_property_quota
  @return_property_quota
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
# File 'lib/google/apis/analyticsdata_v1beta/classes.rb', line 1960

def update!(**args)
  @cohort_spec = args[:cohort_spec] if args.key?(:cohort_spec)
  @currency_code = args[:currency_code] if args.key?(:currency_code)
  @date_ranges = args[:date_ranges] if args.key?(:date_ranges)
  @dimension_filter = args[:dimension_filter] if args.key?(:dimension_filter)
  @dimensions = args[:dimensions] if args.key?(:dimensions)
  @keep_empty_rows = args[:keep_empty_rows] if args.key?(:keep_empty_rows)
  @metric_filter = args[:metric_filter] if args.key?(:metric_filter)
  @metrics = args[:metrics] if args.key?(:metrics)
  @pivots = args[:pivots] if args.key?(:pivots)
  @property = args[:property] if args.key?(:property)
  @return_property_quota = args[:return_property_quota] if args.key?(:return_property_quota)
end