Method: properties.customMetrics.patch
Aktualizuje dane niestandardowe w usłudze.
Żądanie HTTP
PATCH https://analyticsadmin.googleapis.com/v1beta/{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 method updates a CustomMetric on a Google Analytics 4 property using an HTTP PATCH request to a specific endpoint with the CustomMetric's name in the path."],["You can specify which fields to update with the `updateMask` query parameter, using FieldMask format."],["The request body should contain the updated CustomMetric data in JSON format, adhering to the CustomMetric schema."],["Upon success, the response body will contain the updated CustomMetric, also formatted according to the CustomMetric schema."],["To use this method, your application needs to be authorized with the `https://www.googleapis.com/auth/analytics.edit` OAuth scope."]]],["This document details updating a CustomMetric on a property using a PATCH request to the specified URL: `https://analyticsadmin.googleapis.com/v1beta/{customMetric.name=properties/*/customMetrics/*}`. The `customMetric.name` is a required path parameter. The `updateMask` query parameter specifies fields to be updated. The request and response bodies both contain an instance of CustomMetric. This action requires the `https://www.googleapis.com/auth/analytics.edit` OAuth scope for authorization.\n"]]