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

透過 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}
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/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 中的網址和 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/v1/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/v1/{PARENT}/conversionSources {MERCHANT_ID} {PARENT} Merchant API 中的網址和 ID 不同。

資源

下表列出 Conversion Sources 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。