Google Analytics Data V1alpha Client - Class MetricMetadata (0.12.0)

Reference documentation and code samples for the Google Analytics Data V1alpha Client class MetricMetadata.

Explains a metric.

Generated from protobuf message google.analytics.data.v1alpha.MetricMetadata

Namespace

Google \ Analytics \ Data \ V1alpha

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ api_name string

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

↳ ui_name 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.

↳ 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.

↳ type int

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.

↳ custom_definition bool

True if the metric is a custom metric for this property.

getApiName

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

Returns
TypeDescription
string

setApiName

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getUiName

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

Returns
TypeDescription
string

setUiName

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDescription

Description of how this metric is used and calculated.

Returns
TypeDescription
string

setDescription

Description of how this metric is used and calculated.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDeprecatedApiNames

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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setDeprecatedApiNames

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.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getType

The type of this metric.

Returns
TypeDescription
int

setType

The type of this metric.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getExpression

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.

Returns
TypeDescription
string

setExpression

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCustomDefinition

True if the metric is a custom metric for this property.

Returns
TypeDescription
bool

setCustomDefinition

True if the metric is a custom metric for this property.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this