Class: Google::Analytics::Admin::V1alpha::CalculatedMetric
- Inherits:
-
Object
- Object
- Google::Analytics::Admin::V1alpha::CalculatedMetric
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/analytics/admin/v1alpha/resources.rb
Overview
A definition for a calculated metric.
Defined Under Namespace
Modules: MetricUnit, RestrictedMetricType
Instance Attribute Summary collapse
-
#calculated_metric_id ⇒ ::String
readonly
Output only.
-
#description ⇒ ::String
Optional.
-
#display_name ⇒ ::String
Required.
-
#formula ⇒ ::String
Required.
-
#invalid_metric_reference ⇒ ::Boolean
readonly
Output only.
-
#metric_unit ⇒ ::Google::Analytics::Admin::V1alpha::CalculatedMetric::MetricUnit
Required.
-
#name ⇒ ::String
readonly
Output only.
-
#restricted_metric_type ⇒ ::Array<::Google::Analytics::Admin::V1alpha::CalculatedMetric::RestrictedMetricType>
readonly
Output only.
Instance Attribute Details
#calculated_metric_id ⇒ ::String (readonly)
Returns 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}".
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1086 class CalculatedMetric include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible types of representing the calculated metric's value. module MetricUnit # MetricUnit unspecified or missing. METRIC_UNIT_UNSPECIFIED = 0 # This metric uses default units. STANDARD = 1 # This metric measures a currency. CURRENCY = 2 # This metric measures feet. FEET = 3 # This metric measures miles. MILES = 4 # This metric measures meters. METERS = 5 # This metric measures kilometers. KILOMETERS = 6 # This metric measures milliseconds. MILLISECONDS = 7 # This metric measures seconds. SECONDS = 8 # This metric measures minutes. MINUTES = 9 # This metric measures hours. HOURS = 10 end # Labels that mark the data in calculated metric used in conjunction with # user roles that restrict access to cost and/or revenue metrics. module RestrictedMetricType # Type unknown or unspecified. RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0 # Metric reports cost data. COST_DATA = 1 # Metric reports revenue data. REVENUE_DATA = 2 end end |
#description ⇒ ::String
Returns Optional. Description for this calculated metric. Max length of 4096 characters.
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1086 class CalculatedMetric include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible types of representing the calculated metric's value. module MetricUnit # MetricUnit unspecified or missing. METRIC_UNIT_UNSPECIFIED = 0 # This metric uses default units. STANDARD = 1 # This metric measures a currency. CURRENCY = 2 # This metric measures feet. FEET = 3 # This metric measures miles. MILES = 4 # This metric measures meters. METERS = 5 # This metric measures kilometers. KILOMETERS = 6 # This metric measures milliseconds. MILLISECONDS = 7 # This metric measures seconds. SECONDS = 8 # This metric measures minutes. MINUTES = 9 # This metric measures hours. HOURS = 10 end # Labels that mark the data in calculated metric used in conjunction with # user roles that restrict access to cost and/or revenue metrics. module RestrictedMetricType # Type unknown or unspecified. RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0 # Metric reports cost data. COST_DATA = 1 # Metric reports revenue data. REVENUE_DATA = 2 end end |
#display_name ⇒ ::String
Returns Required. Display name for this calculated metric as shown in the Google Analytics UI. Max length 82 characters.
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1086 class CalculatedMetric include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible types of representing the calculated metric's value. module MetricUnit # MetricUnit unspecified or missing. METRIC_UNIT_UNSPECIFIED = 0 # This metric uses default units. STANDARD = 1 # This metric measures a currency. CURRENCY = 2 # This metric measures feet. FEET = 3 # This metric measures miles. MILES = 4 # This metric measures meters. METERS = 5 # This metric measures kilometers. KILOMETERS = 6 # This metric measures milliseconds. MILLISECONDS = 7 # This metric measures seconds. SECONDS = 8 # This metric measures minutes. MINUTES = 9 # This metric measures hours. HOURS = 10 end # Labels that mark the data in calculated metric used in conjunction with # user roles that restrict access to cost and/or revenue metrics. module RestrictedMetricType # Type unknown or unspecified. RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0 # Metric reports cost data. COST_DATA = 1 # Metric reports revenue data. REVENUE_DATA = 2 end end |
#formula ⇒ ::String
Returns 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".
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1086 class CalculatedMetric include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible types of representing the calculated metric's value. module MetricUnit # MetricUnit unspecified or missing. METRIC_UNIT_UNSPECIFIED = 0 # This metric uses default units. STANDARD = 1 # This metric measures a currency. CURRENCY = 2 # This metric measures feet. FEET = 3 # This metric measures miles. MILES = 4 # This metric measures meters. METERS = 5 # This metric measures kilometers. KILOMETERS = 6 # This metric measures milliseconds. MILLISECONDS = 7 # This metric measures seconds. SECONDS = 8 # This metric measures minutes. MINUTES = 9 # This metric measures hours. HOURS = 10 end # Labels that mark the data in calculated metric used in conjunction with # user roles that restrict access to cost and/or revenue metrics. module RestrictedMetricType # Type unknown or unspecified. RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0 # Metric reports cost data. COST_DATA = 1 # Metric reports revenue data. REVENUE_DATA = 2 end end |
#invalid_metric_reference ⇒ ::Boolean (readonly)
Returns 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.
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1086 class CalculatedMetric include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible types of representing the calculated metric's value. module MetricUnit # MetricUnit unspecified or missing. METRIC_UNIT_UNSPECIFIED = 0 # This metric uses default units. STANDARD = 1 # This metric measures a currency. CURRENCY = 2 # This metric measures feet. FEET = 3 # This metric measures miles. MILES = 4 # This metric measures meters. METERS = 5 # This metric measures kilometers. KILOMETERS = 6 # This metric measures milliseconds. MILLISECONDS = 7 # This metric measures seconds. SECONDS = 8 # This metric measures minutes. MINUTES = 9 # This metric measures hours. HOURS = 10 end # Labels that mark the data in calculated metric used in conjunction with # user roles that restrict access to cost and/or revenue metrics. module RestrictedMetricType # Type unknown or unspecified. RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0 # Metric reports cost data. COST_DATA = 1 # Metric reports revenue data. REVENUE_DATA = 2 end end |
#metric_unit ⇒ ::Google::Analytics::Admin::V1alpha::CalculatedMetric::MetricUnit
Returns Required. The type for the calculated metric's value.
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1086 class CalculatedMetric include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible types of representing the calculated metric's value. module MetricUnit # MetricUnit unspecified or missing. METRIC_UNIT_UNSPECIFIED = 0 # This metric uses default units. STANDARD = 1 # This metric measures a currency. CURRENCY = 2 # This metric measures feet. FEET = 3 # This metric measures miles. MILES = 4 # This metric measures meters. METERS = 5 # This metric measures kilometers. KILOMETERS = 6 # This metric measures milliseconds. MILLISECONDS = 7 # This metric measures seconds. SECONDS = 8 # This metric measures minutes. MINUTES = 9 # This metric measures hours. HOURS = 10 end # Labels that mark the data in calculated metric used in conjunction with # user roles that restrict access to cost and/or revenue metrics. module RestrictedMetricType # Type unknown or unspecified. RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0 # Metric reports cost data. COST_DATA = 1 # Metric reports revenue data. REVENUE_DATA = 2 end end |
#name ⇒ ::String (readonly)
Returns Output only. Resource name for this CalculatedMetric. Format: 'properties/{property_id}/calculatedMetrics/{calculated_metric_id}'.
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1086 class CalculatedMetric include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible types of representing the calculated metric's value. module MetricUnit # MetricUnit unspecified or missing. METRIC_UNIT_UNSPECIFIED = 0 # This metric uses default units. STANDARD = 1 # This metric measures a currency. CURRENCY = 2 # This metric measures feet. FEET = 3 # This metric measures miles. MILES = 4 # This metric measures meters. METERS = 5 # This metric measures kilometers. KILOMETERS = 6 # This metric measures milliseconds. MILLISECONDS = 7 # This metric measures seconds. SECONDS = 8 # This metric measures minutes. MINUTES = 9 # This metric measures hours. HOURS = 10 end # Labels that mark the data in calculated metric used in conjunction with # user roles that restrict access to cost and/or revenue metrics. module RestrictedMetricType # Type unknown or unspecified. RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0 # Metric reports cost data. COST_DATA = 1 # Metric reports revenue data. REVENUE_DATA = 2 end end |
#restricted_metric_type ⇒ ::Array<::Google::Analytics::Admin::V1alpha::CalculatedMetric::RestrictedMetricType> (readonly)
Returns Output only. Types of restricted data that this metric contains.
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1086 class CalculatedMetric include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible types of representing the calculated metric's value. module MetricUnit # MetricUnit unspecified or missing. METRIC_UNIT_UNSPECIFIED = 0 # This metric uses default units. STANDARD = 1 # This metric measures a currency. CURRENCY = 2 # This metric measures feet. FEET = 3 # This metric measures miles. MILES = 4 # This metric measures meters. METERS = 5 # This metric measures kilometers. KILOMETERS = 6 # This metric measures milliseconds. MILLISECONDS = 7 # This metric measures seconds. SECONDS = 8 # This metric measures minutes. MINUTES = 9 # This metric measures hours. HOURS = 10 end # Labels that mark the data in calculated metric used in conjunction with # user roles that restrict access to cost and/or revenue metrics. module RestrictedMetricType # Type unknown or unspecified. RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0 # Metric reports cost data. COST_DATA = 1 # Metric reports revenue data. REVENUE_DATA = 2 end end |