Class: Google::Apis::AnalyticsreportingV4::Dimension
- Inherits:
-
Object
- Object
- Google::Apis::AnalyticsreportingV4::Dimension
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/analyticsreporting_v4/classes.rb,
generated/google/apis/analyticsreporting_v4/representations.rb,
generated/google/apis/analyticsreporting_v4/representations.rb
Overview
Dimensions
are attributes of your data. For example, the dimension ga:city
indicates the city, for example, "Paris" or "New York", from which
a session originates.
Instance Attribute Summary collapse
-
#histogram_buckets ⇒ Array<Fixnum>
If non-empty, we place dimension values into buckets after string to int64.
-
#name ⇒ String
Name of the dimension to fetch, for example
ga:browser.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Dimension
constructor
A new instance of Dimension.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Dimension
Returns a new instance of Dimension
723 724 725 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 723 def initialize(**args) update!(**args) end |
Instance Attribute Details
#histogram_buckets ⇒ Array<Fixnum>
If non-empty, we place dimension values into buckets after string to int64. Dimension values that are not the string representation of an integral value will be converted to zero. The bucket values have to be in increasing order. Each bucket is closed on the lower end, and open on the upper end. The "first" bucket includes all values less than the first boundary, the "last" bucket includes all values up to infinity. Dimension values that fall in a bucket get transformed to a new dimension value. For example, if one gives a list of "0, 1, 3, 4, 7", then we return the following buckets:
- bucket #1: values < 0, dimension value "<0"
- bucket #2: values in [0,1), dimension value "0"
- bucket #3: values in [1,3), dimension value "1-2"
- bucket #4: values in [3,4), dimension value "3"
- bucket #5: values in [4,7), dimension value "4-6"
- bucket #6: values >= 7, dimension value "7+"
NOTE: If you are applying histogram mutation on any dimension, and using
that dimension in sort, you will want to use the sort type
HISTOGRAM_BUCKETfor that purpose. Without that the dimension values will be sorted according to dictionary (lexicographic) order. For example the ascending dictionary order is: "<50", "1001+", "121-1000", "50-120" And the ascendingHISTOGRAM_BUCKETorder is: "<50", "50-120", "121-1000", "1001+" The client has to explicitly request"orderType": "HISTOGRAM_BUCKET"for a histogram-mutated dimension. Corresponds to the JSON propertyhistogramBuckets
716 717 718 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 716 def histogram_buckets @histogram_buckets end |
#name ⇒ String
Name of the dimension to fetch, for example ga:browser.
Corresponds to the JSON property name
721 722 723 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 721 def name @name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
728 729 730 731 |
# File 'generated/google/apis/analyticsreporting_v4/classes.rb', line 728 def update!(**args) @histogram_buckets = args[:histogram_buckets] if args.key?(:histogram_buckets) @name = args[:name] if args.key?(:name) end |