Try the MCP server for Google Analytics. Install from
GitHub, and see the
announcement for more details.
MetricHeader
Stay organized with collections
Save and categorize content based on your preferences.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[null,null,["Last updated 2024-10-09 UTC."],[[["\u003cp\u003eMetric columns in reports are defined by a JSON representation with a \u003ccode\u003ename\u003c/code\u003e and a \u003ccode\u003etype\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eMetrics used only in filters or expressions do not generate visible columns or headers in the report.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ename\u003c/code\u003e field is a string identifying the metric, while the \u003ccode\u003etype\u003c/code\u003e field specifies the metric's data type using the MetricType enum.\u003c/p\u003e\n"]]],["Metric columns in a report are generated for visible metrics, appearing in both rows and headers. Metrics used solely in filters or expressions are excluded from report columns and headers. Each metric is defined by its `name` (a string) and `type`, which is an enumerated data type (`MetricType`). The JSON representation for a metric includes these two properties.\n"],null,["# MetricHeader\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nDescribes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"type\": enum (/analytics/devguides/reporting/data/v1/rest/v1beta/MetricType) } ``` |\n\n| Fields ||\n|--------|----------------------------------------------------------------------------------------------------------------|\n| `name` | `string` The metric's name. |\n| `type` | `enum (`[MetricType](/analytics/devguides/reporting/data/v1/rest/v1beta/MetricType)`)` The metric's data type. |"]]