从 Content API for Shopping 迁移报告

您可以使用 Merchant Reports API,通过其提供的数据视图了解您的商品、商品效果以及商品在 Google 上的竞争环境。

您可以使用 Merchant Reports API 执行以下操作:

  • 衡量商品的效果: 在 Merchant API 中,MerchantPerformanceView 现在是 product_performance_view
  • 按特定字段过滤商品: 借助 Merchant API,您可以根据除 item_issues之外的所有可用字段进行过滤。
  • 改进商品定价: 借助 Merchant API,金额微单位字段和币种字段会合并为一个字段 ,类型为 Price
  • 了解市场: 借助 Merchant API,您可以获取有关畅销商品和品牌、 竞争性价位、促销价建议以及 您所在行业竞争格局的数据。
  • 探索竞争格局: 您可以获取报告,了解您在商品 类别层面面临的竞争格局,并采取相应行动来提高您的曝光度。

您可以按以下方式将 Merchant Reports API 与现有的 Content API for Shopping 实现方案集成。

请求

Merchant Reports API 的请求网址格式如下:

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

下面是 Content API for Shopping 与 Merchant Reports API 的 search 请求的示例比较:

Content API Merchant API
网址 https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/reports/search https://merchantapi.googleapis.com/reports/v1/{PARENT}/reports:search
标识符 {MERCHANT_ID} {PARENT}

方法

您可以通过调用 ReportService.Search 方法来查询 Merchant Reports API。

视图

在 Merchant API 中,表名称从 CamelCase 更改为 snake_case

MerchantPerformanceView 现在是 product_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:字符串 marketing_method:字符串 program 部分已替换为新的 marketing_method 字段。如需了解详情,请参阅新的marketing method
metrics.ctr:双精度浮点数 clickThroughRate:双精度浮点数 ctr 指标已重命名为 clickThroughRate
metrics.conversionValueMicros:整数
segments.currencyCode:字符串
conversionValue: {
object (Price)
}
金额微单位字段和币种字段会合并为一个 Price 类型的字段
metrics.orders,
metrics.orderedItems,
不支持 Merchant Reports API 不支持 Google 易购指标

新的营销方式值

下面是 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:字符串 id:字符串 字段格式从 channel:language:targetCountry:offerId 更改为
channel~language~feedLabel~offerId
productView.priceMicros:整数
productView.currencyCode:字符串
price: {
object (Price)
}
金额微单位字段和币种字段会合并为一个 Price 类型的字段
productView.aggregated_destination_status:字符串 aggregated_reporting_context_status:字符串 aggregated_destination_status 字段已重命名为 aggregated_reporting_context_status,值未更改
productView.item_issues: [
{
object (ItemIssue)
}
]
item_issues: [
{
object (ItemIssue)
}
]
ItemIssue 定义已更改
不支持 feedLabel:字符串 引入了 feedLabel 字段

价格分析

下面是 Merchant Reports API 中价格分析视图的变化:

Content API Merchant API 说明
productView.id:字符串 id:字符串 字段格式从 channel:language:targetCountry:offerId 更改为 channel~language~feedLabel~offerId
productView.priceMicros:整数
productView.currencyCode:字符串
price: {
object (Price)
}
金额微单位字段和币种字段会合并为一个 Price 类型的字段
priceInsights.suggestedPriceMicros:整数
priceInsights.suggestedPriceCurrencyCode:字符串
suggestedPrice: {
object (Price)
}
金额微单位字段和币种字段会合并为一个 Price 类型的字段
priceInsights.predictedGrossProfitChangeFraction:双精度浮点数
priceInsights.predictedMonthlyGrossProfitChangeMicros:整数
priceInsights.predictedMonthlyGrossProfitChangeCurrencyCode:字符串
不支持 Merchant Reports API 不支持与毛利润变化相关的字段

价格竞争力

下面是 Merchant Reports API 中价格竞争力视图的变化:

Content API Merchant API 说明
productView.id:字符串 id:字符串 字段格式从 channel:language:targetCountry:offerId 更改为 channel~language~feedLabel~offerId
productView.priceMicros:整数
productView.currencyCode:字符串
price: {
object (Price)
}
金额微单位字段和币种字段会合并为一个 Price 类型的字段
priceCompetitiveness.countryCode:字符串 reportCountryCode:字符串 countryCode 字段已重命名为 reportCountryCode
priceCompetitiveness.benchmarkPriceMicros:整数
priceCompetitiveness.benchmarkPriceCurrencyCode:字符串
benchmarkPrice: {
object (Price)
}
金额微单位字段和币种字段会合并为一个 Price 类型的字段

畅销商品

下面是 Merchant Reports API 中畅销商品视图的变化:

Content API Merchant API 说明
bestSellers.countryCode:字符串 reportCountryCode:字符串 countryCode 字段已重命名为 reportCountryCode
bestSellers.categoryId:整数 reportCategoryId:整数 categoryId 字段已重命名为 reportCategoryId

竞争对手的曝光度

下面是 Merchant Reports API 中竞争对手的曝光度视图的变化:

Content API Merchant API 说明
competitiveVisibility.countryCode:字符串 reportCountryCode:字符串 countryCode 字段已重命名为 reportCountryCode
competitiveVisibility.categoryId:整数 reportCategoryId:整数 categoryId 字段已重命名为 reportCategoryId