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

借助 Merchant API,您可以管理商家账号的转化来源。

请求

以下示例对比了 Content API for Shopping 与 Merchant Conversion Sources API 适用于转化来源请求:

Content API 商家 API
网址 GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/conversionSources/{conversionSourceId} GET https://merchantapi.googleapis.com/conversions/v1beta/{name}
标识符 {merchantId}/conversionSources/{conversionSourceId} {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/{merchantId}/conversionSources POST https://merchantapi.googleapis.com/conversions/v1beta/accounts/{parent}/conversionSources {merchantId} {parent} 在 Merchant API 中,propertyName 称为 property
更新 PATCH https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/conversionSources/{conversionSourceId} PATCH https://merchantapi.googleapis.com/conversions/v1beta/accounts/{conversionSource.name} {merchantId}/conversionSources/{conversionSourceId} {conversionSource.name} 在 Merchant API 中,destinationId 称为 destination
delete DELETE https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/conversionSources/{conversionSourceId} DELETE https://merchantapi.googleapis.com/conversions/v1beta/accounts/{name} {merchantId}/conversionSources/{conversionSourceId} {name} 在 Merchant API 中,attributionLookbackWindowInDays 称为 attributionLookbackWindowDays
在 Merchant API 中,includeInReporting 称为 report
undelete POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/conversionSources/{conversionSourceId}:undelete POST https://merchantapi.googleapis.com/conversions/v1beta/accounts/{name}:undelete {merchantId}/conversionSources/{conversionSourceId} {name} Merchant API 中的网址和标识符有所不同。
Conversion Sources API 返回 ConversionSource,而不是 Empty
get GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/conversionSources/{conversionSourceId} GET https://merchantapi.googleapis.com/conversions/v1beta/accounts/{name} {merchantId}/conversionSources/{conversionSourceId} {name} Merchant API 中的网址和标识符有所不同。
list GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/conversionSources GET https://merchantapi.googleapis.com/conversions/v1beta/{parent}/conversionSources {merchantId} {parent} Merchant API 中的网址和标识符有所不同。

资源

下表提及了 Conversion Sources API 中转化来源资源的变化:

Content API for Shopping 商家 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