Method: properties.customMetrics.patch
تعديل "مقياس مخصّص" على موقع
طلب HTTP
PATCH https://analyticsadmin.googleapis.com/v1beta/{customMetric.name=properties/*/customMetrics/*}
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات المسار
المعلمات |
customMetric.name |
string
النتائج فقط. اسم المورد لمورد CustomMetric هذا. التنسيق: properties/{property}/customMetrics/{customMetric}
|
مَعلمات طلب البحث
المعلمات |
updateMask |
string (FieldMask format)
مطلوب. قائمة الحقول التي سيتم تعديلها ولن يتم تعديل الحقول التي تم حذفها. لاستبدال العنصر بأكمله، استخدِم مسارًا واحدًا مع السلسلة "*" لمطابقة جميع الحقول. هذه قائمة مفصولة بفواصل تتضمّن أسماء حقول مؤهَّلة بالكامل. مثال: "user.displayName,photo"
|
نص الطلب
يحتوي نص الطلب على مثال CustomMetric
.
نص الاستجابة
إذا كانت الاستجابة ناجحة، يحتوي نص الاستجابة على مثال CustomMetric
.
نطاقات التفويض
يجب توفير نطاق OAuth التالي:
https://www.googleapis.com/auth/analytics.edit
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-01-14 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-01-14 (حسب التوقيت العالمي المتفَّق عليه)"],[[["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"]]