כדאי לנסות את שרת ה-MCP ל-Google Analytics. אפשר להתקין מ-
GitHub, ולקרוא את
ההודעה לפרטים נוספים.
Method: properties.calculatedMetrics.create
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
בקשת HTTP
POST https://analyticsadmin.googleapis.com/v1alpha/{parent=properties/*}/calculatedMetrics
בכתובת ה-URL נעשה שימוש בתחביר המרת קידוד של gRPC.
פרמטרים של נתיב
פרמטרים |
parent |
string
חובה. פורמט: properties/{property_id} דוגמה: properties/1234
|
פרמטרים של שאילתה
פרמטרים |
calculatedMetricId |
string
חובה. המזהה של המדד המחושב, שיהפוך לרכיב האחרון בשם המשאב של המדד המחושב. הערך צריך להיות באורך של 1 עד 80 תווים, והתווים החוקיים הם /[a-zA-Z0-9_]/, אין להשתמש ברווחים. ש-computeMetricId חייב להיות ייחודי בין כל המדדים המחושבים בנכס. המערכת משתמשת ב-computeMetricId כשמתייחסים למדד המחושב הזה מממשקי API חיצוניים, לדוגמה "calcMetric:{calculatedMetricId}".
|
גוף הבקשה
גוף הבקשה מכיל מופע של CalculatedMetric
.
גוף התשובה
אם הפעולה בוצעה בהצלחה, גוף התגובה מכיל מופע חדש של CalculatedMetric
שנוצר.
היקפי הרשאות
נדרש היקף ההרשאות הבא של OAuth:
https://www.googleapis.com/auth/analytics.edit
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["Creates a new CalculatedMetric within a specified Google Analytics 4 property using an HTTP POST request."],["Requires providing a unique `calculatedMetricId` and the `property_id` as path and query parameters, respectively."],["The request body should contain the CalculatedMetric definition, and a successful response will return the newly created CalculatedMetric instance."],["Users need to have the `analytics.edit` OAuth scope to authorize this operation."]]],["This documentation details how to create a CalculatedMetric via a `POST` request to the specified URL, including required components such as path and query parameters, the request body and the response body. The path parameter `parent` defines the property ID. The query parameter `calculatedMetricId` is a unique identifier. The request and response bodies are `CalculatedMetric` instances. This action requires authorization scope: `https://www.googleapis.com/auth/analytics.edit`.\n"]]