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}".
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1255 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.
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1255 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.
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1255 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".
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1255 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.
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1255 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.
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1255 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}'.
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1255 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.
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 |
# File 'proto_docs/google/analytics/admin/v1alpha/resources.rb', line 1255 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 |