Method: properties.customMetrics.patch
Aktualisiert einen benutzerdefinierten Messwert für eine Property.
HTTP-Anfrage
PATCH https://analyticsadmin.googleapis.com/v1alpha/{customMetric.name=properties/*/customMetrics/*}
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
customMetric.name |
string
Nur Ausgabe. Ressourcenname für diese benutzerdefinierte Messwertressource. Format: properties/{property}/customMetrics/{customMetric}
|
Abfrageparameter
Parameter |
updateMask |
string (FieldMask format)
Erforderlich. Die Liste der zu aktualisierenden Felder. Ausgelassene Felder werden nicht aktualisiert. Wenn Sie die gesamte Entität ersetzen möchten, verwenden Sie einen Pfad mit dem String „*“, um alle Felder abzugleichen. Dies ist eine durch Kommas getrennte Liste vollständig qualifizierter Feldnamen. Beispiel: "user.displayName,photo" .
|
Anfragetext
Der Anfragetext enthält eine Instanz von CustomMetric
.
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, enthält der Antworttext eine Instanz von CustomMetric
.
Autorisierungsbereiche
Erfordert den folgenden OAuth-Bereich:
https://www.googleapis.com/auth/analytics.edit
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-01-14 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-01-14 (UTC)."],[[["This documentation outlines how to update a CustomMetric on a Google Analytics 4 property using an HTTP PATCH request."],["The request requires specifying the CustomMetric resource name in the path and uses a FieldMask in the query parameter to indicate fields to be updated."],["The request body should contain the updated CustomMetric data, and a successful response will return the updated CustomMetric object."],["Users need the `https://www.googleapis.com/auth/analytics.edit` authorization scope to perform this operation."]]],["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"]]