MetricMetadata

  • Metric metadata describes a metric, including its API name, UI name, description, deprecated API names, type, and expression.

  • The apiName is the name used in the Metric's name field, while uiName is the name displayed in the Google Analytics user interface.

  • deprecatedApiNames lists older names that are still usable for a period, after which only the apiName will be valid.

  • The type indicates the data type of the metric, and expression provides the mathematical formula for derived metrics.

Explains a metric.

JSON representation
{
  "apiName": string,
  "uiName": string,
  "description": string,
  "deprecatedApiNames": [
    string
  ],
  "type": enum (MetricType),
  "expression": string
}
Fields
apiName

string

A metric name. Useable in Metric's name. For example, eventCount.

uiName

string

This metric's name within the Google Analytics user interface. For example, Event count.

description

string

Description of how this metric is used and calculated.

deprecatedApiNames[]

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.

type

enum (MetricType)

The type of this metric.

expression

string

The mathematical expression for this derived metric. Can be used in Metric's expression field for equivalent reports. Most metrics are not expressions, and for non-expressions, this field is empty.