从 Content API for Shopping 迁移转化来源管理

借助 Merchant Center 转化来源,您可以在 Merchant Center 账号中查看 非付费 商品详情网站的转化数据。您可以使用 Merchant API 管理 Merchant Center 账号的转化来源。如需了解详情,请参阅管理转化 来源

本页介绍了如何将转化来源管理从 Content API 迁移到 Merchant API。

请求

下面是 Content API for Shopping 与 Merchant 转化来源 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}

方法

以下是转化来源 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
update 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 中的网址和标识符不同。
转化来源 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: {

property_id: int64,

attributionSettings: object,

propertyName: string

}

googleAnalyticsLink: {

propertyId: int64,

attributionSettings: object,

property: string

}

在 Merchant API 中,propertyName 称为 property
merchantCenterDestination: {

destinationId: string,

attributionSettings: object,

displayName: string,

currencyCode: string

}

merchantCenterDestination: {

destination: string,

attributionSettings: object,

displayName: string,

currencyCode: string

}

在 Merchant API 中,destinationId 称为 destination
attributionSettings: {

attributionLookbackWindowDays: int32,

attributionModel: object,

repeated conversionType: {

name: string,

includeInReporting: bool

}

}

attributionSettings: {

attributionLookbackWindowDays: int32,

attributionModel: object,

repeated conversionType: {

name: string,

report: bool

}

}

在 Merchant API 中,attributionLookbackWindowInDays 称为 attributionLookbackWindowDays

在 Merchant API 中,includeInReporting 称为 report