Eseguire la migrazione dei report dall'API Content for Shopping

Puoi utilizzare l'API Merchant Reports per ottenere informazioni 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

Ecco un confronto di esempio 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 metodo ReportService.Search.

Visualizzazioni

Nell'API Merchant, i nomi delle tabelle sono stati 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 l'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, la specifica di un prefisso di campo, ad esempio segments.offer_id, non è più obbligatoria. Utilizza invece solo il nome del campo, offer_id.

Ecco un confronto di esempio delle 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
   

Ecco una risposta di esempio:

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 cosa è cambiato per la visualizzazione del rendimento nell'API Merchant Reports:

API Content API Merchant Descrizione
segments.program: stringa marketing_method: stringa Il segmento program viene sostituito da un nuovo campo marketing_method. Per i dettagli, consulta la sezione Nuovi valori di marketing method.
metrics.ctr: doppio clickThroughRate: doppio La metrica ctr è stata rinominata in clickThroughRate
metrics.conversionValueMicros: integer
segments.currencyCode: string
conversionValue: {
object (Price)
}
I campi Importo micro 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

Ecco 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 cosa è cambiato per la visualizzazione dei prodotti nell'API Merchant Reports:

API Content API Merchant Descrizione
productView.id: stringa id: stringa 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 Importo micro e Valuta vengono uniti in un unico campo di tipo Price
productView.aggregated_destination_status: stringa aggregated_reporting_context_status: stringa Il campo aggregated_destination_status è stato 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: stringa Viene introdotto il campo feedLabel

Approfondimenti sul prezzo

Ecco cosa è cambiato per la visualizzazione degli approfondimenti sul prezzo nell'API Merchant Reports:

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

Competitività del prezzo

Ecco cosa è cambiato per la visualizzazione della competitività del prezzo nell'API Merchant Reports:

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

Più venduti

Ecco cosa è cambiato per le visualizzazioni dei prodotti più venduti nell'API Merchant Reports:

API Content API Merchant Descrizione
bestSellers.countryCode: stringa reportCountryCode: stringa Il campo countryCode è stato rinominato in reportCountryCode
bestSellers.categoryId: int reportCategoryId: int Il campo categoryId è stato rinominato in reportCategoryId

Scenario competitivo

Ecco cosa è cambiato per le visualizzazioni dello scenario competitivo nell'API Merchant Reports:

API Content API Merchant Descrizione
competitiveVisibility.countryCode: stringa reportCountryCode: stringa Il campo countryCode è stato rinominato in reportCountryCode
competitiveVisibility.categoryId: numero intero reportCategoryId: numero intero Il campo categoryId è stato rinominato in reportCategoryId