# Google Analytics Data V1beta Client - Class DimensionMetadata (0.24.0)

0.24.0 (latest) 0.23.3 0.22.3 0.21.1 0.20.1 0.19.0 0.18.0 0.17.1 0.16.4 0.14.0 0.13.0 0.12.0 0.11.2 0.10.1 0.9.5

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

Reference documentation and code samples for the Google Analytics Data V1beta Client class DimensionMetadata.

Explains a dimension.

Generated from protobuf message `google.analytics.data.v1beta.DimensionMetadata`

## Namespace

Google \\ Analytics \\ Data \\ V1beta

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ api_name` | `string` This dimension's name. Useable in [Dimension](https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.DimensionMetadata#Dimension)'s `name`. For example, `eventName`. |
| `↳ ui_name` | `string` This dimension's name within the Google Analytics user interface. For example, `Event name`. |
| `↳ description` | `string` Description of how this dimension is used and calculated. |
| `↳ deprecated_api_names` | `string[]` Still usable but deprecated names for this dimension. If populated, this dimension is available by either `apiName` or one of `deprecatedApiNames` for a period of time. After the deprecation period, the dimension will be available only by `apiName`. |
| `↳ custom_definition` | `bool` True if the dimension is custom to this property. This includes user, event, \& item scoped custom dimensions; to learn more about custom dimensions, see <https://support.google.com/analytics/answer/14240153>. This also include custom channel groups; to learn more about custom channel groups, see <https://support.google.com/analytics/answer/13051316>. |
| `↳ category` | `string` The display name of the category that this dimension belongs to. Similar dimensions and metrics are categorized together. |

### getApiName

This dimension's name. Useable in [Dimension](https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.DimensionMetadata#Dimension)'s `name`. For
example, `eventName`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setApiName

This dimension's name. Useable in [Dimension](https://docs.cloud.google.com/php/docs/reference/analytics-data/latest/V1beta.DimensionMetadata#Dimension)'s `name`. For
example, `eventName`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUiName

This dimension's name within the Google Analytics user interface. For
example, `Event name`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setUiName

This dimension's name within the Google Analytics user interface. For
example, `Event name`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDescription

Description of how this dimension is used and calculated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDescription

Description of how this dimension is used and calculated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDeprecatedApiNames

Still usable but deprecated names for this dimension. If populated, this
dimension is available by either `apiName` or one of `deprecatedApiNames`
for a period of time. After the deprecation period, the dimension will be
available only by `apiName`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setDeprecatedApiNames

Still usable but deprecated names for this dimension. If populated, this
dimension is available by either `apiName` or one of `deprecatedApiNames`
for a period of time. After the deprecation period, the dimension will be
available only by `apiName`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCustomDefinition

True if the dimension is custom to this property. This includes user,
event, \& item scoped custom dimensions; to learn more about custom
dimensions, see <https://support.google.com/analytics/answer/14240153>. This
also include custom channel groups; to learn more about custom channel
groups, see <https://support.google.com/analytics/answer/13051316>.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setCustomDefinition

True if the dimension is custom to this property. This includes user,
event, \& item scoped custom dimensions; to learn more about custom
dimensions, see <https://support.google.com/analytics/answer/14240153>. This
also include custom channel groups; to learn more about custom channel
groups, see <https://support.google.com/analytics/answer/13051316>.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCategory

The display name of the category that this dimension belongs to. Similar
dimensions and metrics are categorized together.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setCategory

The display name of the category that this dimension belongs to. Similar
dimensions and metrics are categorized together.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |