ベストセラー レポートを移行する
このドキュメントは、以前のバージョンのベストセラー レポートから新しいバージョンに移行する際に役立ちます。BestSellers_TopBrands_
、BestSellers_TopProducts_
、BestSellers_TopProducts_Inventory_
テーブルをエクスポートする古いバージョンのレポートは、2025 年 9 月 1 日に非推奨になります。
新しいベストセラー レポートでは、次のことができます。
以前のバージョンのレポートとの整合性を確保しつつ、他の類似の Google サービス(Content API for Shopping の BestSellersBrandView フィールドや BestSellerProductClusterView フィールドなど)との整合性を高める。
Google Merchant Center アナリティクスで人気商品に関する追加の分析情報を確認する。
バックフィル機能の拡張(14 日間から 2 年間へ)。
古いレポートと新しいレポートでエクスポートされたテーブル
次の表は、新旧のレポートによってエクスポートされるテーブルを比較したものです。
古いレポート | 新しいレポート |
---|---|
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 |
ベストセラー データの在庫マッピング
以前のベストセラー レポートでは、TopProducts
テーブルの rank_id
列を使用して、ベストセラー データが新しく生成されたテーブルの販売者の在庫データにマッピングされていました。
新しいベストセラー レポートでは、entity_id
列が BestSellersProductCluster
テーブルにエクスポートされます。この列は、BestSellersEntityProductMapping
テーブルの販売者の在庫にあるすべての商品 ID にマッピングされます。
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);
また、在庫内のベストセラー商品やブランドの数を確認するには、product_inventory_status
列または brand_inventory_status
列を使用して BestSellerProductClusterWeekly
テーブルまたは BestSellerProductClusterMonthly
テーブルに対してクエリを実行します。次のクエリの例をご覧ください。
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
: 販売アカウント IDDATE
:YYYY-MM-DD
形式の日付
次のステップ
- 新しいベストセラー レポートの詳細については、Google Merchant Center のベストセラー テーブルをご覧ください。