Method: properties.calculatedMetrics.create

Creates a CalculatedMetric.

HTTP request

POST https://analyticsadmin.googleapis.com/v1alpha/{parent=properties/*}/calculatedMetrics

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. Format: properties/{property_id} Example: properties/1234

Query parameters

Parameters
calculatedMetricId

string

Required. The ID to use for the calculated metric which will become the final component of the calculated metric's resource name.

This value should be 1-80 characters and valid characters are /[a-zA-Z0-9_]/, no spaces allowed. calculatedMetricId must be unique between all calculated metrics under a property. The calculatedMetricId is used when referencing this calculated metric from external APIs, for example, "calcMetric:{calculatedMetricId}".

Request body

The request body contains an instance of CalculatedMetric.

Response body

If successful, the response body contains a newly created instance of CalculatedMetric.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit