從 Content API for Shopping 遷移轉換來源管理方式

Merchant API 可讓您管理商家帳戶的轉換來源。

要求

以下針對轉換來源要求,將 Content API for Shopping 與 Merchant Conversion Source API 的比較範例:

Content API 商家 API
網址 GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/conversionSources/{conversionSourceId} GET https://merchantapi.googleapis.com/conversions/v1beta/{name}
ID {merchantId}/conversionSources/{conversionSourceId} {name}

方法

Conversion Sources API 中的轉換來源方法異動如下:

方法 Content API for Shopping 中的網址 Merchant API 中的網址 Content API for Shopping 中的 ID Merchant API 中的 ID 說明
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} 網址和 ID 在 Merchant API 中不同。
Conversion Source 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} 網址和 ID 在 Merchant API 中不同。
list GET https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/conversionSources GET https://merchantapi.googleapis.com/conversions/v1beta/{parent}/conversionSources {merchantId} {parent} 網址和 ID 在 Merchant API 中不同。

資源

下表說明 Conversion Source 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