Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.
This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".
Request body
The request body contains an instance of CustomMetric.
Response body
If successful, the response body contains an instance of CustomMetric.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-02 UTC."],[[["\u003cp\u003eThis documentation outlines how to update a CustomMetric on a Google Analytics 4 property using an HTTP PATCH request.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires specifying the CustomMetric resource name in the path and uses a FieldMask in the query parameter to indicate fields to be updated.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain the updated CustomMetric data, and a successful response will return the updated CustomMetric object.\u003c/p\u003e\n"],["\u003cp\u003eUsers need the \u003ccode\u003ehttps://www.googleapis.com/auth/analytics.edit\u003c/code\u003e authorization scope to perform this operation.\u003c/p\u003e\n"]]],["This document outlines the process for updating a CustomMetric on a property using a PATCH request to `https://analyticsadmin.googleapis.com/v1alpha/{customMetric.name=properties/*/customMetrics/*}`. It details that the `customMetric.name` is a path parameter specifying the resource. The `updateMask` query parameter dictates which fields to modify. The request and response bodies use the `CustomMetric` instance. Editing requires the `https://www.googleapis.com/auth/analytics.edit` authorization scope.\n"],null,["- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nUpdates a CustomMetric on a property.\n\nHTTP request\n\n`PATCH https://analyticsadmin.googleapis.com/v1alpha/{customMetric.name=properties/*/customMetrics/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|---------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| `customMetric.name` | `string` Output only. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric} |\n\nQuery parameters\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string \"\\*\" to match all fields. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\nRequest body\n\nThe request body contains an instance of [CustomMetric](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#CustomMetric).\n\nResponse body\n\nIf successful, the response body contains an instance of [CustomMetric](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.customMetrics#CustomMetric).\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/analytics.edit`"]]