Method: properties.customMetrics.patch
עדכון של מדד מותאם אישית בנכס.
בקשת HTTP
PATCH https://analyticsadmin.googleapis.com/v1alpha/{customMetric.name=properties/*/customMetrics/*}
כתובת ה-URL משתמשת בתחביר של Transcoding של 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 (שעון UTC).
[null,null,["עדכון אחרון: 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"]]