Show / Hide Table of Contents

Class CalculatedMetric

A definition for a calculated metric.

Inheritance
object
CalculatedMetric
Implements
IMessage<CalculatedMetric>
IEquatable<CalculatedMetric>
IDeepCloneable<CalculatedMetric>
IBufferMessage
IMessage
Inherited Members
object.GetHashCode()
object.GetType()
object.ToString()
Namespace: Google.Analytics.Admin.V1Alpha
Assembly: Google.Analytics.Admin.V1Alpha.dll
Syntax
public sealed class CalculatedMetric : IMessage<CalculatedMetric>, IEquatable<CalculatedMetric>, IDeepCloneable<CalculatedMetric>, IBufferMessage, IMessage

Constructors

CalculatedMetric()

Declaration
public CalculatedMetric()

CalculatedMetric(CalculatedMetric)

Declaration
public CalculatedMetric(CalculatedMetric other)
Parameters
Type Name Description
CalculatedMetric other

Properties

CalculatedMetricId

Output only. The ID to use for the calculated metric. In the UI, this is referred to as the "API name."

The calculated_metric_id is used when referencing this calculated metric from external APIs. For example, "calcMetric:{calculated_metric_id}".

Declaration
public string CalculatedMetricId { get; set; }
Property Value
Type Description
string

CalculatedMetricName

CalculatedMetricName-typed view over the Name resource name property.

Declaration
public CalculatedMetricName CalculatedMetricName { get; set; }
Property Value
Type Description
CalculatedMetricName

Description

Optional. Description for this calculated metric. Max length of 4096 characters.

Declaration
public string Description { get; set; }
Property Value
Type Description
string

DisplayName

Required. Display name for this calculated metric as shown in the Google Analytics UI. Max length 82 characters.

Declaration
public string DisplayName { get; set; }
Property Value
Type Description
string

Formula

Required. The calculated metric's definition. Maximum number of unique referenced custom metrics is 5. Formulas supports the following operations:

  • (addition), - (subtraction), - (negative), * (multiplication), / (division), () (parenthesis). Any valid real numbers are acceptable that fit in a Long (64bit integer) or a Double (64 bit floating point number). Example formula: "( customEvent:parameter_name + cartPurchaseQuantity ) / 2.0"
Declaration
public string Formula { get; set; }
Property Value
Type Description
string

InvalidMetricReference

Output only. If true, this calculated metric has a invalid metric reference. Anything using a calculated metric with invalid_metric_reference set to true may fail, produce warnings, or produce unexpected results.

Declaration
public bool InvalidMetricReference { get; set; }
Property Value
Type Description
bool

MetricUnit

Required. The type for the calculated metric's value.

Declaration
public CalculatedMetric.Types.MetricUnit MetricUnit { get; set; }
Property Value
Type Description
CalculatedMetric.Types.MetricUnit

Name

Output only. Resource name for this CalculatedMetric. Format: 'properties/{property_id}/calculatedMetrics/{calculated_metric_id}'

Declaration
public string Name { get; set; }
Property Value
Type Description
string

RestrictedMetricType

Output only. Types of restricted data that this metric contains.

Declaration
public RepeatedField<CalculatedMetric.Types.RestrictedMetricType> RestrictedMetricType { get; }
Property Value
Type Description
RepeatedField<CalculatedMetric.Types.RestrictedMetricType>
In this article
Back to top Generated by DocFX