试用 Google Analytics 的 MCP 服务器。从
GitHub 安装,并参阅
公告了解详情。
MetricMetadata
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eMetric Metadata explains a specific metric's properties such as its name, description, type, and potential restrictions.\u003c/p\u003e\n"],["\u003cp\u003eIt includes technical details like the \u003ccode\u003eapiName\u003c/code\u003e, \u003ccode\u003euiName\u003c/code\u003e, and the mathematical \u003ccode\u003eexpression\u003c/code\u003e (if applicable) for use in API calls and reporting.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eblockedReasons\u003c/code\u003e indicate potential access limitations to a metric for a specific property, with justifications such as \u003ccode\u003eNO_REVENUE_METRICS\u003c/code\u003e or \u003ccode\u003eNO_COST_METRICS\u003c/code\u003e.\u003c/p\u003e\n"]]],["The JSON representation outlines metric data, including `apiName`, `uiName`, `description`, and `type`. Deprecated names are listed in `deprecatedApiNames`. `expression` defines derived metrics. `customDefinition` flags custom metrics. `blockedReasons` indicates access restrictions, preventing data access for that metric. `category` groups metrics, while `BlockedReason` specifies why a metric is inaccessible, like `NO_REVENUE_METRICS` or `NO_COST_METRICS`.\n"],null,["# MetricMetadata\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [BlockedReason](#BlockedReason)\n\nExplains a metric.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"apiName\": string, \"uiName\": string, \"description\": string, \"deprecatedApiNames\": [ string ], \"type\": enum (/analytics/devguides/reporting/data/v1/rest/v1beta/MetricType), \"expression\": string, \"customDefinition\": boolean, \"blockedReasons\": [ enum (/analytics/devguides/reporting/data/v1/rest/v1beta/MetricMetadata#BlockedReason) ], \"category\": string } ``` |\n\n| Fields ||\n|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `api``Name` | `string` A metric name. Useable in [Metric](#Metric)'s `name`. For example, `eventCount`. |\n| `ui``Name` | `string` This metric's name within the Google Analytics user interface. For example, `Event count`. |\n| `description` | `string` Description of how this metric is used and calculated. |\n| `deprecated``Api``Names[]` | `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`. |\n| `type` | `enum (`[MetricType](/analytics/devguides/reporting/data/v1/rest/v1beta/MetricType)`)` The type of this metric. |\n| `expression` | `string` The mathematical expression for this derived metric. Can be used in [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics are not expressions, and for non-expressions, this field is empty. |\n| `custom``Definition` | `boolean` True if the metric is a custom metric for this property. |\n| `blocked``Reasons[]` | `enum (`[BlockedReason](/analytics/devguides/reporting/data/v1/rest/v1beta/MetricMetadata#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). |\n| `category` | `string` The display name of the category that this metrics belongs to. Similar dimensions and metrics are categorized together. |\n\nBlockedReason\n-------------\n\nJustifications for why this metric is blocked.\n\n| Enums ||\n|------------------------------|----------------------------------------------------------------------------------------------------------------------|\n| `BLOCKED_REASON_UNSPECIFIED` | Will never be specified in API response. |\n| `NO_REVENUE_METRICS` | If present, your access is blocked to revenue related metrics for this property, and this metric is revenue related. |\n| `NO_COST_METRICS` | If present, your access is blocked to cost related metrics for this property, and this metric is cost related. |"]]