Content API for Shopping からレポートを移行する

Merchant Reports API を使用すると、提供されるデータビューを通じて、Google 上での商品のパフォーマンスや競合環境について把握できます。

Merchant Reports API を使用すると、次のことができます。

Merchant Reports API を既存の Content API for Shopping 実装と統合する方法は次のとおりです。

リクエスト

Merchant Reports API には、次のリクエスト URL 形式を使用します。

POST https://merchantapi.googleapis.com/reports/v1/{PARENT}/reports:search

Content API for Shopping と Merchant Reports API の search リクエストの比較例を次に示します。

Content API Merchant API
URL https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/reports/search https://merchantapi.googleapis.com/reports/v1/{PARENT}/reports:search
識別子 {MERCHANT_ID} {PARENT}

メソッド

Merchant Reports API をクエリするには、 ReportService.Search メソッドを呼び出します。

視聴回数

Merchant API では、テーブル名が CamelCase から snake_case に変更されます。

MerchantPerformanceViewproduct_performance_view になりました。

Content API for Shopping と Merchant API のテーブル名のマッピングを次に示します。

Content API Merchant API
MerchantPerformanceView product_performance_view
ProductView product_view
PriceCompetitivenesProductView price_competitiveness_product_view
PriceInsightsProductView price_insights_product_view
BestSellersBrandView best_sellers_brand_view
BestSellersProductClusterView best_sellers_product_cluster_view
CompetitiveVisibilityCompetitorView competitive_visibility_competitor_view
CompetitiveVisibilityTopMerchantView competitive_visibility_top_merchant_view
CompetitiveVisibilityBenchmarkView competitive_visibility_benchmark_view

Merchant API では、segments.offer_id などのフィールド接頭辞を指定する必要がなくなりました。代わりに、フィールド名 offer_id を使用します。

Content API for Shopping と Merchant API のクエリの比較例を次に示します。

Content API Merchant API
   SELECT
     segments.offer_id,
     metrics.clicks
   FROM MerchantPerformanceView
   WHERE segments.date DURING LAST_7_DAYS
   
   SELECT
     offer_id,
     clicks
   FROM product_performance_view
   WHERE date DURING LAST_7_DAYS
   

レスポンスの例を次に示します。

Content API Merchant API
{
  "segments":{
    "offerId":"abc"
  },
  "metrics":{
    "clicks":"123"
  }
}
{
  "productPerformanceView" : {
    "offerId": "abc",
    "clicks": "123"
  }
}

テーブル名をフィールド接頭辞として使用できます。たとえば、Merchant API クエリでは、offer_idproduct_performance_view.offer_id の両方が受け入れられます。

パフォーマンス

Merchant Reports API のパフォーマンス ビューの変更点は次のとおりです。

Content API Merchant API 説明
segments.program: string marketing_method: string program セグメントが新しい marketing_method フィールドに置き換えられました。詳しくは、新しい marketing method の値をご覧ください。
metrics.ctr: double clickThroughRate: double ctr 指標の名前が clickThroughRate に変更されました。
metrics.conversionValueMicros: integer
segments.currencyCode: string
conversionValue: {
object (Price)
}
金額マイクロ秒と通貨のフィールドが Price タイプの 1 つのフィールドに統合されます。
metrics.orders,
metrics.orderedItems,
サポート対象外 「Google で購入」の指標は Merchant Reports API ではサポートされていません。

新しいマーケティング方法の値

segments.programmarketing_method の値のマッピングを次に示します。

Content API Merchant API
SHOPPING_ADS ADS
FREE_PRODUCT_LISTING ORGANIC
FREE_LOCAL_PRODUCT_LISTING ORGANIC
BUY_ON_GOOGLE_LISTING サポート対象外

プロダクト

Merchant Reports API の商品ビューの変更点は次のとおりです。

Content API Merchant API 説明
productView.id: string id: string フィールド形式が channel:language:targetCountry:offerId から
channel~language~feedLabel~offerId に変更されます。
productView.priceMicros: integer
productView.currencyCode: string
price: {
object (Price)
}
金額マイクロ秒と通貨のフィールドが Price タイプの 1 つのフィールドに統合されます。
productView.aggregated_destination_status: string aggregated_reporting_context_status: string aggregated_destination_status フィールドの名前が aggregated_reporting_context_status に変更されました。値は変更されていません。
productView.item_issues: [
{
object (ItemIssue)
}
]
item_issues: [
{
object (ItemIssue)
}
]
ItemIssue の定義が変更されました。
サポート対象外 feedLabel: string feedLabel フィールドが導入されました。

料金の詳細

Merchant Reports API の料金の検討ビューの変更点は次のとおりです。

Content API Merchant API 説明
productView.id: string id: string フィールド形式が channel:language:targetCountry:offerId から channel~language~feedLabel~offerId に変更されます。
productView.priceMicros: integer
productView.currencyCode: string
price: {
object (Price)
}
金額マイクロ秒と通貨のフィールドが Price タイプの 1 つのフィールドに統合されます。
priceInsights.suggestedPriceMicros: integer
priceInsights.suggestedPriceCurrencyCode: string
suggestedPrice: {
object (Price)
}
金額マイクロ秒と通貨のフィールドが Price タイプの 1 つのフィールドに統合されます。
priceInsights.predictedGrossProfitChangeFraction: double
priceInsights.predictedMonthlyGrossProfitChangeMicros: integer
priceInsights.predictedMonthlyGrossProfitChangeCurrencyCode: string
サポート対象外 粗利益の変動に関連するフィールドは Merchant Reports API ではサポートされていません。

価格競争力

Merchant Reports API の価格競争力ビューの変更点は次のとおりです。

Content API Merchant API 説明
productView.id: string id: string フィールド形式が channel:language:targetCountry:offerId から channel~language~feedLabel~offerId に変更されます。
productView.priceMicros: integer
productView.currencyCode: string
price: {
object (Price)
}
金額マイクロ秒と通貨のフィールドが Price タイプの 1 つのフィールドに統合されます。
priceCompetitiveness.countryCode: string reportCountryCode: string countryCode フィールドの名前が reportCountryCode に変更されました。
priceCompetitiveness.benchmarkPriceMicros: integer
priceCompetitiveness.benchmarkPriceCurrencyCode: string
benchmarkPrice: {
object (Price)
}
金額マイクロ秒と通貨のフィールドが Price タイプの 1 つのフィールドに統合されます。

ベストセラー

Merchant Reports API のベストセラー ビューの変更点は次のとおりです。

Content API Merchant API 説明
bestSellers.countryCode: string reportCountryCode: string countryCode フィールドの名前が reportCountryCode に変更されました。
bestSellers.categoryId: int reportCategoryId: int categoryId フィールドの名前が reportCategoryId に変更されました。

競合視認性

Merchant Reports API の競合視認性ビューの変更点は次のとおりです。

Content API Merchant API 説明
competitiveVisibility.countryCode: string reportCountryCode: string countryCode フィールドの名前が reportCountryCode に変更されました。
competitiveVisibility.categoryId: integer reportCategoryId: integer categoryId フィールドの名前が reportCategoryId に変更されました。