- [HTTP request](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#body.request_body)
- [Response body](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#body.response_body)
  - [JSON representation](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#body.Metadata.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#body.aspect)
- [DimensionMetadata](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#DimensionMetadata)
  - [JSON representation](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#DimensionMetadata.SCHEMA_REPRESENTATION)
- [MetricMetadata](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#MetricMetadata)
  - [JSON representation](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#MetricMetadata.SCHEMA_REPRESENTATION)
- [BlockedReason](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#BlockedReason)
- [ComparisonMetadata](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#ComparisonMetadata)
  - [JSON representation](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#ComparisonMetadata.SCHEMA_REPRESENTATION)
- [ConversionMetadata](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#ConversionMetadata)
  - [JSON representation](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#ConversionMetadata.SCHEMA_REPRESENTATION)
- [Try it!](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#try-it)

Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata.

For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.

### HTTP request

`GET https://analyticsdata.googleapis.com/v1alpha/{name=properties/*/metadata}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics property identifier. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234/metadata Set the Property ID to 0 for dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics. |

### Request body

The request body must be empty.

### Response body

The dimensions, metrics and comparisons currently accepted in reporting methods.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "name": string, "dimensions": [ { object (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#DimensionMetadata`) } ], "metrics": [ { object (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#MetricMetadata`) } ], "comparisons": [ { object (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#ComparisonMetadata`) } ], "conversions": [ { object (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#ConversionMetadata`) } ] } ``` |

| Fields ||
|---|---|
| `name` | `string` Resource name of this metadata. |
| `dimensions[]` | ``object (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#DimensionMetadata`)`` The dimension descriptions. |
| `metrics[]` | ``object (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#MetricMetadata`)`` The metric descriptions. |
| `comparisons[]` | ``object (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#ComparisonMetadata`)`` The comparison descriptions. |
| `conversions[]` | ``object (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#ConversionMetadata`)`` The conversion descriptions. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/analytics.readonly`
- `https://www.googleapis.com/auth/analytics`

## DimensionMetadata

Explains a dimension.

| JSON representation |
|---|
| ``` { "apiName": string, "uiName": string, "description": string, "deprecatedApiNames": [ string ], "customDefinition": boolean, "category": string, "sections": [ enum (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Section`) ] } ``` |

| Fields ||
|---|---|
| `apiName` | `string` This dimension's name. Usable in [Dimension](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#Dimension)'s `name`. For example, `eventName`. |
| `uiName` | `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. |
| `deprecatedApiNames[]` | `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`. |
| `customDefinition` | `boolean` 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. |
| `sections[]` | ``enum (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Section`)`` Specifies the Google Analytics sections this dimension applies to. |

## MetricMetadata

Explains a metric.

| JSON representation |
|---|
| ``` { "apiName": string, "uiName": string, "description": string, "deprecatedApiNames": [ string ], "type": enum (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/MetricType`), "expression": string, "customDefinition": boolean, "blockedReasons": [ enum (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#BlockedReason`) ], "category": string, "sections": [ enum (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Section`) ] } ``` |

| Fields ||
|---|---|
| `apiName` | `string` A metric name. Usable in [Metric](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#Metric)'s `name`. For example, `eventCount`. |
| `uiName` | `string` This metric's name within the Google Analytics user interface. For example, `Event count`. |
| `description` | `string` Description of how this metric is used and calculated. |
| `deprecatedApiNames[]` | `string` Still usable but deprecated names for this metric. If populated, this metric is available by either `apiName` or one of `deprecatedApiNames` for a period of time. After the deprecation period, the metric will be available only by `apiName`. |
| `type` | ``enum (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/MetricType`)`` The type of this metric. |
| `expression` | `string` The mathematical expression for this derived metric. Can be used in [Metric](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#Metric)'s `expression` field for equivalent reports. Most metrics are not expressions, and for non-expressions, this field is empty. |
| `customDefinition` | `boolean` True if the metric is a custom metric for this property. |
| `blockedReasons[]` | ``enum (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#BlockedReason`)`` If reasons are specified, your access is blocked to this metric for this property. API requests from you to this property for this metric will succeed; however, the report will contain only zeros for this metric. API requests with metric filters on blocked metrics will fail. If reasons are empty, you have access to this metric. To learn more, see [Access and data-restriction management](https://support.google.com/analytics/answer/10851388). |
| `category` | `string` The display name of the category that this metrics belongs to. Similar dimensions and metrics are categorized together. |
| `sections[]` | ``enum (`https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/Section`)`` Specifies the Google Analytics sections this metric applies to. |

## BlockedReason

Justifications for why this metric is blocked.

| Enums ||
|---|---|
| `BLOCKED_REASON_UNSPECIFIED` | Will never be specified in API response. |
| `NO_REVENUE_METRICS` | If present, your access is blocked to revenue related metrics for this property, and this metric is revenue related. |
| `NO_COST_METRICS` | If present, your access is blocked to cost related metrics for this property, and this metric is cost related. |

## ComparisonMetadata

The metadata for a single comparison.

| JSON representation |
|---|
| ``` { "apiName": string, "uiName": string, "description": string } ``` |

| Fields ||
|---|---|
| `apiName` | `string` This comparison's resource name. Usable in [Comparison](https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1alpha/properties/getMetadata#Comparison)'s `comparison` field. For example, 'comparisons/1234'. |
| `uiName` | `string` This comparison's name within the Google Analytics user interface. |
| `description` | `string` This comparison's description. |

## ConversionMetadata

The metadata for a single conversion.

<br />

> [!CAUTION]
> This feature may not be available to your Google Analytics property. The Google Analytics team is actively working to expand this feature to more properties. Please reach out to your [support team](https://support.google.com/analytics/gethelp) if you have questions about the eligibility of your property.

<br />

| JSON representation |
|---|
| ``` { "conversionAction": string, "displayName": string } ``` |

| Fields ||
|---|---|
| `conversionAction` | `string` The unique identifier of the conversion action. This ID is used to specify which conversions to include in a report by populating the `conversionActions` field in the `ConversionsSpec` of a report request. For example, 'conversionActions/1234'. |
| `displayName` | `string` This conversion's name within the Google Analytics user interface. |