העברה של הדוח 'המוצרים הכי נמכרים'

במאמר הזה מוסבר איך לעבור מהגרסה הישנה של הדוחות 'המוצרים הכי נמכרים' אל הגרסה החדשה. הגרסה הישנה יותר של הדוח שמייצאת את הטבלאות BestSellers_TopBrands_, BestSellers_TopProducts_ ו-BestSellers_TopProducts_Inventory_ תצא משימוש ב-1 בספטמבר 2025.

הדוח החדש 'המוצרים הכי נמכרים' כולל את הנתונים הבאים:

  • התאמה לגרסה הקודמת של הדוח ועקביות משופרת עם מוצרים דומים אחרים של Google – לדוגמה, השדות BestSellersBrandView ו-BestSellerProductClusterView מ-Content API for Shopping.

  • תובנות נוספות לגבי המוצרים הפופולריים ב-Google Merchant Center Analytics.

  • יכולת מילוי חוסרים מורחבת (2 שנים במקום 14 ימים).

טבלאות שמיוצאות מדוחות ישנים ומדוחות חדשים

בטבלה הבאה מוצגת השוואה בין הטבלאות שמיוצאות מהדוחות הישנים והחדשים:

דוח ישן דוח חדש
BestSellers_TopBrands BestSellersBrandWeekly וגם BestSellersBrandMonthly
BestSellers_TopProducts BestSellersProductClusterWeekly וגם BestSellersProductClusterMonthly
BestSellers_TopProducts_Inventory BestSellersEntityProductMapping

הדוח הישן מכיל צבירה אחת של נתוני המוצרים הכי נמכרים בחלון זמן לא מוגדר. הדוח החדש מספק את הצבירות השבועיות והחודשיות האחרונות של הנתונים האלה בזמן הבקשה.

השוואה בין BestSellers_TopBrands לבין BestSellersBrandWeekly וBestSellersBrandMonthly

הטבלה הבאה עוזרת לזהות שדות בטבלה BestSellers_TopBrands שיש להם תחליפים מקבילים בטבלאות BestSellersBrandWeekly ו-BestSellersBrandMonthly. אין תחליפים לחלק מהשדות מהטבלה הישנה.

BestSellers_TopBrands (ישן) BestSellersBrandWeekly ו-BestSellersBrandMonthly (חדש)
rank_timestamp _PARTITIONDATE וגם _PARTITIONTIME
brand brand
google_brand_id
ranking_category category_id
ranking_category_path.locale
ranking_category_path.name
ranking_country country_code
rank_id
rank rank
previous_rank previous_rank
relative_demand.bucket relative_demand
relative_demand.min
relative_demand.max
previous_relative_demand.bucket previous_relative_demand
previous_relative_demand.min
previous_relative_demand.max
relative_demand_change

השוואה בין BestSellers_TopProducts לבין BestSellersProductClusterWeekly וBestSellersProductClusterMonthly

הטבלה הבאה עוזרת לזהות שדות בטבלה BestSellers_TopProducts שיש להם תחליפים מקבילים בטבלאות BestSellersProductClusterWeekly ו-BestSellersProductClusterMonthly. אין תחליפים לחלק מהשדות מהטבלה הישנה.

BestSellers_TopProducts (ישן) BestSellersProductClusterWeekly ו-BestSellersProductClusterMonthly (חדש)
rank_timestamp _PARTITIONDATE וגם _PARTITIONTIME
rank_id entity_id
rank rank
previous_rank previous_rank
ranking_country country_code
ranking_category report_category_id
ranking_category_path.locale
ranking_category_path.name
relative_demand.bucket relative_demand
relative_demand.min
relative_demand.max
previous_relative_demand.bucket previous_relative_demand
previous_relative_demand.min
previous_relative_demand.max
relative_demand_change
product_title.locale
product_title.name title (כותרת יחידה במקום מערך לכל לוקאל)
gtins variant_gtins
google_brand_id
brand brand
google_product_category
category_l1, category_l2, category_l3, category_l4, category_l5
google_product_category_path.locale
google_product_category_path.name
price_range.min price_range.min_amount_micros
price_range.max price_range.max_amount_micros
price_range.currency price_range.currency_code
product_inventory_status
brand_inventory_status

מיפוי מלאי של נתוני המוצרים הכי נמכרים

בדוח הישן של המוצרים הכי נמכרים, נתוני המוצרים הכי נמכרים ממופים לנתוני המלאי של המוכר בטבלה חדשה שנוצרת, באמצעות העמודה rank_id מהטבלה TopProducts.

בדוח החדש 'המוצרים הכי נמכרים', העמודה entity_id מיוצאת בטבלאות BestSellersProductCluster, והיא ממופה לכל מזהי המוצרים מהמלאי של המוכר בטבלה BestSellersEntityProductMapping.

BestSellers_TopProductsInventory (ישן) BestSellersEntityProductMapping (חדש)
rank_id (נמצא ב-BestSellers_TopProducts) entity_id (נמצא בטבלאות BestSellersProductClustersWeekly ו-BestSellersProductClustersMonthly)
product_id product_id
merchant_id
aggregator_id

שאילתות לדוגמה

בקטע הזה מודגשים שינויים בדוגמאות לשאילתות שמשמשות לאחזור נתונים של המוצרים הכי נמכרים.

דוגמה 1: שליפת המוצרים המובילים בקטגוריה ובמדינה מסוימות

השאילתות הבאות מחזירות את המוצרים המובילים בקטגוריה ובמדינה מסוימות.

שימוש בטבלת BestSellers_TopProducts (ישנה)

SELECT
  rank,
  previous_rank,
  relative_demand.bucket,
  (SELECT name FROM top_products.product_title WHERE locale = 'en-US') AS product_title,
  brand,
  price_range,
  google_product_category
FROM
  `DATASET.BestSellers_TopProducts_MERCHANT_ID` AS top_products
WHERE
  _PARTITIONDATE = 'DATE' AND
  ranking_category = 267 /*Smartphones*/ AND
  ranking_country = 'US'
ORDER BY
  rank;

שימוש בטבלה BestSellersProductClusterWeekly או BestSellersProductClusterMonthly (חדשה)

SELECT
  rank,
  previous_rank,
  relative_demand,
  title AS product_title,
  brand,
  price_range,
  category_l1,
  category_l2
FROM
  `DATASET.BestSellersProductClusterWeekly_MERCHANT_ID` AS top_products
WHERE
  _PARTITIONDATE = 'DATE' AND
  report_category_id = 267 /*Smartphones*/ AND
  country_code = 'US'
ORDER BY
  rank;

דוגמה 2: שליפת המוצרים המובילים במלאי

השאילתות הבאות מחזירות רשימה של המוצרים המובילים במלאי.

שימוש בטבלת BestSellers_TopProducts (ישנה)

WITH latest_top_products AS
(
  SELECT
    *
  FROM
    `DATASET.BestSellers_TopProducts_MERCHANT_ID`
  WHERE
    _PARTITIONDATE = 'DATE'
),
latest_top_products_inventory AS
(
  SELECT
    *
  FROM
    `DATASET.BestSellers_TopProducts_Inventory_MERCHANT_ID`
  WHERE
    _PARTITIONDATE = 'DATE'
)
SELECT
  top_products.rank,
  inventory.product_id,
  (SELECT ANY_VALUE(name) FROM top_products.product_title) AS product_title,
  top_products.brand,
  top_products.gtins
FROM
  latest_top_products AS top_products
INNER JOIN
  latest_top_products_inventory AS inventory
USING (rank_id);

שימוש בטבלה BestSellersProductClusterWeekly או BestSellersProductClusterMonthly (חדשה)

WITH latest_top_products AS
(
  SELECT
    *
  FROM
    `DATASET.BestSellersProductClusterWeekly_MERCHANT_ID`
  WHERE
    _PARTITIONDATE = 'DATE'
),
latest_top_products_inventory AS
(
  SELECT
    *
  FROM
    `DATASET.BestSellersEntityProductMapping_MERCHANT_ID`
  WHERE
    _PARTITIONDATE = 'DATE'
)
SELECT
  top_products.rank,
  inventory.product_id,
  top_products.title AS product_title,
  top_products.brand,
  top_products.variant_gtins
FROM
  latest_top_products AS top_products
INNER JOIN
  latest_top_products_inventory AS inventory
USING (entity_id);

בנוסף, אם אתם רוצים לגלות כמה מוצרים או מותגים הכי נמכרים יש במלאי שלכם, אתם יכולים להריץ שאילתה בטבלאות BestSellerProductClusterWeekly או BestSellerProductClusterMonthly באמצעות העמודות product_inventory_status או brand_inventory_status. לדוגמה, השאילתה הבאה:

SELECT
  *
FROM
  `DATASET.BestSellersProductClusterMonthly_MERCHANT_ID`
WHERE
  _PARTITIONDATE = 'DATE' AND
  product_inventory_status != 'NOT_IN_INVENTORY'
ORDER BY
  rank;

דוגמה 3: שליפת המותגים המובילים בקטגוריה ובמדינה מסוימות

השאילתות הבאות מחזירות רשימה של מותגים מובילים בקטגוריה ובמדינה מסוימות.

שימוש בטבלת BestSellers_TopBrands (ישנה)

SELECT
  rank,
  previous_rank,
  brand
FROM
  `DATASET.BestSellers_TopBrands_MERCHANT_ID`
WHERE
  _PARTITIONDATE = 'DATE' AND
  ranking_category = 267 /*Smartphones*/ AND
  ranking_country = 'US'
ORDER BY
  rank;

שימוש בטבלה BestSellersTopBrandsWeekly או BestSellersTopBrandsMonthly (חדשה)

SELECT
  rank,
  previous_rank,
  brand
FROM
  `DATASET.BestSellersTopBrandsWeekly_MERCHANT_ID`
WHERE
  _PARTITIONDATE = 'DATE' AND
  report_category_id = 267 /*Smartphones*/ AND
  country_code = 'US'
ORDER BY
  rank;

דוגמה 4: שליפת מוצרים של מותגים מובילים במלאי

השאילתות הבאות מחזירות רשימה של מוצרים של מותגים מובילים במלאי שלכם.

שימוש בטבלת BestSellers_TopBrands (ישנה)

WITH latest_top_brands AS
  (
    SELECT
      *
    FROM
      `DATASET.BestSellers_TopBrands_MERCHANT_ID`
    WHERE
      _PARTITIONDATE = 'DATE'
  ),
  latest_products AS
  (
    SELECT
      product.*,
      product_category_id
    FROM
      `DATASET.Products_MERCHANT_ID` AS product,
      UNNEST(product.google_product_category_ids) AS product_category_id,
      UNNEST(destinations) AS destination,
      UNNEST(destination.approved_countries) AS approved_country
    WHERE
      _PARTITIONDATE = 'DATE'
  )
SELECT
  top_brands.brand,
  (SELECT name FROM top_brands.ranking_category_path
  WHERE locale = 'en-US') AS ranking_category,
  top_brands.ranking_country,
  top_brands.rank,
  products.product_id,
  products.title
FROM
  latest_top_brands AS top_brands
INNER JOIN
  latest_products AS products
ON top_brands.google_brand_id = products.google_brand_id AND
   top_brands.ranking_category = product_category_id AND
   top_brands.ranking_country = products.approved_country;

שימוש בטבלה BestSellersTopBrandsWeekly או BestSellersTopBrandsMonthly (חדשה)

WITH latest_top_brands AS
  (
    SELECT
      *
    FROM
      `DATASET.BestSellersBrandMonthly_MERCHANT_ID`
    WHERE
      _PARTITIONDATE = 'DATE'
  ),
  latest_products AS
  (
    SELECT
      product.*,
      product_category_id
    FROM
      `DATASET.Products_MERCHANT_ID` AS product,
      UNNEST(product.google_product_category_ids) AS product_category_id,
      UNNEST(destinations) AS destination,
      UNNEST(destination.approved_countries) AS approved_country
    WHERE
      _PARTITIONDATE = 'DATE'
  )
SELECT
  top_brands.brand,
  - The full category name is not supported in the new BestSellersTopBrands tables.
  - (SELECT name FROM top_brands.ranking_category_path
  - WHERE locale = 'en-US') AS ranking_category,
  top_brands.category_id,
  top_brands.rank,
  products.product_id,
  products.title
FROM
  latest_top_brands AS top_brands
INNER JOIN
  latest_products AS products
ON top_brands.brand = products.brand AND
   top_brands.category_id = product_category_id AND
   top_brands.country_code = products.approved_country;

בשאילתות האלה, מחליפים את מה שכתוב בשדות הבאים:

  • DATASET: השם של מערך הנתונים
  • MERCHANT_ID: מזהה חשבון המוכר
  • DATE: התאריך בפורמט YYYY-MM-DD

המאמרים הבאים