借助 Merchant Reports API,您可以通过编程方式检索 Google 各个平台(包括 Google 搜索中的 AI 模式和 Gemini)上的 Universal Commerce Protocol (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"
}
}
]
}
在高级账号级别查询
您可以在 accounts.reports.search 请求的 parent 参数中指定高级账号(多客户账号或聚合信息账号),例如 accounts/{advanced_account_id},从而同时查询 ucp_agentic_performance_view 和 ucp_agentic_product_performance_view。
在这两个视图中,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"
}
}
]
}