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\u003eMetricHeader describes a metric column in a report, providing details like name and data type, appearing as column entries within rows.\u003c/p\u003e\n"],["\u003cp\u003eMetrics solely used in filters or expressions do not generate columns or headers in reports.\u003c/p\u003e\n"],["\u003cp\u003eMetricType defines the data type of a metric, encompassing various options like integer, floating point, durations, and custom types.\u003c/p\u003e\n"],["\u003cp\u003eMetricHeader is represented in JSON format, specifying its name and type using the MetricType enum.\u003c/p\u003e\n"]]],["The provided content defines metric columns in a report, detailing their structure and data types. Each metric is represented by a `name` (string) and a `type` (enum). Visible metrics produce columns and headers in reports. Metrics exclusively used in filters or expressions do not. `MetricType` lists the possible data types, including integer, float, and various time and length units, such as `TYPE_SECONDS`, `TYPE_METERS`, or `TYPE_CURRENCY`. Each type is detailed as an enum value.\n"],null,["# MetricHeader\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [MetricType](#MetricType)\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/v1alpha/MetricHeader#MetricType) } ``` |\n\n| Fields ||\n|--------|------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` The metric's name. |\n| `type` | `enum (`[MetricType](/analytics/devguides/reporting/data/v1/rest/v1alpha/MetricHeader#MetricType)`)` The metric's data type. |\n\nMetricType\n----------\n\nA metric's value type.\n\n| Enums ||\n|---------------------------|------------------------------------------------------------------|\n| `METRIC_TYPE_UNSPECIFIED` | Unspecified type. |\n| `TYPE_INTEGER` | Integer type. |\n| `TYPE_FLOAT` | Floating point type. |\n| `TYPE_SECONDS` | A duration of seconds; a special floating point type. |\n| `TYPE_MILLISECONDS` | A duration in milliseconds; a special floating point type. |\n| `TYPE_MINUTES` | A duration in minutes; a special floating point type. |\n| `TYPE_HOURS` | A duration in hours; a special floating point type. |\n| `TYPE_STANDARD` | A custom metric of standard type; a special floating point type. |\n| `TYPE_CURRENCY` | An amount of money; a special floating point type. |\n| `TYPE_FEET` | A length in feet; a special floating point type. |\n| `TYPE_MILES` | A length in miles; a special floating point type. |\n| `TYPE_METERS` | A length in meters; a special floating point type. |\n| `TYPE_KILOMETERS` | A length in kilometers; a special floating point type. |"]]