Class: Google::Apis::AnalyticsdataV1alpha::Dimension

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

Dimensions are attributes of your data. For example, the dimension city indicates the city from which an event originates. Dimension values in report responses are strings; for example, city could be "Paris" or "New York". Requests are allowed up to 8 dimensions.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Dimension

Returns a new instance of Dimension.



407
408
409
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 407

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

Instance Attribute Details

#dimension_expressionGoogle::Apis::AnalyticsdataV1alpha::DimensionExpression

Used to express a dimension which is the result of a formula of multiple dimensions. Example usages: 1) lower_case(dimension) 2) concatenate(dimension1, symbol, dimension2). Corresponds to the JSON property dimensionExpression



394
395
396
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 394

def dimension_expression
  @dimension_expression
end

#nameString

The name of the dimension. See the API Dimensions for the list of dimension names. If dimensionExpression is specified, name can be any string that you would like. For example if a dimensionExpression concatenates country and city, you could call that dimension countryAndCity. Dimensions are referenced by name in dimensionFilter, orderBys, dimensionExpression, and pivots. Corresponds to the JSON property name

Returns:

  • (String)


405
406
407
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 405

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



412
413
414
415
# File 'generated/google/apis/analyticsdata_v1alpha/classes.rb', line 412

def update!(**args)
  @dimension_expression = args[:dimension_expression] if args.key?(:dimension_expression)
  @name = args[:name] if args.key?(:name)
end