Google 애널리틱스용 MCP 서버를 사용해 보세요.
GitHub에서 설치하고
공지사항에서 자세한 내용을 확인하세요.
REST Resource: properties.customMetrics
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
리소스: CustomMetric
필드 |
name |
string
출력 전용입니다. 이 CustomMetric 리소스의 리소스 이름입니다. 형식: properties/{property}/customMetrics/{customMetric}
|
parameterName |
string
필수 항목입니다. 변경할 수 없습니다. 이 맞춤 측정항목의 태그 이름입니다. 이벤트 범위 측정항목인 경우 이벤트 매개변수 이름입니다. 문자로 시작하는 영숫자 및 밑줄 문자만 포함할 수 있습니다. 이벤트 범위 측정항목의 경우 최대 길이는 40자(영문 기준)입니다.
|
displayName |
string
필수 항목입니다. 애널리틱스 UI에 표시되는 이 맞춤 측정항목의 표시 이름입니다. 최대 길이는 82자(영문 기준), 영숫자와 공백, 밑줄로 시작해야 합니다. 기존 시스템에서 생성된 표시 이름에는 대괄호가 포함될 수 있지만 이 입력란을 업데이트하면 대괄호가 허용되지 않습니다.
|
description |
string
선택사항입니다. 이 맞춤 측정기준에 대한 설명입니다. 최대 길이는 150자(영문 기준)입니다.
|
measurementUnit |
enum (MeasurementUnit )
필수 항목입니다. 맞춤 측정항목 값의 유형입니다.
|
scope |
enum (MetricScope )
필수 항목입니다. 변경할 수 없습니다. 이 맞춤 측정항목의 범위입니다.
|
restrictedMetricType[] |
enum (RestrictedMetricType )
선택사항입니다. 이 측정항목에 포함될 수 있는 제한된 데이터의 유형입니다. 측정 단위가 CURRENCY인 측정항목의 경우 필수입니다. 통화 단위가 아닌 측정항목의 경우 비워 두어야 합니다.
|
MeasurementUnit
맞춤 측정항목의 값을 나타내는 가능한 유형입니다.
통화 표현은 향후 변경될 수 있으므로 API에 관한 브레이킹 체인지가 필요합니다.
열거형 |
MEASUREMENT_UNIT_UNSPECIFIED |
MeasurementUnit이 지정되지 않거나 누락되었습니다. |
STANDARD |
이 측정항목은 기본 단위를 사용합니다. |
CURRENCY |
이 측정항목은 통화를 측정합니다. |
FEET |
이 측정항목은 피트를 측정합니다. |
METERS |
이 측정항목은 미터를 측정합니다. |
KILOMETERS |
이 측정항목은 킬로미터를 측정합니다. |
MILES |
이 측정항목은 마일을 측정합니다. |
MILLISECONDS |
이 측정항목은 밀리초를 측정합니다. |
SECONDS |
이 측정항목은 초를 측정합니다. |
MINUTES |
이 측정항목은 분을 측정합니다. |
HOURS |
이 측정항목은 시간을 측정합니다. |
MetricScope
열거형 |
METRIC_SCOPE_UNSPECIFIED |
범위를 알 수 없거나 지정되지 않았습니다. |
EVENT |
측정항목 범위가 이벤트로 지정되었습니다. |
RestrictedMetricType
이 맞춤 측정항목의 데이터를 특정 사용자로 제한해야 하는 데이터로 표시하는 라벨입니다.
열거형 |
RESTRICTED_METRIC_TYPE_UNSPECIFIED |
알 수 없거나 지정되지 않은 유형입니다. |
COST_DATA |
측정항목에서는 비용 데이터를 보고합니다. |
REVENUE_DATA |
측정항목은 수익 데이터를 보고합니다. |
메서드 |
|
속성의 CustomMetric을 보관처리합니다. |
|
CustomMetric을 만듭니다. |
|
단일 CustomMetric을 조회합니다. |
|
속성의 CustomMetrics를 나열합니다. |
|
속성의 CustomMetric을 업데이트합니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003e\u003ccode\u003eCustomMetric\u003c/code\u003e resource allows you to define custom metrics with specific parameters, display names, descriptions, measurement units, and scopes within Google Analytics.\u003c/p\u003e\n"],["\u003cp\u003eThese custom metrics can have various measurement units like \u003ccode\u003eSTANDARD\u003c/code\u003e, \u003ccode\u003eCURRENCY\u003c/code\u003e, \u003ccode\u003eFEET\u003c/code\u003e, \u003ccode\u003eMETERS\u003c/code\u003e, and more, alongside scopes such as \u003ccode\u003eEVENT\u003c/code\u003e to tailor data collection to specific events.\u003c/p\u003e\n"],["\u003cp\u003eYou can manage your custom metrics with dedicated methods, including \u003ccode\u003earchive\u003c/code\u003e, \u003ccode\u003ecreate\u003c/code\u003e, \u003ccode\u003eget\u003c/code\u003e, \u003ccode\u003elist\u003c/code\u003e, and \u003ccode\u003epatch\u003c/code\u003e to control their lifecycle and properties directly through the API.\u003c/p\u003e\n"],["\u003cp\u003eRestricted data like cost and revenue can be tracked by labeling the metric with specific \u003ccode\u003eRestrictedMetricType\u003c/code\u003e values, ensuring appropriate access controls.\u003c/p\u003e\n"]]],["CustomMetrics are defined by `name`, `parameterName`, `displayName`, `description`, `measurementUnit`, `scope`, and `restrictedMetricType`. `MeasurementUnit` options include standard, currency, and various distance/time units. `MetricScope` can be event-based. `RestrictedMetricType` marks data like cost or revenue. Methods allow creating, retrieving, listing, updating, and archiving custom metrics. These metrics are structured with specific field requirements, such as length and character restrictions.\n"],null,["# REST Resource: properties.customMetrics\n\n- [Resource: CustomMetric](#CustomMetric)\n - [JSON representation](#CustomMetric.SCHEMA_REPRESENTATION)\n- [MeasurementUnit](#MeasurementUnit)\n- [MetricScope](#MetricScope)\n- [RestrictedMetricType](#RestrictedMetricType)\n- [Methods](#METHODS_SUMMARY)\n\nResource: CustomMetric\n----------------------\n\nA definition for a custom metric.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"parameterName\": string, \"displayName\": string, \"description\": string, \"measurementUnit\": enum (/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics#MeasurementUnit), \"scope\": enum (/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics#MetricScope), \"restrictedMetricType\": [ enum (/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics#RestrictedMetricType) ] } ``` |\n\n| Fields ||\n|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Output only. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric} |\n| `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. |\n| `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. |\n| `description` | `string` Optional. Description for this custom dimension. Max length of 150 characters. |\n| `measurementUnit` | `enum (`[MeasurementUnit](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics#MeasurementUnit)`)` Required. The type for the custom metric's value. |\n| `scope` | `enum (`[MetricScope](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics#MetricScope)`)` Required. Immutable. The scope of this custom metric. |\n| `restrictedMetricType[]` | `enum (`[RestrictedMetricType](/analytics/devguides/config/admin/v1/rest/v1beta/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. |\n\nMeasurementUnit\n---------------\n\nPossible types of representing the custom metric's value.\n\nCurrency representation may change in the future, requiring a breaking API change.\n\n| Enums ||\n|--------------------------------|-----------------------------------------|\n| `MEASUREMENT_UNIT_UNSPECIFIED` | MeasurementUnit unspecified or missing. |\n| `STANDARD` | This metric uses default units. |\n| `CURRENCY` | This metric measures a currency. |\n| `FEET` | This metric measures feet. |\n| `METERS` | This metric measures meters. |\n| `KILOMETERS` | This metric measures kilometers. |\n| `MILES` | This metric measures miles. |\n| `MILLISECONDS` | This metric measures milliseconds. |\n| `SECONDS` | This metric measures seconds. |\n| `MINUTES` | This metric measures minutes. |\n| `HOURS` | This metric measures hours. |\n\nMetricScope\n-----------\n\nThe scope of this metric.\n\n| Enums ||\n|----------------------------|---------------------------------|\n| `METRIC_SCOPE_UNSPECIFIED` | Scope unknown or not specified. |\n| `EVENT` | Metric scoped to an event. |\n\nRestrictedMetricType\n--------------------\n\nLabels that mark the data in this custom metric as data that should be restricted to specific users.\n\n| Enums ||\n|--------------------------------------|------------------------------|\n| `RESTRICTED_METRIC_TYPE_UNSPECIFIED` | Type unknown or unspecified. |\n| `COST_DATA` | Metric reports cost data. |\n| `REVENUE_DATA` | Metric reports revenue data. |\n\n| Methods ------- ||\n|--------------------------------------------------------------------------------------------------|----------------------------------------|\n| ### [archive](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics/archive) | Archives a CustomMetric on a property. |\n| ### [create](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics/create) | Creates a CustomMetric. |\n| ### [get](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics/get) | Lookup for a single CustomMetric. |\n| ### [list](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics/list) | Lists CustomMetrics on a property. |\n| ### [patch](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics/patch) | Updates a CustomMetric on a property. |"]]