Method: properties.customMetrics.patch
CustomMetric را در یک ویژگی به روز می کند.
درخواست HTTP
PATCH https://analyticsadmin.googleapis.com/v1beta/{customMetric.name=properties/*/customMetrics/*}
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
custom Metric. name | string فقط خروجی نام منبع برای این منبع CustomMetric. قالب: خواص/{property}/customMetrics/{customMetric} |
پارامترهای پرس و جو
پارامترها |
---|
update Mask | string ( FieldMask format) مورد نیاز. لیست فیلدهایی که باید به روز شوند. فیلدهای حذف شده به روز نمی شوند. برای جایگزینی کل موجودیت، از یک مسیر با رشته "*" برای مطابقت با تمام فیلدها استفاده کنید. این فهرستی از نامهای فیلدهای کاملاً واجد شرایط با کاما است. مثال: "user.displayName,photo" . |
درخواست بدن
بدنه درخواست شامل یک نمونه از CustomMetric
است.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ حاوی نمونه ای از CustomMetric
است.
محدوده مجوز
به محدوده OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/analytics.edit
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده 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"]]