Teste o servidor MCP do Google Analytics. Instale no
GitHub e confira o
anúncio para mais detalhes.
MetricMetadata
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-07-26 UTC.
[null,null,["Última atualização 2025-07-26 UTC."],[[["\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. |"]]