從 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,你可以取得暢銷產品和品牌、 具競爭力的價格點、建議的特價價格,以及所屬產業的 競爭情況資訊。
  • 掌握競爭情況: 你可以取得報表,瞭解產品類別層級的競爭情況,並採取行動提高曝光率。

以下說明如何將商家報表 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
ID {MERCHANT_ID} {PARENT}

方法

你可以呼叫 ReportService.Search 方法,查詢商家報表 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:double clickThroughRate:double ctr」指標已重新命名為「clickThroughRate
metrics.conversionValueMicros:整數
segments.currencyCode:字串
conversionValue: {
object (Price)
}
金額微量和貨幣欄位會合併為一個欄位,並採用 Price 類型
metrics.orders,
metrics.orderedItems,
不支援 Merchant Reports API 不支援 Buy on 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:int reportCategoryId:int categoryId」欄位已重新命名為「reportCategoryId

競爭曝光率

Merchant Reports API 中的競爭曝光率檢視畫面有以下異動:

Content API Merchant API 說明
competitiveVisibility.countryCode:字串 reportCountryCode:字串 countryCode」欄位已重新命名為「reportCountryCode
competitiveVisibility.categoryId:整數 reportCategoryId:整數 categoryId」欄位已重新命名為「reportCategoryId