借助 Merchant Center 转化来源,您可以在 Merchant Center 账号中查看非付费商品详情和您网站的转化数据。借助 Merchant API,您可以管理 Merchant Center 账号的转化来源。如需了解详情,请参阅管理转化来源。
本页介绍了如何将转化来源管理从 Content API 迁移到 Merchant API。
请求
下面是一个示例,比较了 Content API for Shopping 与 Merchant Conversion Sources API 在转化来源请求方面的差异:
| Content API | Merchant API | |
|---|---|---|
| 网址 | GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/conversionSources/{CONVERSIONSOURCE_ID} | GET https://merchantapi.googleapis.com/conversions/v1/{NAME} | 
| 标识符 | {MERCHANT_ID} /conversionSources/{CONVERSIONSOURCE_ID} | {NAME} | 
方法
以下是 Conversion Sources API 中转化来源方法的变化:
| 方法 | Content API for Shopping 中的网址 | Merchant API 中的网址 | Content API for Shopping 中的标识符 | Merchant API 中的标识符 | 说明 | 
| create | POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/conversionSources | POST https://merchantapi.googleapis.com/conversions/v1/accounts/{PARENT}/conversionSources | {MERCHANT_ID} | {PARENT} | 在 Merchant API 中, propertyName称为property。 | 
| 更新 | PATCH https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/conversionSources/{CONVERSIONSOURCE_ID} | PATCH https://merchantapi.googleapis.com/conversions/v1/accounts/{CONVERSIONSOURCE_NAME} | {MERCHANT_ID} /conversionSources/{CONVERSIONSOURCE_ID} | {CONVERSIONSOURCE_NAME} | 在 Merchant API 中, destinationId称为destination。 | 
| delete | DELETE https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/conversionSources/{CONVERSIONSOURCE_ID} | DELETE https://merchantapi.googleapis.com/conversions/v1/accounts/{NAME} | {MERCHANT_ID} /conversionSources/{CONVERSIONSOURCE_ID} | {NAME} | 在 Merchant API 中, attributionLookbackWindowInDays称为attributionLookbackWindowDays。在 Merchant API 中, includeInReporting称为report。 | 
| undelete | POST https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/conversionSources/{CONVERSIONSOURCE_ID}:undelete | POST https://merchantapi.googleapis.com/conversions/v1/accounts/{name}:undelete | {MERCHANT_ID} /conversionSources/{CONVERSIONSOURCE_ID} | {NAME} | Merchant API 中的网址和标识符有所不同。 Conversion Sources API 会返回 ConversionSource,而不是Empty。 | 
| get | GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/conversionSources/{CONVERSIONSOURCE_ID} | GET https://merchantapi.googleapis.com/conversions/v1/accounts/{NAME} | {MERCHANT_ID} /conversionSources/{CONVERSIONSOURCE_ID} | {NAME} | Merchant API 中的网址和标识符有所不同。 | 
| list | GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/conversionSources | GET https://merchantapi.googleapis.com/conversions/v1/{PARENT}/conversionSources | {MERCHANT_ID} | {PARENT} | Merchant API 中的网址和标识符有所不同。 | 
资源
下表列出了转化来源 API 中转化来源资源的变更:
| Content API for Shopping | Merchant API | 说明 | 
| googleAnalyticsLink: {
 | googleAnalyticsLink: {
 | 在 Merchant API 中, propertyName称为property。 | 
| merchantCenterDestination: {
 | merchantCenterDestination: {
 | 在 Merchant API 中, destinationId称为destination。 | 
| attributionSettings: {
 | attributionSettings: {
 | 在 Merchant API 中, attributionLookbackWindowInDays称为attributionLookbackWindowDays。
在 Merchant API 中, |