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

透過 Merchant Center 轉換來源,您可以查看商家帳戶中免費產品資訊網站的轉換資料。Merchant API 可讓您管理商家帳戶的轉換來源。詳情請參閱「管理轉換來源」。

本頁面說明如何將轉換來源管理功能從 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/v1beta/{NAME}
ID {MERCHANT_ID}/conversionSources/{CONVERSIONSOURCE_ID} {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/{MERCHANT_ID}/conversionSources POST https://merchantapi.googleapis.com/conversions/v1beta/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/v1beta/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/v1beta/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/v1beta/accounts/{name}:undelete {MERCHANT_ID}/conversionSources/{CONVERSIONSOURCE_ID} {NAME} Merchant API 中的網址和 ID 不同。
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/v1beta/accounts/{NAME} {MERCHANT_ID}/conversionSources/{CONVERSIONSOURCE_ID} {NAME} Merchant API 中的網址和 ID 不同。
list GET https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/conversionSources GET https://merchantapi.googleapis.com/conversions/v1beta/{PARENT}/conversionSources {MERCHANT_ID} {PARENT} Merchant API 中的網址和 ID 不同。

資源

下表列出轉換來源 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