Method: properties.customMetrics.patch
Bir mülkte ÖzelMetrik'i günceller.
HTTP isteği
PATCH https://analyticsadmin.googleapis.com/v1alpha/{customMetric.name=properties/*/customMetrics/*}
URL, gRPC Kod Dönüştürme söz dizimini kullanır.
Yol parametreleri
Parametreler |
customMetric.name |
string
Yalnızca çıkış. Bu CustomMetric kaynağının kaynak adı. Format: properties/{property}/customMetrics/{customMetric}
|
Sorgu parametreleri
Parametreler |
updateMask |
string (FieldMask format)
Zorunlu. Güncellenecek alanların listesi. Atlanan alanlar güncellenmez. Öğenin tamamını değiştirmek için tüm alanları eşleştirmek üzere "*" dizesiyle bir yol kullanın. Bu, alanların tam nitelikli adlarının virgülle ayrılmış bir listesidir. Örnek: "user.displayName,photo" .
|
İstek içeriği
İstek metni, CustomMetric
öğesinin bir örneğini içerir.
Yanıt gövdesi
Başarılıysa yanıt metni, CustomMetric
öğesinin bir örneğini içerir.
Yetkilendirme kapsamları
Aşağıdaki OAuth kapsamını gerektirir:
https://www.googleapis.com/auth/analytics.edit
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-01-14 UTC.
[null,null,["Son güncelleme tarihi: 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"]]