Merchant Reports API 可讓您以程式輔助方式,擷取 Google 服務 (包括 Google 搜尋的 AI 模式和 Gemini) 的通用商務通訊協定 (UCP) 結帳和轉換成效指標。這些報表提供的成效洞察資料,與 Merchant Center UCP 數據分析資訊主頁相同,可協助您監控轉換漏斗、已完成訂單、購物車轉移和產品層級參與度。
Reporting 子 API 提供兩種檢視畫面,可用於分析 UCP 成效:
UcpAgenticPerformanceView(ucp_agentic_performance_view):提供帳戶層級的轉換漏斗、訂單、取消和購物車轉移指標,並依日期和顧客國家/地區區隔。UcpAgenticProductPerformanceView(ucp_agentic_product_performance_view):提供產品層級 (offer_id) 購買按鈕點擊指標,並依日期和顧客國家/地區區隔。
事前準備
查詢 UCP 成效檢視表之前,請確認您符合下列規定:
- 使用
v1alpha端點:將 MCQL 查詢傳送至v1alphaaccounts.reports.search方法。如要進一步瞭解如何執行報表要求,請參閱「Merchant Reports API 入門指南」。 - 支援的帳戶類型:
ucp_agentic_performance_view和ucp_agentic_product_performance_view都支援葉帳戶 (獨立帳戶和個別子帳戶) 以及進階帳戶 (多重客戶帳戶或集結網站帳戶)。如需詳細資料和範例,請參閱「在進階帳戶層級查詢」。 - 必要日期篩選器:您必須在兩個檢視表的每個查詢
WHERE子句中,指定date的條件。
分析帳戶層級的 UCP 成效
使用 ucp_agentic_performance_view 追蹤整體 UCP 轉換漏斗,從點選購買按鈕和連結帳戶,到完成購買和轉移購物車。
貨幣和價格指標
ucp_agentic_performance_view 處理貨幣和Price指標的方式與成效報表相同:
Price指標:下列指標會傳回Price物件,其中包含amount_micros值和currency_code:purchase_valueaverage_order_valueaverage_purchase_product_valueaverage_cart_valueaverage_cart_product_value
- 非價格指標:下列指標沒有相關聯的貨幣:
buy_button_clicksaccounts_linkedaccount_linking_ratepurchase_countcancellationsaverage_purchase_product_countcart_transfersaverage_cart_product_count
- 整體漏斗和計數指標 (與幣別無關):僅選取非價格指標,即可取得與幣別無關的匯總計數。
- 購買和購物車價值指標 (依貨幣):選取
Price指標,以及對應的訂單和購物車數量,分析每種貨幣的收益和價值。
查詢 1:擷取整體漏斗指標 (與貨幣無關)
使用下列查詢,擷取與貨幣無關的整體轉換漏斗、訂單數量和購物車轉移指標 (不含 Price 價值指標):
SELECT
date,
account_id,
customer_country_code,
buy_button_clicks,
accounts_linked,
account_linking_rate,
purchase_count,
cancellations,
average_purchase_product_count,
cart_transfers,
average_cart_product_count
FROM ucp_agentic_performance_view
WHERE date = '2026-09-20'
回應會傳回各顧客國家/地區的匯總漏斗指標:
{
"results": [
{
"ucpAgenticPerformanceView": {
"date": {
"year": 2026,
"month": 9,
"day": 20
},
"accountId": "123456789",
"customerCountryCode": "US",
"buyButtonClicks": "420",
"accountsLinked": "85",
"accountLinkingRate": 0.68,
"purchaseCount": "64",
"cancellations": "3",
"averagePurchaseProductCount": 1.75,
"cartTransfers": "52",
"averageCartProductCount": 2.1
}
}
]
}
查詢 2:擷取購買和購物車價值指標 (依貨幣)
使用下列查詢,擷取按貨幣區隔的購買價值、平均訂單價值和購物車轉移價值:
SELECT
date,
account_id,
customer_country_code,
purchase_count,
purchase_value,
average_order_value,
average_purchase_product_count,
average_purchase_product_value,
average_cart_value,
average_cart_product_value
FROM ucp_agentic_performance_view
WHERE date = '2026-09-20' AND purchase_count > 0
回應會針對購買或購物車價值指標中顯示的每種貨幣,傳回個別資料列:
{
"results": [
{
"ucpAgenticPerformanceView": {
"date": {
"year": 2026,
"month": 9,
"day": 20
},
"accountId": "123456789",
"customerCountryCode": "US",
"purchaseCount": "64",
"purchaseValue": {
"amountMicros": "5120000000",
"currencyCode": "USD"
},
"averageOrderValue": {
"amountMicros": "80000000",
"currencyCode": "USD"
},
"averagePurchaseProductCount": 1.75,
"averagePurchaseProductValue": {
"amountMicros": "45714285",
"currencyCode": "USD"
},
"cartTransfers": "52",
"averageCartValue": {
"amountMicros": "94500000",
"currencyCode": "USD"
},
"averageCartProductCount": 2.1,
"averageCartProductValue": {
"amountMicros": "45000000",
"currencyCode": "USD"
}
}
}
]
}
分析產品層級 UCP 成效
使用 ucp_agentic_product_performance_view,查看哪些產品直接在 Google 平台上獲得購買按鈕點擊。
依產品擷取「購買」按鈕點擊次數
使用下列查詢,擷取特定日期的產品層級購買按鈕點擊次數:
SELECT
date,
account_id,
customer_country_code,
offer_id,
title,
buy_button_clicks
FROM ucp_agentic_product_performance_view
WHERE date = '2026-09-20'
您也可以從 SELECT 子句中省略 date,使用 BETWEEN 匯總日期範圍內的點擊次數:
SELECT
account_id,
customer_country_code,
offer_id,
title,
buy_button_clicks
FROM ucp_agentic_product_performance_view
WHERE date BETWEEN '2026-09-01' AND '2026-09-20'
ORDER BY buy_button_clicks DESC
回應會傳回各項相符產品的購買按鈕匯總點擊次數:
{
"results": [
{
"ucpAgenticProductPerformanceView": {
"accountId": "123456789",
"customerCountryCode": "US",
"offerId": "sku-10042",
"title": "Lightweight Running Shoes - Blue / Size 10",
"buyButtonClicks": "38"
}
}
]
}
在進階帳戶層級查詢
如要同時查詢 ucp_agentic_performance_view 和 ucp_agentic_product_performance_view,請在 accounts.reports.search 要求的 parent 參數中指定進階帳戶 (多重客戶帳戶或集結網站帳戶),例如 accounts/{advanced_account_id}。
在這兩種檢視畫面中,account_id 欄一律會保留葉 Merchant Center 帳戶 ID (在進階帳戶下查詢時,為個別子帳戶 ID;查詢獨立帳戶時,則為獨立帳戶 ID)。在進階帳戶層級查詢時,是否在 SELECT 子句中加入 account_id,會決定指標的分組方式:
- 省略
account_id(在進階帳戶層級匯總):如未選取account_id,回應會匯總進階帳戶下所有子帳戶的指標。 - 選取
account_id(依子帳戶細分):選取account_id時,回應會依葉account_id區隔統計資料,並為進階帳戶下的每個子帳戶傳回個別資料列。
擷取進階帳戶的匯總指標
如要擷取進階帳戶層級匯總的 UCP 漏斗指標總計,請使用進階帳戶 ID 做為 parent 資源傳送要求,並從 SELECT 子句中省略 account_id:
SELECT
date,
customer_country_code,
buy_button_clicks,
accounts_linked,
account_linking_rate,
purchase_count,
cancellations
FROM ucp_agentic_performance_view
WHERE date = '2026-09-20'
回應會針對進階帳戶的所有子帳戶,傳回每個日期和客戶國家/地區的單一匯總資料列:
{
"results": [
{
"ucpAgenticPerformanceView": {
"date": {
"year": 2026,
"month": 9,
"day": 20
},
"customerCountryCode": "US",
"buyButtonClicks": "730",
"accountsLinked": "140",
"accountLinkingRate": 0.65,
"purchaseCount": "110",
"cancellations": "5"
}
}
]
}
擷取依子帳戶細分的指標
如要在查詢進階帳戶時,依子帳戶細分結果,請在 SELECT 子句中加入 account_id:
SELECT
date,
account_id,
customer_country_code,
buy_button_clicks,
accounts_linked,
account_linking_rate,
purchase_count,
cancellations
FROM ucp_agentic_performance_view
WHERE date = '2026-09-20'
由於 account_id 一律會保留分葉帳戶 ID,因此回應會為進階帳戶下的每個子帳戶傳回個別資料列:
{
"results": [
{
"ucpAgenticPerformanceView": {
"date": {
"year": 2026,
"month": 9,
"day": 20
},
"accountId": "123456789",
"customerCountryCode": "US",
"buyButtonClicks": "420",
"accountsLinked": "85",
"accountLinkingRate": 0.68,
"purchaseCount": "64",
"cancellations": "3"
}
},
{
"ucpAgenticPerformanceView": {
"date": {
"year": 2026,
"month": 9,
"day": 20
},
"accountId": "987654321",
"customerCountryCode": "US",
"buyButtonClicks": "310",
"accountsLinked": "55",
"accountLinkingRate": 0.61,
"purchaseCount": "46",
"cancellations": "2"
}
}
]
}