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}".
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1158 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.
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1158 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.
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1158 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".
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1158 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.
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1158 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.
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1158 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}'.
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1158 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.
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1158 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 |