Google Analytics के लिए, एमसीपी सर्वर आज़माएं. इसे
GitHub से इंस्टॉल करें. साथ ही, ज़्यादा जानकारी के लिए
सूचना देखें.
REST Resource: properties.calculatedMetrics
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
संसाधन: परिकलित मेट्रिक
कैलकुलेट की गई मेट्रिक की परिभाषा.
JSON के काेड में दिखाना |
{
"name": string,
"description": string,
"displayName": string,
"calculatedMetricId": string,
"metricUnit": enum (MetricUnit ),
"restrictedMetricType": [
enum (RestrictedMetricType )
],
"formula": string,
"invalidMetricReference": boolean
} |
फ़ील्ड |
name |
string
सिर्फ़ आउटपुट के लिए. इस परिकलित मेट्रिक के लिए संसाधन का नाम. फ़ॉर्मैट: 'प्रॉपर्टी/{property_id}/calMetrics/{calMetricId}'
|
description |
string
ज़रूरी नहीं. कैलकुलेट की गई इस मेट्रिक के बारे में जानकारी. ज़्यादा से ज़्यादा 4,096 वर्ण.
|
displayName |
string
ज़रूरी है. कैलकुलेट की गई इस मेट्रिक का डिसप्ले नेम, जैसा कि Google Analytics यूज़र इंटरफ़ेस (यूआई) में दिखाया गया है. ज़्यादा से ज़्यादा 82 वर्ण.
|
calculatedMetricId |
string
सिर्फ़ आउटपुट के लिए. कैलकुलेट की गई मेट्रिक के लिए इस्तेमाल किया जाने वाला आईडी. यूज़र इंटरफ़ेस (यूआई) में, इसे "एपीआई का नाम" कहा जाता है. बाहरी एपीआई से कैलकुलेट की गई इस मेट्रिक का रेफ़रंस देने के लिए, परिकलित मेट्रिकId का इस्तेमाल किया जाता है. उदाहरण के लिए, "calcMetric:{कैलकेटेड मेट्रिकId}".
|
metricUnit |
enum (MetricUnit )
ज़रूरी है. कैलकुलेट की गई मेट्रिक की वैल्यू का टाइप.
|
restrictedMetricType[] |
enum (RestrictedMetricType )
सिर्फ़ आउटपुट के लिए. इस मेट्रिक में शामिल प्रतिबंधित डेटा के टाइप.
|
formula |
string
ज़रूरी है. कैलकुलेट की गई मेट्रिक की परिभाषा. रेफ़र की गई यूनीक कस्टम मेट्रिक की संख्या ज़्यादा से ज़्यादा पांच हो सकती है. फ़ॉर्मूले से नीचे दिए गए काम किए जा सकते हैं: + (जोड़), - (घटाना), - (नेगेटिव), * (गुणा), / (भाग), () (ब्रैकेट). कोई भी मान्य वास्तविक नंबर स्वीकार किया जाता है, जो लंबे (64 बिट पूर्णांक) या डबल (64 बिट फ़्लोटिंग पॉइंट नंबर) में फ़िट हो जाता है. फ़ॉर्मूला का उदाहरण: "( customEvent:parameterName +cartPurchaseQuantity ) / 2.0"
|
invalidMetricReference |
boolean
सिर्फ़ आउटपुट के लिए. अगर सही है, तो कैलकुलेट की गई इस मेट्रिक का रेफ़रंस अमान्य है. अगर किसी ऐसी मेट्रिक का इस्तेमाल किया गया है जिसकी अमान्य मेट्रिक, सही पर सेट है, तो वह काम नहीं कर सकती, चेतावनी या अनचाहे नतीजे दे सकती है.
|
MetricUnit
कैलकुलेट की गई मेट्रिक की वैल्यू दिखाने के संभावित टाइप.
Enums |
METRIC_UNIT_UNSPECIFIED |
मेट्रिक यूनिट की जानकारी नहीं दी गई है या मौजूद नहीं है. |
STANDARD |
इस मेट्रिक में डिफ़ॉल्ट यूनिट का इस्तेमाल किया जाता है. |
CURRENCY |
इस मेट्रिक से मुद्रा का पता चलता है. |
FEET |
यह मेट्रिक फ़ीट को मापती है. |
MILES |
यह मेट्रिक मील को मापती है. |
METERS |
इस मेट्रिक से मीटर को मापा जाता है. |
KILOMETERS |
यह मेट्रिक किलोमीटर को मापती है. |
MILLISECONDS |
यह मेट्रिक, मिलीसेकंड को मापती है. |
SECONDS |
यह मेट्रिक सेकंड का आकलन करती है. |
MINUTES |
इस मेट्रिक से मिनट का आकलन किया जाता है. |
HOURS |
इस मेट्रिक में कारोबार के खुले होने के समय की जानकारी दी जाती है. |
RestrictedMetricType
ऐसे लेबल जो उपयोगकर्ता की भूमिकाओं के साथ इस्तेमाल की गई, कैलकुलेट की गई मेट्रिक में डेटा मार्क करते हैं. इन लेबल से लागत और/या रेवेन्यू मेट्रिक का ऐक्सेस प्रतिबंधित होता है.
Enums |
RESTRICTED_METRIC_TYPE_UNSPECIFIED |
अज्ञात या अनिर्दिष्ट प्रकार. |
COST_DATA |
मेट्रिक रिपोर्ट में लागत डेटा शामिल होता है. |
REVENUE_DATA |
मेट्रिक, रेवेन्यू का डेटा रिपोर्ट करती है. |
तरीके |
|
यह कैलकुलेट की गई मेट्रिक बनाता है. |
|
यह किसी प्रॉपर्टी पर, आपके दिए गए फ़ॉर्मूला के आधार पर तैयार की गई मेट्रिक को मिटाता है. |
|
सिर्फ़ एक परिकलित मेट्रिक खोजें. |
|
यह किसी प्रॉपर्टी पर परिकलित मेट्रिक की सूची बनाता है. |
|
यह किसी प्रॉपर्टी के लिए आपके दिए गए फ़ॉर्मूले के आधार पर तैयार की गई मेट्रिक को अपडेट करता है. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003e\u003ccode\u003eCalculatedMetric\u003c/code\u003e allows you to create custom metrics using formulas based on existing metrics and parameters, with options for units like currency, time, or distance.\u003c/p\u003e\n"],["\u003cp\u003eYou can define the display name, description, and formula for your custom metric, along with specifying its unit of measurement.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Analytics provides a dedicated resource and API for managing calculated metrics, allowing you to create, update, delete, and list them within your properties.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCalculatedMetric\u003c/code\u003e resources have fields indicating if they contain cost or revenue data or have invalid metric references.\u003c/p\u003e\n"]]],["Calculated metrics are defined with a name, description, display name, and a unique ID. They also specify a `metricUnit` (e.g., standard, currency, feet) and can contain `restrictedMetricTypes` (cost or revenue data). The `formula` field defines the metric's calculation, supporting basic arithmetic. Methods include creating, deleting, retrieving, listing, and updating calculated metrics. Metrics can reference up to five custom metrics. `invalidMetricReference` flag indicates issues.\n"],null,["# REST Resource: properties.calculatedMetrics\n\n- [Resource: CalculatedMetric](#CalculatedMetric)\n - [JSON representation](#CalculatedMetric.SCHEMA_REPRESENTATION)\n- [MetricUnit](#MetricUnit)\n- [RestrictedMetricType](#RestrictedMetricType)\n- [Methods](#METHODS_SUMMARY)\n\nResource: CalculatedMetric\n--------------------------\n\nA definition for a calculated metric.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"description\": string, \"displayName\": string, \"calculatedMetricId\": string, \"metricUnit\": enum (/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics#MetricUnit), \"restrictedMetricType\": [ enum (/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics#RestrictedMetricType) ], \"formula\": string, \"invalidMetricReference\": boolean } ``` |\n\n| Fields ||\n|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Output only. Resource name for this CalculatedMetric. Format: 'properties/{property_id}/calculatedMetrics/{calculatedMetricId}' |\n| `description` | `string` Optional. Description for this calculated metric. Max length of 4096 characters. |\n| `displayName` | `string` Required. Display name for this calculated metric as shown in the Google Analytics UI. Max length 82 characters. |\n| `calculatedMetricId` | `string` Output only. The ID to use for the calculated metric. In the UI, this is referred to as the \"API name.\" The calculatedMetricId is used when referencing this calculated metric from external APIs. For example, \"calcMetric:{calculatedMetricId}\". |\n| `metricUnit` | `enum (`[MetricUnit](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics#MetricUnit)`)` Required. The type for the calculated metric's value. |\n| `restrictedMetricType[]` | `enum (`[RestrictedMetricType](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics#RestrictedMetricType)`)` Output only. Types of restricted data that this metric contains. |\n| `formula` | `string` Required. The calculated metric's definition. Maximum number of unique referenced custom metrics is 5. Formulas supports the following operations: + (addition), - (subtraction), - (negative), \\* (multiplication), / (division), () (parenthesis). Any valid real numbers are acceptable that fit in a Long (64bit integer) or a Double (64 bit floating point number). Example formula: \"( customEvent:parameterName + cartPurchaseQuantity ) / 2.0\" |\n| `invalidMetricReference` | `boolean` Output only. If true, this calculated metric has a invalid metric reference. Anything using a calculated metric with invalidMetricReference set to true may fail, produce warnings, or produce unexpected results. |\n\nMetricUnit\n----------\n\nPossible types of representing the calculated metric's value.\n\n| Enums ||\n|---------------------------|------------------------------------|\n| `METRIC_UNIT_UNSPECIFIED` | MetricUnit unspecified or missing. |\n| `STANDARD` | This metric uses default units. |\n| `CURRENCY` | This metric measures a currency. |\n| `FEET` | This metric measures feet. |\n| `MILES` | This metric measures miles. |\n| `METERS` | This metric measures meters. |\n| `KILOMETERS` | This metric measures kilometers. |\n| `MILLISECONDS` | This metric measures milliseconds. |\n| `SECONDS` | This metric measures seconds. |\n| `MINUTES` | This metric measures minutes. |\n| `HOURS` | This metric measures hours. |\n\nRestrictedMetricType\n--------------------\n\nLabels that mark the data in calculated metric used in conjunction with user roles that restrict access to cost and/or revenue metrics.\n\n| Enums ||\n|--------------------------------------|------------------------------|\n| `RESTRICTED_METRIC_TYPE_UNSPECIFIED` | Type unknown or unspecified. |\n| `COST_DATA` | Metric reports cost data. |\n| `REVENUE_DATA` | Metric reports revenue data. |\n\n| Methods ------- ||\n|-----------------------------------------------------------------------------------------------------|-------------------------------------------|\n| ### [create](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics/create) | Creates a CalculatedMetric. |\n| ### [delete](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics/delete) | Deletes a CalculatedMetric on a property. |\n| ### [get](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics/get) | Lookup for a single CalculatedMetric. |\n| ### [list](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics/list) | Lists CalculatedMetrics on a property. |\n| ### [patch](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.calculatedMetrics/patch) | Updates a CalculatedMetric on a property. |"]]