Skip to main content

custom_metrics

Overview

Namecustom_metrics
TypeResource
Idgoogleanalytics.analyticsadmin.custom_metrics

Fields

NameDatatypeDescription
namestringOutput only. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric}
descriptionstringOptional. Description for this custom dimension. Max length of 150 characters.
parameterNamestringRequired. Immutable. Tagging name for this custom metric. If this is an event-scoped metric, then this is the event parameter name. May only contain alphanumeric and underscore charactes, starting with a letter. Max length of 40 characters for event-scoped metrics.
restrictedMetricTypearrayOptional. Types of restricted data that this metric may contain. Required for metrics with CURRENCY measurement unit. Must be empty for metrics with a non-CURRENCY measurement unit.
scopestringRequired. Immutable. The scope of this custom metric.
displayNamestringRequired. Display name for this custom metric as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display names may contain square brackets, but updates to this field will never permit square brackets.
measurementUnitstringRequired. The type for the custom metric's value.

Methods

NameAccessible byRequired ParamsDescription
properties_customMetrics_getSELECTcustomMetricsId, propertiesIdLookup for a single CustomMetric.
properties_customMetrics_listSELECTpropertiesIdLists CustomMetrics on a property.
properties_customMetrics_createINSERTpropertiesIdCreates a CustomMetric.
properties_customMetrics_archiveEXECcustomMetricsId, propertiesIdArchives a CustomMetric on a property.
properties_customMetrics_patchEXECcustomMetricsId, propertiesIdUpdates a CustomMetric on a property.