تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تتيح لك شرائح الجمهور في "إحصاءات Google"
تقسيم المستخدِمين بالطرق التي تمثّل أهمية بالنسبة إلى نشاطك التجاري. باستخدام
شرائح الجمهور، يمكنك تجميع مستخدِمي موقعك الإلكتروني أو تطبيقك استنادًا إلى
السمات المشتركة.
يمكنك تصدير شرائح جمهورك، بما في ذلك نبذة عن المستخدمين، باستخدام Data API.
لمزيد من المعلومات، يمكنك الاتصال بالرقم
audienceExports.get ل retrieving metadata about a specific audience export، وaudienceExports.list ل listing all your audience exports for a specific property.
اختيار كيان إعداد التقارير
تتطلّب جميع طُرق Data API تحديد معرّف موقع "إحصاءات Google" داخل مسار طلب عنوان URL، بالتنسيق properties/GA_PROPERTY_ID. وفي ما يلي مثال لذلك:
POST https://analyticsdata.googleapis.com/v1beta/properties/GA_PROPERTY_ID/audienceExports
يتمّ إنشاء التقرير استنادًا إلى بيانات أحداث "إحصاءات Google" التي تمّ جمعها في
الموقع المحدّد على "إحصاءات Google".
إذا كنت تستخدِم إحدى مكتبات عملاء Data API،
لست بحاجة إلى تغيير مسار عنوان URL للطلب. يقدّم معظم عملاء واجهة برمجة التطبيقات مَعلمة property
تتوقّع سلسلة بتنسيق properties/GA_PROPERTY_ID. اطّلِع على
دليل البدء السريع للحصول على أمثلة لاستخدام
مكتبات العملاء.
اسم جمهور صالح في حقل audience
، بالتنسيق properties/{propertyId}/audiences/{audienceId} يمكنك
استخدام الإجراء
audiences.list
في الإصدار 1 من Google Analytics Admin API للحصول على هذه القيمة. يحتوي حقل
Audience.name
في استجابة audiences.list على اسم شريحة الجمهور.
قائمة صالحة بالسمات في الحقل dimensions
يمكن العثور على قائمة السمات المتوافقة مع هذه الطريقة في مستندات
مخطّط تصدير شرائح الجمهور. لا يتم تضمين سوى
بيانات السمات المذكورة في هذا الحقل في عملية تصدير ملف تعريف الجمهور.
في ما يلي نموذج طلب لإنشاء عملية تصدير لشريحة جمهور:
يحتوي الردّ على الطريقة audienceExports.create على اسم عملية تصدير شرائح الجمهور
في الحقل name، على سبيل المثال properties/1234567/audienceExports/123.
في ما يلي نموذج للردّ:
تاريخ التعديل الأخير: 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\u003eGoogle Analytics Audiences allows you to segment users based on shared attributes, enabling targeted analysis and marketing efforts.\u003c/p\u003e\n"],["\u003cp\u003eYou can export audience data, including user snapshots, using the Data API, specifically the \u003ccode\u003eaudienceExports.create\u003c/code\u003e and \u003ccode\u003eaudienceExports.query\u003c/code\u003e methods.\u003c/p\u003e\n"],["\u003cp\u003eBefore querying, you should check the audience export's readiness state using the \u003ccode\u003eaudienceExports.get\u003c/code\u003e method to ensure data is available.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eaudienceExports.list\u003c/code\u003e method lets you view all your audience exports for a given property, while \u003ccode\u003eaudienceExports.query\u003c/code\u003e retrieves the actual user data.\u003c/p\u003e\n"]]],["Google Analytics audiences can be segmented and exported via the Data API. To export, first, call `audienceExports.create` with a valid audience name and dimensions. Then, use `audienceExports.get` to check the export's readiness (`CREATING` or `ACTIVE`). Once `ACTIVE`, retrieve users with `audienceExports.query` using the export's name. You can use `audienceExports.list` to view all exports and use the format `properties/GA_PROPERTY_ID` when specifying the property ID.\n"],null,["# Create an audience export\n\n[Audiences in Google Analytics](//support.google.com/analytics/answer/9267572)\nlet you segment your users in the ways that are important to your business. With\naudiences, you can group users of your site or application based on shared\nattributes.\n\nYou can export your audiences, including a snapshot of their users, using the\n[Data API](/analytics/devguides/reporting/data/v1/rest).\n\nRefer to the [Audience export data expectations](/analytics/devguides/reporting/data/v1/audience-export-expectations)\nguide for important information about the data you see in audience exports.\n\nOverview\n--------\n\nMake the following Data API requests to create and query an audience export:\n\n1. Call the [`audienceExports.create`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create) method to create an audience export.\n2. Call the [`audienceExports.query`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query) method is used to retrieve the users in the audience.\n\nFor more information, you can call\n[`audienceExports.get`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get) to\nretrieve configuration metadata about a specific audience export, and\n[`audienceExports.list`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list) to\nlist all your audience exports for a specific property.\n\nSelect a reporting entity\n-------------------------\n\nAll Data API methods require the [Google Analytics property\nidentifier](/analytics/devguides/reporting/data/v1/property-id) to be specified inside a URL request path, in the\nform of `properties/GA_PROPERTY_ID`. Here's an example: \n\n POST https://analyticsdata.googleapis.com/v1beta/properties/GA_PROPERTY_ID/audienceExports\n\nThe report is generated based on the Google Analytics event data collected in\nthe specified Google Analytics property.\n\nIf you're using one of the [Data API client libraries](/analytics/devguides/reporting/data/v1/client-libraries), you\ndon't need to change the request URL path. Most API clients provide a `property`\nparameter that expects a string in the form of `properties/GA_PROPERTY_ID`. See\n[Quick start guide](/analytics/devguides/reporting/data/v1/quickstart-client-libraries) for examples of using the\nclient libraries.\n\nCreate an audience export\n-------------------------\n\nTo create an audience export, call the [`audienceExports.create`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create) method using the\n[`AudienceExport`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports#AudienceExport)\nobject in your request. The following parameters are required:\n\n- A valid audience name in the [`audience`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports#AudienceExport.FIELDS.audience) field, formatted as `properties/{propertyId}/audiences/{audienceId}`. You can use the [`audiences.list`](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.audiences/list) method of the Google Analytics Admin API v1 to obtain this value. The [`Audience.name`](/analytics/devguides/config/admin/v1/rest/v1alpha/properties.audiences#Audience.FIELDS.name) field of the `audiences.list` response contains the audience name.\n- A valid list of dimensions in the [`dimensions`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports#AudienceExport.FIELDS.dimensions) field. The list of dimensions supported by this method can be found in the [Audience export schema](/analytics/devguides/reporting/data/v1/audience-export-api-schema) documentation. Only the data for dimensions mentioned in this field is included in an audience export.\n\nHere's a sample request to create an audience export: \n\n### HTTP Request\n\n POST https://analyticsdata.googleapis.com/v1beta/properties/1234567/audienceExports\n {\n \"audience\": \"properties/1234567/audiences/12345\",\n \"dimensions\": [\n {\n \"dimensionName\": \"deviceId\"\n }\n ]\n }\n\nA response of the `audienceExports.create` method contains the audience export's\nname in the `name` field, for example `properties/1234567/audienceExports/123`.\nHere's a sample response: \n\n### HTTP Response\n\n {\n \"response\": {\n \"@type\": \"type.googleapis.com/google.analytics.data.v1alpha.AudienceExport\",\n \"name\": \"properties/1234567/audienceExports/123\",\n \"audience\": \"properties/1234567/audiences/12345\",\n \"audienceDisplayName\": \"Purchasers\",\n \"dimensions\": [\n {\n \"dimensionName\": \"deviceId\"\n }\n ],\n \"state\": \"CREATING\",\n \"beginCreatingTime\": \"2023-06-22T23:35:28.787910949Z\"\n }\n }\n\nYou can use the `name` to query the users from the audience export.\n\nQuery the audience export's readiness state\n-------------------------------------------\n\nIt might take several minutes to generate the audience export after the\n[`audienceExports.create`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/create)\ncall.\n\nYou can check the readiness state of an audience export by calling the\n[`audienceExports.get`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/get) method.\n\nUse the audience export name from an `audienceExports.create` response to\nspecify the audience export in your request.\n\nHere's a sample request: \n\n### HTTP Request\n\n GET https://analyticsdata.googleapis.com/v1beta/properties/1234567/audienceExports/123\n\nThe readiness state for an audience export is returned in the [`state`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports#AudienceExport.FIELDS.state) field\nof the response. Once the audience export generation is complete, its state\nchanges from `CREATING` to `ACTIVE`.\n\nHere's a sample response: \n\n### HTTP Response\n\n {\n \"name\": \"properties/1234567/audienceExports/123\",\n \"audience\": \"properties/1234567/audiences/12345\",\n \"audienceDisplayName\": \"Purchasers\",\n \"dimensions\": [\n {\n \"dimensionName\": \"deviceId\"\n }\n ],\n \"state\": \"CREATING\",\n \"beginCreatingTime\": \"2023-06-22T23:35:28.787910949Z\"\n }\n\nYou can obtain the state of all audience exports by calling the\n[`audienceExports.list`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/list)\nmethod.\n\nRetrieve users from an audience export\n--------------------------------------\n\nOnce the audience export is generated, call the [`audienceExports.query`](/analytics/devguides/reporting/data/v1/rest/v1beta/properties.audienceExports/query) method, and specify the\naudience export's `name` in the request.\n\nHere's a sample request: \n\n### HTTP Request\n\n POST https://analyticsdata.googleapis.com/v1beta/properties/1234567/audienceExports/123:query\n\nIf the audience export is ready, this call returns the list of users in the\naudience.\n\nHere's a sample response: \n\n### HTTP Response\n\n {\n \"audienceExport\": {\n \"name\": \"properties/1234567/audienceExports/123\",\n \"audience\": \"properties/1234567/audiences/12345\",\n \"audienceDisplayName\": \"Purchasers\",\n \"dimensions\": [\n {\n \"dimensionName\": \"deviceId\"\n }\n ],\n \"state\": \"ACTIVE\",\n \"beginCreatingTime\": \"2023-06-22T23:35:28.787910949Z\"\n },\n \"audienceRows\": [\n {\n \"dimensionValues\": [\n {\n \"value\": \"1000276123.1681742376\"\n }\n ]\n },\n {\n \"dimensionValues\": [\n {\n \"value\": \"1000374452.1668627377\"\n }\n ]\n },\n {\n \"dimensionValues\": [\n {\n \"value\": \"1000391956.1652750758\"\n }\n ]\n },\n {\n \"dimensionValues\": [\n {\n \"value\": \"1000410539.1682018694\"\n }\n ]\n },\n {\n \"dimensionValues\": [\n {\n \"value\": \"1000703969.1666725875\"\n }\n ]\n }\n ],\n \"rowCount\": 5\n }"]]