Eseguire la migrazione dei report dall'API Content for Shopping

Puoi utilizzare l'API Merchant Reports per scoprire di più sui tuoi prodotti, sul loro rendimento e sul loro ambiente competitivo su Google tramite la visualizzazione dei dati che offre.

Puoi utilizzare l'API Merchant Reports per:

Ecco come integrare l'API Merchant Reports con l'implementazione esistente dell'API Content for Shopping.

Richieste

Utilizza il seguente formato dell'URL della richiesta per l'API Merchant Reports:

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

Di seguito è riportato un esempio di confronto tra l'API Content for Shopping e l'API Merchant Reports per le richieste search:

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

Metodi

Puoi eseguire query sull'API Merchant Reports chiamando il ReportService.Search metodo.

Visualizzazioni

Nell'API Merchant, i nomi delle tabelle vengono modificati da CamelCase a snake_case.

MerchantPerformanceView è ora product_performance_view.

Di seguito è riportata una mappatura tra i nomi delle tabelle nell'API Content for Shopping e nell'API Merchant:

API Content API Merchant
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

Nell'API Merchant, non è più necessario specificare un prefisso del campo, ad esempio segments.offer_id. Utilizza invece il nome del campo, offer_id.

Di seguito è riportato un esempio di confronto tra le query nell'API Content for Shopping e nell'API Merchant:

API Content API Merchant
   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
   

Di seguito è riportato un esempio di risposta:

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

Il nome della tabella può essere utilizzato come prefisso del campo. Ad esempio, sia offer_id sia product_performance_view.offer_id sono accettati nella query dell'API Merchant.

Rendimento

Ecco le modifiche apportate alla visualizzazione del rendimento nell'API Merchant Reports:

API Content API Merchant Descrizione
segments.program: string marketing_method: string Il segmento program viene sostituito da un nuovo campo marketing_method. Per maggiori dettagli, consulta la sezione Nuovi valori marketing method.
metrics.ctr: double clickThroughRate: double La metrica ctr viene rinominata in clickThroughRate
metrics.conversionValueMicros: integer
segments.currencyCode: string
conversionValue: {
object (Price)
}
I campi relativi a micro importi e valuta vengono uniti in un unico campo di tipo Price
metrics.orders,
metrics.orderedItems,
Non supportata Le metriche Acquista su Google non sono supportate nell'API Merchant Reports

Nuovi valori del metodo di marketing

Di seguito è riportata la mappatura tra i valori di segments.program e marketing_method:

API Content API Merchant
SHOPPING_ADS ADS
FREE_PRODUCT_LISTING ORGANIC
FREE_LOCAL_PRODUCT_LISTING ORGANIC
BUY_ON_GOOGLE_LISTING Non supportata

Prodotto

Ecco le modifiche apportate alla visualizzazione del prodotto nell'API Merchant Reports:

API Content API Merchant Descrizione
productView.id: string id: string Il formato del campo cambia da channel:language:targetCountry:offerId a
channel~language~feedLabel~offerId
productView.priceMicros: integer
productView.currencyCode: string
price: {
object (Price)
}
I campi relativi a micro importi e valuta vengono uniti in un unico campo di tipo Price
productView.aggregated_destination_status: string aggregated_reporting_context_status: string Il campo aggregated_destination_status viene rinominato in aggregated_reporting_context_status, i valori non sono cambiati
productView.item_issues: [
{
object (ItemIssue)
}
]
item_issues: [
{
object (ItemIssue)
}
]
La definizione di ItemIssue è cambiata
Non supportata feedLabel: string Viene introdotto il campo feedLabel

Approfondimenti sul prezzo

Ecco le modifiche apportate alla visualizzazione degli approfondimenti sul prezzo nell'API Merchant Reports:

API Content API Merchant Descrizione
productView.id: string id: string Il formato del campo cambia da channel:language:targetCountry:offerId a channel~language~feedLabel~offerId
productView.priceMicros: integer
productView.currencyCode: string
price: {
object (Price)
}
I campi relativi a micro importi e valuta vengono uniti in un unico campo di tipo Price
priceInsights.suggestedPriceMicros: integer
priceInsights.suggestedPriceCurrencyCode: string
suggestedPrice: {
object (Price)
}
I campi relativi a micro importi e valuta vengono uniti in un unico campo di tipo Price
priceInsights.predictedGrossProfitChangeFraction: double
priceInsights.predictedMonthlyGrossProfitChangeMicros: integer
priceInsights.predictedMonthlyGrossProfitChangeCurrencyCode: string
Non supportata I campi relativi alla variazione dell'utile lordo non sono supportati nell'API Merchant Reports

Competitività del prezzo

Ecco le modifiche apportate alla visualizzazione della competitività del prezzo nell'API Merchant Reports:

API Content API Merchant Descrizione
productView.id: string id: string Il formato del campo cambia da channel:language:targetCountry:offerId a channel~language~feedLabel~offerId
productView.priceMicros: integer
productView.currencyCode: string
price: {
object (Price)
}
I campi relativi a micro importi e valuta vengono uniti in un unico campo di tipo Price
priceCompetitiveness.countryCode: string reportCountryCode: string Il campo countryCode viene rinominato in reportCountryCode
priceCompetitiveness.benchmarkPriceMicros: integer
priceCompetitiveness.benchmarkPriceCurrencyCode: string
benchmarkPrice: {
object (Price)
}
I campi relativi a micro importi e valuta vengono uniti in un unico campo di tipo Price

Più venduti

Ecco le modifiche apportate alle visualizzazioni dei prodotti più venduti nell'API Merchant Reports:

API Content API Merchant Descrizione
bestSellers.countryCode: string reportCountryCode: string Il campo countryCode viene rinominato in reportCountryCode
bestSellers.categoryId: int reportCategoryId: int Il campo categoryId viene rinominato in reportCategoryId

Scenario competitivo

Ecco le modifiche apportate alle visualizzazioni dello scenario competitivo nell'API Merchant Reports:

API Content API Merchant Descrizione
competitiveVisibility.countryCode: string reportCountryCode: string Il campo countryCode viene rinominato in reportCountryCode
competitiveVisibility.categoryId: integer reportCategoryId: integer Il campo categoryId viene rinominato in reportCategoryId