عرض البيانات الوصفية للسمات والمقاييس المتاحة في طرق إعداد التقارير تُستخدَم لاستكشاف السمات والمقاييس. في هذه الطريقة، يتمّ تحديد معرّف موقع على "إحصاءات Google" في الطلب، ويتضمّن ردّ البيانات الوصفية السمات والمقاييس المخصّصة بالإضافة إلى البيانات الوصفية الشاملة.
على سبيل المثال، إذا تم تسجيل مقياس مخصّص باسم المَعلمة levels_unlocked لموقع، سيتضمّن ردّ البيانات الوصفية customEvent:levels_unlocked. البيانات الوصفية العامة هي السمات والمقاييس التي تنطبق على أيّ موقع، مثل country وtotalUsers.
طلب HTTP
GET https://analyticsdata.googleapis.com/v1beta/{name=properties/*/metadata}
مطلوب. اسم المورد للبيانات الوصفية المطلوب استرجاعها يتم تحديد حقل الاسم هذا في مسار عنوان URL وليس في مَعلمات عنوان URL. الموقع هو معرّف رقمي لموقع على "إحصاءات Google". لمزيد من المعلومات، يُرجى الاطّلاع على مكان العثور على رقم تعريف الموقع.
مثال: properties/1234/metadata
اضبط "معرّف الموقع" على 0 للسمات والمقاييس المشتركة بين جميع المواقع. في هذا الوضع الخاص، لن تُرجع هذه الطريقة السمات والمقاييس المخصّصة.
نص الطلب
يجب أن يكون نص الطلب فارغًا.
نص الاستجابة
السمات والمقاييس والمقارنات المقبولة حاليًا في طرق إعداد التقارير
إذا كانت الاستجابة ناجحة، سيحتوي نص الاستجابة على بيانات بالبنية التالية:
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eReturns metadata for dimensions, metrics, and comparisons available in reporting methods for a specified Google Analytics GA4 Property.\u003c/p\u003e\n"],["\u003cp\u003eIncludes both custom and Universal metadata, allowing exploration of available data points.\u003c/p\u003e\n"],["\u003cp\u003eAccepts a Google Analytics GA4 Property Identifier in the request to retrieve property-specific metadata.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with specific OAuth scopes for accessing the data.\u003c/p\u003e\n"],["\u003cp\u003eProvides details about dimensions, metrics, and comparisons through comprehensive metadata descriptions.\u003c/p\u003e\n"]]],["This method retrieves metadata for dimensions, metrics, and comparisons used in Google Analytics reporting. It utilizes a `GET` HTTP request with a required property ID in the URL path (`name`) to specify the target property. An empty request body is required. The response contains a JSON structure with descriptions of available dimensions, metrics, and comparisons, including universal and custom ones. Setting the property ID to '0' will only return universal data. Two authorization scopes are required to utilize this method.\n"],null,["# Method: properties.getMetadata\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.Metadata.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [ComparisonMetadata](#ComparisonMetadata)\n - [JSON representation](#ComparisonMetadata.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nReturns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata.\n\nFor example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.\n\n### HTTP request\n\n`GET https://analyticsdata.googleapis.com/v1beta/{name=properties/*/metadata}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics property identifier. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234/metadata Set the Property ID to 0 for dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe dimensions, metrics and comparisons currently accepted in reporting methods.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"dimensions\": [ { object (/analytics/devguides/reporting/data/v1/rest/v1beta/DimensionMetadata) } ], \"metrics\": [ { object (/analytics/devguides/reporting/data/v1/rest/v1beta/MetricMetadata) } ], \"comparisons\": [ { object (/analytics/devguides/reporting/data/v1/rest/v1beta/properties/getMetadata#ComparisonMetadata) } ] } ``` |\n\n| Fields ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Resource name of this metadata. |\n| `dimensions[]` | `object (`[DimensionMetadata](/analytics/devguides/reporting/data/v1/rest/v1beta/DimensionMetadata)`)` The dimension descriptions. |\n| `metrics[]` | `object (`[MetricMetadata](/analytics/devguides/reporting/data/v1/rest/v1beta/MetricMetadata)`)` The metric descriptions. |\n| `comparisons[]` | `object (`[ComparisonMetadata](/analytics/devguides/reporting/data/v1/rest/v1beta/properties/getMetadata#ComparisonMetadata)`)` The comparison descriptions. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/analytics.readonly`\n- `https://www.googleapis.com/auth/analytics`\n\nComparisonMetadata\n------------------\n\nThe metadata for a single comparison.\n\n| JSON representation |\n|------------------------------------------------------------------------|\n| ``` { \"apiName\": string, \"uiName\": string, \"description\": string } ``` |\n\n| Fields ||\n|---------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| `api``Name` | `string` This comparison's resource name. Useable in [Comparison](#Comparison)'s `comparison` field. For example, 'comparisons/1234'. |\n| `ui``Name` | `string` This comparison's name within the Google Analytics user interface. |\n| `description` | `string` This comparison's description. |"]]