تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يمكن تنفيذ التقسيم، المتاح في التقارير المخصّصة في Merchant Center، في Reporting API من خلال إضافة الحقل المناسب إلى طلب بحث. على سبيل المثال، يؤدي طلب البحث عن segments.program إلى إنشاء تقرير يتضمّن صفًا لكل برنامج (إعلانات Shopping، وبيانات المنتجات المجانية، وما إلى ذلك) يتضمّن المقاييس (مرات الظهور، والنقرات، وما إلى ذلك) الخاصة بهذا البرنامج كما هو محدّد في عبارة SELECT.
كما هو الحال مع التقارير المخصّصة في Merchant Center، يمكنك تحديد شرائح متعدّدة في طلب البحث نفسه باستخدام Reporting API.
يستردّ نموذج الاستعلام التالي عدد النقرات لجميع المنتجات في حسابك
خلال فترة 30 يومًا، مقسَّمة حسب program وoffer_id:
انقر على تنفيذ لتجربة العيّنة في مستكشف واجهات برمجة التطبيقات. بعد النقر على تنفيذ، عدِّل عنصر نائب معرّف التاجر إلى معرّف التاجر الخاص بك في عنوان URL للطلب. يمكنك تعديل طلب البحث. يجب أن يبقى الاستعلام الكامل على سطر واحد لكي يعمل مع مستكشف واجهة برمجة التطبيقات.
النتائج التي يتم الحصول عليها من إرسال طلب البحث هذا إلى reports.search هي صف يحدّد عدد النقرات لكل مجموعة من offer_id وprogram، كما هو موضّح في نموذج سلسلة JSON التالي:
تتيح "لغة طلبات البحث في Merchant Center" تقسيم المقاييس حسب مجموعتَين من السمات التي يمكنك تحديدها لتنظيم مستودعك:
مستويات الفئات (segments.category_l1 وsegments.category_l2 وما إلى ذلك)
فئات من
تصنيف المنتجات من Google
قد تحدّد Google تلقائيًا فئة لمنتجك إذا لم يتم تقديم أي فئة، أو قد تحسّن الفئة المقدَّمة.
مستويات نوع المنتج (segments.product_type_l1 وsegments.product_type_l2 وما إلى ذلك)
أنواع المنتجات التي
تحدّدها استنادًا إلى تصنيفك
على عكس مستويات الفئات، لا تتوفّر مجموعة محدّدة مسبقًا من القيم المسموح بها.
يتم تنظيم كلّ من سماتَي الفئة ونوع المنتج في تدرّج هرمي يتضمّن مستويات متعدّدة. تفصل مواصفات المنتج بين كل مستوى باستخدام الرمز >، ولكن يمكنك اختيار كل مستوى من التسلسل الهرمي بشكل منفصل في التقارير.
على سبيل المثال، لنفترض أنّ لديك منتجًا يتضمّن مستويات أنواع المنتجات التالية:
ستعرض التقارير كل مستوى في حقل خاص به، على النحو التالي:
تقسيم
القيمة
segments.product_type_l1
Home & Garden
segments.product_type_l2
Kitchen & Dining
segments.product_type_l3
Kitchen Appliances
segments.product_type_l4
Refrigerators
مقاييس العملة والسعر
يشير الحقل segments.currency_code في ReportRow إلى العملة التي يتم عرض مقاييس الأسعار بها، مثل metrics.conversion_value_micros.
بما أنّ هذا الإجراء مهم من أجل تفسير هذه المقاييس بشكل صحيح، سيشمل الرمز ReportRow الذي يتم عرضه تلقائيًا الرمز segments.currency_code كلّما اخترت أحد مقاييس الأسعار أدناه.
metrics.conversion_value_micros
metrics.aov_micros
metrics.ordered_item_sales_micros
metrics.returns_micros
metrics.shipped_item_sales_micros
مقاييس "الشراء على Google"
تتيح Merchant Center Query Language فئتَين من المقاييس لطلبات "الشراء على Google": مقاييس على مستوى السلعة ومقاييس على مستوى الطلب.
المقاييس على مستوى المنتج أو الخدمة
مقاييس يتم احتسابها استنادًا إلى السلع ضمن الطلبات، ومرتبطة بسمات المنتجات في كل طلب
metrics.item_days_to_ship
metrics.item_fill_rate
metrics.ordered_items
metrics.ordered_item_sales_micros
metrics.rejected_items
metrics.returned_items
metrics.return_rate
metrics.returns_micros
metrics.shipped_items
metrics.shipped_item_sales_micros
metrics.unshipped_items
المقاييس على مستوى الطلب
مقاييس يتم احتسابها على أساس كل طلب.
metrics.aos
metrics.aov_micros
metrics.days_to_ship
metrics.orders
metrics.shipped_orders
metrics.unshipped_orders
لا ترتبط المقاييس على مستوى الطلب بسمات المنتجات في كل طلب.
يمكنك اختيار مقاييس على مستوى المنتج أو الخدمة مع أي شريحة متاحة.
ومع ذلك، سيؤدي اختيار مقاييس على مستوى الطلب مع أيّ من شرائح سمات المنتج التالية إلى حدوث خطأ:
تاريخ التعديل الأخير: 2025-08-13 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-08-13 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe Merchant API is the new version of the Content API for Shopping and offers improved integration capabilities.\u003c/p\u003e\n"],["\u003cp\u003eUse the Reporting API to segment your product data by attributes such as program, offer ID, category, and product type, allowing for granular performance analysis.\u003c/p\u003e\n"],["\u003cp\u003eCurrency and price metrics are automatically included in reports to ensure accurate interpretation of financial data.\u003c/p\u003e\n"],["\u003cp\u003eBuy on Google metrics are no longer supported and return 0 values.\u003c/p\u003e\n"],["\u003cp\u003eItem-level Buy on Google metrics can be segmented by any available segment, while order-level metrics have restrictions with certain product dimensions.\u003c/p\u003e\n"]]],["The Merchant API's beta version is introduced, replacing the Content API for Shopping. The Reporting API allows segmentation of custom reports by adding fields to a query, such as `segments.program`. A sample query retrieves clicks segmented by `program` and `offer_id`. Product attributes can be categorized using Google's taxonomy (`segments.category_l1`, etc.) or custom types (`segments.product_type_l1`, etc.). Price metrics utilize `segments.currency_code`. Buy on Google metrics are deprecated. The documentation provides a full list of segments.\n"],null,["# Segmentation, available in Merchant Center\n[custom reports](//support.google.com/merchants/answer/9967959), can be\nimplemented in the Reporting API by adding the appropriate field to a query. For\nexample, querying for `segments.program` results in a report with a row for each\nprogram (Shopping Ads, Free product listings, etc.) that includes the metrics\n(impressions, clicks, etc.) for that program as specified in the `SELECT`\nclause.\n\nAs with custom reports in the Merchant Center, you can specify multiple segments\nin the same query with the Reporting API.\n\nThe following sample query retrieves the clicks for all products in your account\nduring a 30-day period, segmented by `program` and `offer_id`: \n\n SELECT\n segments.program,\n segments.offer_id,\n metrics.clicks\n FROM MerchantPerformanceView\n WHERE segments.date BETWEEN '2020-11-01' AND '2020-11-30'\n\n[Run](https://developers.google.com/shopping-content/reference/rest/v2.1/reports/search?apix=true&apix_params=%7B%22merchantId%22%3A0%2C%22resource%22%3A%7B%22query%22%3A%22SELECT%20%20segments.program%2C%20%20segments.offer_id%2C%20%20metrics.clicks%20FROM%20MerchantPerformanceView%20WHERE%20segments.date%20BETWEEN%20%272020-11-01%27%20AND%20%272020-11-30%27%22%7D%7D)\n\nClick **Run** to try the sample in the **API Explorer** . After you click\n**Run** , update the merchant ID placeholder to your own merchant ID in the\nrequest URL. You can modify the query. The full query must remain on one line to\nwork with the **API explorer**.\n\nThe results from sending this query to `reports.search` is a row specifying the\nclicks for each combination of `offer_id` and `program`, like in this sample\nJSON string: \n\n {\n \"results\": [\n {\n \"segments\": {\n \"program\": \"SHOPPING_ADS\",\n \"offerId\": \"12345\"\n },\n \"metrics\": {\n \"clicks\": \"38\"\n }\n },\n {\n \"segments\": {\n \"program\": \"SHOPPING_ADS\",\n \"offerId\": \"12346\"\n },\n \"metrics\": {\n \"clicks\": \"125\"\n }\n },\n {\n \"segments\": {\n \"program\": \"FREE_PRODUCT_LISTING\",\n \"offerId\": \"12346\"\n },\n \"metrics\": {\n \"clicks\": \"23\"\n }\n },\n {\n \"segments\": {\n \"program\": \"SHOPPING_ADS\",\n \"offerId\": \"12347\"\n },\n \"metrics\": {\n \"clicks\": \"8\"\n }\n },\n {\n \"segments\": {\n \"program\": \"FREE_PRODUCT_LISTING\",\n \"offerId\": \"12347\"\n },\n \"metrics\": {\n \"clicks\": \"3\"\n }\n }\n ]\n }\n\n| **Caution:** Keep in mind that the number of rows can increase exponentially for each additional segment field included in your report query.\n\nCategory and product type\n-------------------------\n\nThe Merchant Center Query Language supports segmenting metrics by two groups of\nattributes that you can define to organize your inventory:\n\nCategory levels (`segments.category_l1`, `segments.category_l2`, etc.)\n: Categories from\n [Google's product taxonomy](//support.google.com/merchants/answer/6324436).\n Google might auto-assign the category to your product if none was provided, or\n further refine the provided category.\n\nProduct type levels (`segments.product_type_l1`, `segments.product_type_l2`, etc.)\n: Product types that\n [you assign based on your categorization](//support.google.com/merchants/answer/6324406).\n Unlike the category levels, there is no predefined set of supported values.\n\nBoth the category and product type attributes are organized in a hierarchy with\nmultiple levels. The\n[product specification](//support.google.com/merchants/answer/7052112) separates\neach level with the `\u003e` character, but you select each level of the hierarchy\nseparately in reports.\n\nFor example, consider a product with the following product type levels: \n\n Home & Garden \u003e Kitchen & Dining \u003e Kitchen Appliances \u003e Refrigerators\n\nReports will return each level in its own field, as follows:\n\n| Segment | Value |\n|----------------------------|----------------------|\n| `segments.product_type_l1` | `Home & Garden` |\n| `segments.product_type_l2` | `Kitchen & Dining` |\n| `segments.product_type_l3` | `Kitchen Appliances` |\n| `segments.product_type_l4` | `Refrigerators` |\n\nCurrency and price metrics\n--------------------------\n\nThe `segments.currency_code` field of a `ReportRow` indicates the currency in\nwhich price metrics such as `metrics.conversion_value_micros` are returned.\nSince this is important in order to properly interpret these metrics, the\nreturned `ReportRow` will automatically include `segments.currency_code`\nwhenever you select one of the price metrics below.\n\n- `metrics.conversion_value_micros`\n\n| **Deprecated:** The following fields are no longer supported.\n\n- `metrics.aov_micros`\n- `metrics.ordered_item_sales_micros`\n- `metrics.returns_micros`\n- `metrics.shipped_item_sales_micros`\n\n| **Note:** You might still want to explicitly include `segments.currency_code` in your query for clarity and consistency between your `SELECT` clause and each `ReportRow` in the response.\n\nBuy on Google metrics\n---------------------\n\n| **Deprecated:** Buy on Google metrics are no longer supported and retrieving them returns 0 starting from May 2024 (including historical values for past dates).\n\nThe Merchant Center Query Language supports two categories of metrics for Buy on\nGoogle orders: item-level metrics and order-level metrics.\n\nitem-level metrics\n\n: Metrics calculated based on the items within orders, and associated with the\n product dimensions of the items in each order.\n\n - `metrics.item_days_to_ship`\n - `metrics.item_fill_rate`\n - `metrics.ordered_items`\n - `metrics.ordered_item_sales_micros`\n - `metrics.rejected_items`\n - `metrics.returned_items`\n - `metrics.return_rate`\n - `metrics.returns_micros`\n - `metrics.shipped_items`\n - `metrics.shipped_item_sales_micros`\n - `metrics.unshipped_items`\n\norder-level metrics\n\n: Metrics calculated on a per-order basis.\n\n - `metrics.aos`\n - `metrics.aov_micros`\n - `metrics.days_to_ship`\n - `metrics.orders`\n - `metrics.shipped_orders`\n - `metrics.unshipped_orders`\n\n: Order-level metrics are *not* associated with the product dimensions of the\n items in each order.\n\nYou can select item-level metrics in combination with any available segment.\nHowever, selecting order-level metrics in combination with any of the following\nproduct dimension segments will fail:\n\n- `segments.brand`\n- `segments.category_l1`, `segments.category_l2`, `segments.category_l3`, `segments.category_l4`, `segments.category_l5`\n- `segments.custom_label1`, `segments.custom_label2`, `segments.custom_label3`, `segments.custom_label4`, `segments.custom_label5`\n- `segments.offer_id`\n- `segments.product_type_l1`, `segments.product_type_l2`, `segments.product_type_l3`, `segments.product_type_l4`, `segments.product_type_l5`\n- `segments.title`\n\nFind out more\n-------------\n\nFor a complete list of segments, check out the\n[documentation](/shopping-content/reference/rest/v2.1/reports/search#segments)."]]