Google Analytics के लिए, एमसीपी सर्वर आज़माएं. इसे
GitHub से इंस्टॉल करें. साथ ही, ज़्यादा जानकारी के लिए
सूचना देखें.
REST Resource: properties.customMetrics
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
संसाधन: कस्टम मेट्रिक
कस्टम मेट्रिक की परिभाषा.
JSON के काेड में दिखाना |
{
"name": string,
"parameterName": string,
"displayName": string,
"description": string,
"measurementUnit": enum (MeasurementUnit ),
"scope": enum (MetricScope ),
"restrictedMetricType": [
enum (RestrictedMetricType )
]
} |
फ़ील्ड |
name |
string
सिर्फ़ आउटपुट के लिए. इस कस्टम मेट्रिक संसाधन के लिए संसाधन का नाम. फ़ॉर्मैट: प्रॉपर्टी/{property}/customMetrics/{customMetric}
|
parameterName |
string
ज़रूरी है. इम्यूटेबल. इस कस्टम मेट्रिक के लिए नाम टैगिंग. अगर यह इवेंट के स्कोप वाली मेट्रिक है, तो इवेंट पैरामीटर का नाम इस तरह का होगा. इसमें सिर्फ़ अक्षर, अंक, और अंडरस्कोर वाले वर्ण इस्तेमाल हो सकते हैं. ये अक्षर, अक्षर से शुरू होते हैं. इवेंट के स्कोप वाली मेट्रिक के लिए, ज़्यादा से ज़्यादा 40 वर्ण इस्तेमाल किए जा सकते हैं.
|
displayName |
string
ज़रूरी है. इस कस्टम मेट्रिक के लिए डिसप्ले नेम, जैसा कि Analytics यूज़र इंटरफ़ेस (यूआई) में दिखाया गया है. इसमें ज़्यादा से ज़्यादा 82 वर्ण हो सकते हैं. इसमें अक्षर और अंक के साथ स्पेस और अंडरस्कोर शामिल हैं. सिस्टम से जनरेट किए गए लेगसी डिसप्ले नेम में स्क्वेयर ब्रैकेट हो सकते हैं. हालांकि, इस फ़ील्ड को अपडेट करने पर, कभी भी स्क्वेयर ब्रैकेट की अनुमति नहीं होगी.
|
description |
string
ज़रूरी नहीं. इस कस्टम डाइमेंशन के लिए जानकारी. ज़्यादा से ज़्यादा 150 वर्ण.
|
measurementUnit |
enum (MeasurementUnit )
ज़रूरी है. कस्टम मेट्रिक की वैल्यू का टाइप.
|
scope |
enum (MetricScope )
ज़रूरी है. इम्यूटेबल. इस कस्टम मेट्रिक का स्कोप.
|
restrictedMetricType[] |
enum (RestrictedMetricType )
ज़रूरी नहीं. इस मेट्रिक में किस तरह का प्रतिबंधित डेटा हो सकता है. CURRENCY माप इकाई वाली मीट्रिक के लिए आवश्यक. गैर-CURRENCY मापन इकाई वाली मीट्रिक के लिए खाली होना चाहिए.
|
MeasurementUnit
कस्टम मेट्रिक की वैल्यू दिखाने वाले संभावित टाइप.
आने वाले समय में, मुद्रा दिखाने में बदलाव हो सकता है. इसके लिए, एक नुकसान पहुंचा सकने वाले एपीआई को बदलना ज़रूरी होगा.
Enums |
MEASUREMENT_UNIT_UNSPECIFIED |
मेज़रमेंट यूनिट की जानकारी नहीं दी गई है या मौजूद नहीं है. |
STANDARD |
इस मेट्रिक में डिफ़ॉल्ट यूनिट का इस्तेमाल किया जाता है. |
CURRENCY |
इस मेट्रिक से मुद्रा का पता चलता है. |
FEET |
यह मेट्रिक फ़ीट को मापती है. |
METERS |
इस मेट्रिक से मीटर को मापा जाता है. |
KILOMETERS |
यह मेट्रिक किलोमीटर को मापती है. |
MILES |
यह मेट्रिक मील को मापती है. |
MILLISECONDS |
यह मेट्रिक, मिलीसेकंड को मापती है. |
SECONDS |
यह मेट्रिक सेकंड का आकलन करती है. |
MINUTES |
इस मेट्रिक से मिनट का आकलन किया जाता है. |
HOURS |
इस मेट्रिक में कारोबार के खुले होने के समय की जानकारी दी जाती है. |
MetricScope
Enums |
METRIC_SCOPE_UNSPECIFIED |
स्कोप की जानकारी नहीं है या तय नहीं किया गया है. |
EVENT |
इस मेट्रिक का दायरा किसी इवेंट तक सीमित है. |
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\u003eCustomMetric\u003c/code\u003e resource allows you to define custom metrics with specific parameters, display names, descriptions, measurement units, and scopes within Google Analytics.\u003c/p\u003e\n"],["\u003cp\u003eThese custom metrics can have various measurement units like \u003ccode\u003eSTANDARD\u003c/code\u003e, \u003ccode\u003eCURRENCY\u003c/code\u003e, \u003ccode\u003eFEET\u003c/code\u003e, \u003ccode\u003eMETERS\u003c/code\u003e, and more, alongside scopes such as \u003ccode\u003eEVENT\u003c/code\u003e to tailor data collection to specific events.\u003c/p\u003e\n"],["\u003cp\u003eYou can manage your custom metrics with dedicated methods, including \u003ccode\u003earchive\u003c/code\u003e, \u003ccode\u003ecreate\u003c/code\u003e, \u003ccode\u003eget\u003c/code\u003e, \u003ccode\u003elist\u003c/code\u003e, and \u003ccode\u003epatch\u003c/code\u003e to control their lifecycle and properties directly through the API.\u003c/p\u003e\n"],["\u003cp\u003eRestricted data like cost and revenue can be tracked by labeling the metric with specific \u003ccode\u003eRestrictedMetricType\u003c/code\u003e values, ensuring appropriate access controls.\u003c/p\u003e\n"]]],["CustomMetrics are defined by `name`, `parameterName`, `displayName`, `description`, `measurementUnit`, `scope`, and `restrictedMetricType`. `MeasurementUnit` options include standard, currency, and various distance/time units. `MetricScope` can be event-based. `RestrictedMetricType` marks data like cost or revenue. Methods allow creating, retrieving, listing, updating, and archiving custom metrics. These metrics are structured with specific field requirements, such as length and character restrictions.\n"],null,["# REST Resource: properties.customMetrics\n\n- [Resource: CustomMetric](#CustomMetric)\n - [JSON representation](#CustomMetric.SCHEMA_REPRESENTATION)\n- [MeasurementUnit](#MeasurementUnit)\n- [MetricScope](#MetricScope)\n- [RestrictedMetricType](#RestrictedMetricType)\n- [Methods](#METHODS_SUMMARY)\n\nResource: CustomMetric\n----------------------\n\nA definition for a custom metric.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"parameterName\": string, \"displayName\": string, \"description\": string, \"measurementUnit\": enum (/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics#MeasurementUnit), \"scope\": enum (/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics#MetricScope), \"restrictedMetricType\": [ enum (/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics#RestrictedMetricType) ] } ``` |\n\n| Fields ||\n|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Output only. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric} |\n| `parameterName` | `string` Required. Immutable. Tagging name for this custom metric. If this is an event-scoped metric, then this is the event parameter name. May only contain alphanumeric and underscore charactes, starting with a letter. Max length of 40 characters for event-scoped metrics. |\n| `displayName` | `string` Required. Display name for this custom metric as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display names may contain square brackets, but updates to this field will never permit square brackets. |\n| `description` | `string` Optional. Description for this custom dimension. Max length of 150 characters. |\n| `measurementUnit` | `enum (`[MeasurementUnit](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics#MeasurementUnit)`)` Required. The type for the custom metric's value. |\n| `scope` | `enum (`[MetricScope](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics#MetricScope)`)` Required. Immutable. The scope of this custom metric. |\n| `restrictedMetricType[]` | `enum (`[RestrictedMetricType](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics#RestrictedMetricType)`)` Optional. Types of restricted data that this metric may contain. Required for metrics with CURRENCY measurement unit. Must be empty for metrics with a non-CURRENCY measurement unit. |\n\nMeasurementUnit\n---------------\n\nPossible types of representing the custom metric's value.\n\nCurrency representation may change in the future, requiring a breaking API change.\n\n| Enums ||\n|--------------------------------|-----------------------------------------|\n| `MEASUREMENT_UNIT_UNSPECIFIED` | MeasurementUnit unspecified or missing. |\n| `STANDARD` | This metric uses default units. |\n| `CURRENCY` | This metric measures a currency. |\n| `FEET` | This metric measures feet. |\n| `METERS` | This metric measures meters. |\n| `KILOMETERS` | This metric measures kilometers. |\n| `MILES` | This metric measures miles. |\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\nMetricScope\n-----------\n\nThe scope of this metric.\n\n| Enums ||\n|----------------------------|---------------------------------|\n| `METRIC_SCOPE_UNSPECIFIED` | Scope unknown or not specified. |\n| `EVENT` | Metric scoped to an event. |\n\nRestrictedMetricType\n--------------------\n\nLabels that mark the data in this custom metric as data that should be restricted to specific users.\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| ### [archive](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics/archive) | Archives a CustomMetric on a property. |\n| ### [create](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics/create) | Creates a CustomMetric. |\n| ### [get](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics/get) | Lookup for a single CustomMetric. |\n| ### [list](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics/list) | Lists CustomMetrics on a property. |\n| ### [patch](/analytics/devguides/config/admin/v1/rest/v1beta/properties.customMetrics/patch) | Updates a CustomMetric on a property. |"]]