# Google Analytics Data V1beta API - Class Google::Analytics::Data::V1beta::MetricHeader (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-MetricHeader)
- [0.4.2](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/0.4.2/Google-Analytics-Data-V1beta-MetricHeader)
Reference documentation and code samples for the Google Analytics Data V1beta API class Google::Analytics::Data::V1beta::MetricHeader.

Describes a metric column in the report. Visible metrics requested in a
report produce column entries within rows and MetricHeaders. However,
metrics used exclusively within filters or expressions do not produce columns
in a report; correspondingly, those metrics do not produce headers.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #name

    def name() -> ::String

**Returns**

- (::String) --- The metric's name.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- The metric's name.
**Returns**

- (::String) --- The metric's name.

### #type

    def type() -> ::Google::Analytics::Data::V1beta::MetricType

**Returns**

- ([::Google::Analytics::Data::V1beta::MetricType](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-MetricType)) --- The metric's data type.

### #type=

    def type=(value) -> ::Google::Analytics::Data::V1beta::MetricType

**Parameter**

- **value** ([::Google::Analytics::Data::V1beta::MetricType](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-MetricType)) --- The metric's data type.
**Returns**

- ([::Google::Analytics::Data::V1beta::MetricType](https://docs.cloud.google.com/ruby/docs/reference/google-analytics-data-v1beta/latest/Google-Analytics-Data-V1beta-MetricType)) --- The metric's data type.