Bắt buộc. Định dạng: Properties/{property_id} Ví dụ: properties/1234
Tham số truy vấn
Tham số
calculatedMetricId
string
Bắt buộc. Mã nhận dạng sử dụng cho chỉ số được tính. Mã này sẽ trở thành thành phần cuối cùng trong tên tài nguyên của chỉ số được tính.
Giá trị này phải có từ 1 đến 80 ký tự và các ký tự hợp lệ là /[a-zA-Z0-9_]/, không được phép có dấu cách. computeMetricId phải là duy nhất giữa tất cả các chỉ số được tính trong một thuộc tính. Chỉ số được tính toán được sử dụng khi tham chiếu chỉ số được tính này từ các API bên ngoài, chẳng hạn như "calcMetric:{CalculateMetricId}".
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["Creates a new CalculatedMetric within a specified Google Analytics 4 property using an HTTP POST request."],["Requires providing a unique `calculatedMetricId` and the `property_id` as path and query parameters, respectively."],["The request body should contain the CalculatedMetric definition, and a successful response will return the newly created CalculatedMetric instance."],["Users need to have the `analytics.edit` OAuth scope to authorize this operation."]]],["This documentation details how to create a CalculatedMetric via a `POST` request to the specified URL, including required components such as path and query parameters, the request body and the response body. The path parameter `parent` defines the property ID. The query parameter `calculatedMetricId` is a unique identifier. The request and response bodies are `CalculatedMetric` instances. This action requires authorization scope: `https://www.googleapis.com/auth/analytics.edit`.\n"]]