Method: properties.customMetrics.patch
Aktualizuje dane niestandardowe w usłudze.
Żądanie HTTP
PATCH https://analyticsadmin.googleapis.com/v1alpha/{customMetric.name=properties/*/customMetrics/*}
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
customMetric.name |
string
Tylko dane wyjściowe. Nazwa zasobu CustomMetric. Format: usługi/{usługa}customMetrics/{customMetric}
|
Parametry zapytania
Parametry |
updateMask |
string (FieldMask format)
Wymagane. Lista pól do zaktualizowania. Pominięte pola nie zostaną zaktualizowane. Aby zastąpić cały element, użyj jednej ścieżki z ciągiem znaków „*”, aby dopasować wszystkie pola. Jest to lista pełnych nazw pól rozdzielona przecinkami. Przykład: "user.displayName,photo" .
|
Treść żądania
Treść żądania zawiera wystąpienie elementu CustomMetric
.
Treść odpowiedzi
W przypadku powodzenia treść odpowiedzi obejmuje wystąpienie elementu CustomMetric
.
Zakresy autoryzacji
Wymaga następującego zakresu OAuth:
https://www.googleapis.com/auth/analytics.edit
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-01-14 UTC.
[null,null,["Ostatnia aktualizacja: 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"]]