- [Resource: CustomMetric](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#CustomMetric)
  - [JSON representation](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#CustomMetric.SCHEMA_REPRESENTATION)
- [MeasurementUnit](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#MeasurementUnit)
- [MetricScope](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#MetricScope)
- [RestrictedMetricType](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#RestrictedMetricType)
- [Methods](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#METHODS_SUMMARY)

## Resource: CustomMetric

A definition for a custom metric.

| JSON representation |
|---|
| ``` { "name": string, "parameterName": string, "displayName": string, "description": string, "measurementUnit": enum (`https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#MeasurementUnit`), "scope": enum (`https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#MetricScope`), "restrictedMetricType": [ enum (`https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#RestrictedMetricType`) ] } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric} |
| `parameterName` | `string` Required. Immutable. Tagging name for this custom metric. If this is an event-scoped metric, then this is the event parameter name. May only contain alphanumeric and underscore charactes, starting with a letter. Max length of 40 characters for event-scoped metrics. |
| `displayName` | `string` Required. Display name for this custom metric as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display names may contain square brackets, but updates to this field will never permit square brackets. |
| `description` | `string` Optional. Description for this custom dimension. Max length of 150 characters. |
| `measurementUnit` | ``enum (`https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#MeasurementUnit`)`` Required. The type for the custom metric's value. |
| `scope` | ``enum (`https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#MetricScope`)`` Required. Immutable. The scope of this custom metric. |
| `restrictedMetricType[]` | ``enum (`https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#RestrictedMetricType`)`` Optional. Types of restricted data that this metric may contain. Required for metrics with CURRENCY measurement unit. Must be empty for metrics with a non-CURRENCY measurement unit. |

## MeasurementUnit

Possible types of representing the custom metric's value.

Currency representation may change in the future, requiring a breaking API change.

| Enums ||
|---|---|
| `MEASUREMENT_UNIT_UNSPECIFIED` | MeasurementUnit unspecified or missing. |
| `STANDARD` | This metric uses default units. |
| `CURRENCY` | This metric measures a currency. |
| `FEET` | This metric measures feet. |
| `METERS` | This metric measures meters. |
| `KILOMETERS` | This metric measures kilometers. |
| `MILES` | This metric measures miles. |
| `MILLISECONDS` | This metric measures milliseconds. |
| `SECONDS` | This metric measures seconds. |
| `MINUTES` | This metric measures minutes. |
| `HOURS` | This metric measures hours. |

## MetricScope

The scope of this metric.

| Enums ||
|---|---|
| `METRIC_SCOPE_UNSPECIFIED` | Scope unknown or not specified. |
| `EVENT` | Metric scoped to an event. |

## RestrictedMetricType

Labels that mark the data in this custom metric as data that should be restricted to specific users.

| Enums ||
|---|---|
| `RESTRICTED_METRIC_TYPE_UNSPECIFIED` | Type unknown or unspecified. |
| `COST_DATA` | Metric reports cost data. |
| `REVENUE_DATA` | Metric reports revenue data. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics/archive` | Archives a CustomMetric on a property. |
| ### `https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics/create` | Creates a CustomMetric. |
| ### `https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics/get` | Lookup for a single CustomMetric. |
| ### `https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics/list` | Lists CustomMetrics on a property. |
| ### `https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics/patch` | Updates a CustomMetric on a property. |