# Google Analytics Data V1beta API - Class Google::Analytics::Data::V1beta::Dimension (v0.4.3)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.4.3 (latest)](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-Dimension)
- [0.4.2](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/0.4.2/Google-Analytics-Data-V1beta-Dimension)
Reference documentation and code samples for the Google Analytics Data V1beta API class Google::Analytics::Data::V1beta::Dimension.

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 9 dimensions.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #dimension_expression

    def dimension_expression() -> ::Google::Analytics::Data::V1beta::DimensionExpression

**Returns**

- ([::Google::Analytics::Data::V1beta::DimensionExpression](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-DimensionExpression)) --- One dimension can be the result of an expression of multiple dimensions. For example, dimension "country, city": concatenate(country, ", ", city).

### #dimension_expression=

    def dimension_expression=(value) -> ::Google::Analytics::Data::V1beta::DimensionExpression

**Parameter**

- **value** ([::Google::Analytics::Data::V1beta::DimensionExpression](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-DimensionExpression)) --- One dimension can be the result of an expression of multiple dimensions. For example, dimension "country, city": concatenate(country, ", ", city).
**Returns**

- ([::Google::Analytics::Data::V1beta::DimensionExpression](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-DimensionExpression)) --- One dimension can be the result of an expression of multiple dimensions. For example, dimension "country, city": concatenate(country, ", ", city).

### #name

    def name() -> ::String

**Returns**

- (::String) --- The name of the dimension. See the [API
  Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) for the list of dimension names.


  If `dimensionExpression` is specified, `name` can be any string that you
  would like within the allowed character set. For example if a
  `dimensionExpression` concatenates `country` and `city`, you could call
  that dimension `countryAndCity`. Dimension names that you choose must match
  the regular expression `^[a-zA-Z0-9_]$`.

  Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
  `dimensionExpression`, and `pivots`.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- The name of the dimension. See the [API
  Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) for the list of dimension names.


  If `dimensionExpression` is specified, `name` can be any string that you
  would like within the allowed character set. For example if a
  `dimensionExpression` concatenates `country` and `city`, you could call
  that dimension `countryAndCity`. Dimension names that you choose must match
  the regular expression `^[a-zA-Z0-9_]$`.

  Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
  `dimensionExpression`, and `pivots`.
**Returns**

- (::String) --- The name of the dimension. See the [API
  Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) for the list of dimension names.


  If `dimensionExpression` is specified, `name` can be any string that you
  would like within the allowed character set. For example if a
  `dimensionExpression` concatenates `country` and `city`, you could call
  that dimension `countryAndCity`. Dimension names that you choose must match
  the regular expression `^[a-zA-Z0-9_]$`.

  Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
  `dimensionExpression`, and `pivots`.