Method: properties.customMetrics.patch
CustomMetric را در یک ویژگی به روز می کند.
درخواست HTTP
PATCH https://analyticsadmin.googleapis.com/v1alpha/{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 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"]]