جرِّب خادم MCP لخدمة "إحصاءات Google". يمكنك تثبيت التطبيق من
GitHub والاطّلاع على
الإعلان لمعرفة المزيد من التفاصيل.
السمات والمقاييس في الوقت الفعلي
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
السمات والمقاييس المتوافقة مع طلبات البحث إلى طريقة الوقت الفعلي في Analytics Data API تقبل طرق إعداد التقارير الأساسية (RunReport
على سبيل المثال) مجموعة مختلفة من السمات والمقاييس عن طريقة إعداد التقارير في الوقت الفعلي.
الأبعاد
يمكن طلب السمات التالية في التقارير لأي موقع. حدِّد "اسم واجهة برمجة التطبيقات" في حقل name
الخاص بمورد Dimension
لعمود سمة في استجابة التقرير.
اسم واجهة برمجة التطبيقات |
اسم واجهة المستخدم |
الوصف |
appVersion |
إصدار التطبيق |
versionName للتطبيق (Android) أو الإصدار القصير للحزمة (iOS). |
audienceId |
رقم تعريف الجمهور |
المعرّف الرقمي لشريحة الجمهور ويتم الإبلاغ عن المستخدمين في شرائح الجمهور التي كانوا ينتمون إليها خلال النطاق الزمني للتقرير. لا يؤثر سلوك المستخدمين الحالي في انتماءاتهم السابقة إلى شرائح الجمهور في التقارير. |
audienceName |
اسم شريحة الجمهور |
الاسم المحدّد لشريحة الجمهور. ويتم الإبلاغ عن المستخدمين في شرائح الجمهور التي كانوا ينتمون إليها خلال النطاق الزمني للتقرير. لا يؤثر سلوك المستخدمين الحالي في انتماءاتهم السابقة إلى شرائح الجمهور في التقارير. |
audienceResourceName |
اسم مورد الجمهور |
اسم المورد الخاص بشريحة الجمهور هذه. تحتوي أسماء الموارد على معرّفات المجموعة والموارد لتحديد مورد بشكل فريد. لمعرفة المزيد، يُرجى الاطّلاع على أسماء الموارد. |
city |
المدينة |
المدينة التي نشأ منها نشاط المستخدِم. |
cityId |
رقم تعريف المدينة |
رقم التعريف الجغرافي للمدينة التي نشأ منها نشاط المستخدِم، والمستمدّ من عنوان IP الخاص به. |
country |
البلد |
البلد الذي نشأ منه نشاط المستخدِم. |
countryId |
رقم تعريف البلد |
رقم التعريف الجغرافي للبلد الذي نشأ منه نشاط المستخدِم، والمستمدّ من عنوان IP الخاص به. يتم تنسيقها وفقًا لمعيار ISO 3166-1 alpha-2. |
deviceCategory |
فئة الجهاز |
نوع الجهاز: جهاز كمبيوتر مكتبي أو لوحي أو جوّال. |
eventName |
اسم الحدث |
اسم الحدث |
minutesAgo |
قبل دقائق في الوقت الفعلي |
عدد الدقائق التي مضت منذ جمع بيانات حدث معيّن. يشير الرقم 00 إلى الدقيقة الحالية، بينما يشير الرقم 01 إلى الدقيقة السابقة. |
platform |
النظام الأساسي |
النظام الأساسي الذي تم تشغيل تطبيقك أو موقعك الإلكتروني عليه، على سبيل المثال، ويب أو iOS أو Android. لتحديد نوع البث في تقرير، استخدِم كلاً من المنصة وstreamId. |
streamId |
رقم تعريف مصدر البيانات |
المعرّف الرقمي لمصدر البيانات الخاص بتطبيقك أو موقعك الإلكتروني. |
streamName |
اسم مصدر البيانات |
اسم مصدر البيانات لتطبيقك أو موقعك الإلكتروني. |
unifiedScreenName |
عنوان الصفحة واسم الشاشة |
عنوان الصفحة (على الويب) أو اسم الشاشة (في التطبيق) التي تم تسجيل الحدث عليها. |
السمات المخصّصة
يمكن لواجهة برمجة التطبيقات Realtime Data API إنشاء تقارير عن السمات المخصّصة على مستوى المستخدِم. راجِع مقالة
خصائص المستخدِم المخصّصة للتعرّف
على مزيد من المعلومات عن السمات المخصّصة. يتم تحديد السمات المخصّصة في طلب تقرير من واجهة برمجة التطبيقات من خلال اسم مَعلمة السمة ونطاقها. على سبيل المثال، أدرِج
"customUser:last_level"
في طلب البيانات من Data API لإنشاء تقرير
للسِمة المخصّصة على مستوى المستخدِم التي تحمل اسم المَعلمة "last_level"
. سيتعذّر تنفيذ طلب واجهة برمجة التطبيقات هذا إذا لم يسجّل الموقع سمة مخصّصة على مستوى المستخدم.
في ما يلي بناء الجملة العام للسمات المخصّصة. يمكنك طلب البحث من خلال طريقة Metadata API لإدراج جميع الأبعاد المخصّصة لموقع.
اسم واجهة برمجة التطبيقات العامة |
الوصف |
customUser:parameter_name |
سمة مخصّصة على مستوى المستخدِم لـ parameter_name |
لا تتوافق السمات المخصّصة على مستوى الحدث مع Realtime API.
المقاييس
يمكن طلب المقاييس التالية في التقارير لأي موقع. حدِّد "اسم واجهة برمجة التطبيقات" في حقل name
الخاص بمورد Metric
لعمود المقياس في ردّ التقرير.
اسم واجهة برمجة التطبيقات |
اسم واجهة المستخدم |
الوصف |
activeUsers |
المستخدِمون النشطون |
عدد المستخدمين المختلفين الذين زاروا موقعك الإلكتروني أو تطبيقك. |
eventCount |
عدد الأحداث |
عدد الأحداث |
keyEvents |
الأحداث الرئيسية |
عدد الأحداث الرئيسية عند تصنيف حدث على أنّه حدث رئيسي، سيؤثّر ذلك في التقارير منذ وقت إنشائها. ولا يؤدّي ذلك إلى تغيير البيانات السابقة. يمكنك تصنيف أي حدث على أنّه حدث رئيسي في "إحصاءات Google"، كما أنّ بعض الأحداث (مثل first_open أو purchase ) يتم تصنيفها تلقائيًا على أنّها أحداث رئيسية. |
screenPageViews |
المشاهدات |
عدد شاشات التطبيق أو صفحات الويب التي شاهدها المستخدمون. ويتم احتساب مرات المشاهدة المكرّرة لصفحة أو شاشة واحدة. (أحداث screen_view + page_view) |
لا تتوفّر المقاييس المخصّصة على مستوى الحدث في Realtime API.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-29 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe Realtime reporting method of the Analytics Data API allows you to query specific dimensions and metrics to analyze real-time user behavior on your app or website.\u003c/p\u003e\n"],["\u003cp\u003eSupported dimensions include user demographics (like city and country), device information, app version, audience data, event details, and user-scoped custom dimensions.\u003c/p\u003e\n"],["\u003cp\u003eYou can use metrics like \u003ccode\u003eactiveUsers\u003c/code\u003e, \u003ccode\u003eeventCount\u003c/code\u003e, \u003ccode\u003escreenPageViews\u003c/code\u003e, and \u003ccode\u003ekeyEvents\u003c/code\u003e to understand real-time user engagement.\u003c/p\u003e\n"],["\u003cp\u003eUnlike Core Reporting methods, the Realtime method uses a different set of dimensions and metrics and doesn't support event-scoped custom dimensions or metrics.\u003c/p\u003e\n"]]],["The Realtime Analytics Data API supports specific dimensions and metrics for querying. Dimensions include `appVersion`, `audienceId/Name/ResourceName`, geographic data (`city/Id`, `country/Id`), `deviceCategory`, `eventName`, `minutesAgo`, `platform`, `streamId/Name`, and `unifiedScreenName`. User-scoped custom dimensions are supported using the `customUser:parameter_name` format. Supported metrics are `activeUsers`, `eventCount`, `keyEvents`, and `screenPageViews`. Event-scoped custom dimensions and metrics are not supported in the Realtime API.\n"],null,["# Realtime Dimensions & Metrics\n\nThe dimensions and metrics supported in queries to the [Realtime method](/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runRealtimeReport) of the Analytics Data API. The\nCore Reporting methods ([`RunReport`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runReport)\nfor example) accept a different set of [Dimensions \\& Metrics](/analytics/devguides/reporting/data/v1/api-schema)\nthan the Realtime method.\n\nDimensions\n----------\n\nThe following dimensions can be requested in reports for any property. Specify\nthe \"API Name\" in a [`Dimension`](/analytics/devguides/reporting/data/v1/rest/v1beta/Dimension) resource's `name`\nfield for a column of the dimension in the report response.\n\n| API Name | UI Name | Description |\n|------------------------|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `appVersion` | App version | The app's versionName (Android) or short bundle version (iOS). |\n| `audienceId` | Audience ID | The numeric identifier of an Audience. Users are reported in the audiences to which they belonged during the report's date range. Current user behavior does not affect historical audience membership in reports. |\n| `audienceName` | Audience name | The given name of an Audience. Users are reported in the audiences to which they belonged during the report's date range. Current user behavior does not affect historical audience membership in reports. |\n| `audienceResourceName` | Audience resource name | The resource name of this audience. Resource names contain both collection \\& resource identifiers to uniquely identify a resource; to learn more, see [Resource names](//google.aip.dev/122). |\n| `city` | City | The city from which the user activity originated. |\n| `cityId` | City ID | The geographic ID of the city from which the user activity originated, derived from their IP address. |\n| `country` | Country | The country from which the user activity originated. |\n| `countryId` | Country ID | The geographic ID of the country from which the user activity originated, derived from their IP address. Formatted according to ISO 3166-1 alpha-2 standard. |\n| `deviceCategory` | Device category | The type of device: Desktop, Tablet, or Mobile. |\n| `eventName` | Event name | The name of the event. |\n| `minutesAgo` | Realtime minutes ago | The number of minutes ago that an event was collected. 00 is the current minute, and 01 means the previous minute. |\n| `platform` | Platform | The platform on which your app or website ran; for example, web, iOS, or Android. To determine a stream's type in a report, use both platform and streamId. |\n| `streamId` | Stream ID | The numeric data stream identifier for your app or website. |\n| `streamName` | Stream name | The data stream name for your app or website. |\n| `unifiedScreenName` | Page title and screen name | The page title (web) or screen name (app) on which the event was logged. |\n\n### Custom Dimensions\n\nThe Realtime Data API can create reports on User scoped Custom Dimensions. See\n[Custom user properties](//support.google.com/analytics/answer/9269570) to learn\nmore about custom dimensions. Custom dimensions are specified in an API report\nrequest by the dimension's parameter name and scope. For example, include\n`\"customUser:last_level\"` in a Data API request to create a report for the\nUser-scoped Custom Dimension with parameter name `\"last_level\"`. This API\nrequest will fail if the property has not registered this User-scoped Custom\nDimension.\n\nThe following are the general syntax for Custom Dimensions. You can query the\n[Metadata API method](/analytics/devguides/reporting/data/v1/rest/v1beta/properties/getMetadata) to list all\nCustom Dimensions for a Property.\n\n| Generic API Name | Description |\n|-----------------------------|----------------------------------------------------|\n| `customUser:parameter_name` | User-scoped Custom Dimension for `parameter_name`. |\n\nEvent-scoped custom dimensions aren't supported in the Realtime API.\n\nMetrics\n-------\n\nThe following metrics can be requested in reports for any property. Specify the\n\"API Name\" in a [`Metric`](/analytics/devguides/reporting/data/v1/rest/v1beta/Metric) resource's `name` field for\na column of the metric in the report response.\n\n| API Name | UI Name | Description |\n|-------------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `activeUsers` | Active users | The number of distinct users who visited your site or app. |\n| `eventCount` | Event count | The count of events. |\n| `keyEvents` | Key events | The count of key events. Marking an event as a key event affects reports from time of creation. It doesn't change historic data. You can mark any event as key in Google Analytics, and some events (such as `first_open` or `purchase`) are marked as key events by default. |\n| `screenPageViews` | Views | The number of app screens or web pages your users viewed. Repeated views of a single page or screen are counted. (screen_view + page_view events). |\n\nEvent-scoped custom metrics aren't supported in the Realtime API."]]