سرور MCP را برای Google Analytics امتحان کنید. از
GitHub نصب کنید و برای جزئیات بیشتر به
اطلاعیه مراجعه کنید.
MetricMetadata
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\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. |"]]