在 Protected Audience 競價中導入交易 (也稱為私人交易市場 (PMP))
總覽
交易 (也稱為私人交易市場 (PMP)) 可讓買方以優惠價格存取部分廣告空間。為方便進行程式輔助交易,系統會使用席位 ID 和交易 ID:
- 帳戶 ID 來自買方,是代表買方客戶的 ID。座位 ID 可能會影響帳單,例如座位享有特定賣家的折扣。
- 交易 ID 由買方或賣方提供,代表買方與賣方之間的協議。交易 ID 可能具有成本/價格、量承諾、目標對象資訊、獨家等屬性。
Protected Audience 會使用報表 ID 促成交易,讓席位和交易 ID 可用於競價出價、評分和報表。廣告技術公司可透過報表 ID,在競價後的目標對象受保護報表中接收這些交易和帳戶 ID,以便進行交易及整理帳單。我們預期買方、賣方、代理商和廣告主可能會採用專屬策略,解讀及瞭解收到的交易和席位 ID。
逐步操作說明
在 Protected Audience 競價中促成交易的步驟如下:
- 買方會在競價開始前,於興趣群組設定中註冊交易和帳戶 ID
- 出價產生期間,交易和席位 ID 會顯示。買方從
selectableBuyerAndSellerReportingIds選取交易 ID。買方會傳回selectedBuyerAndSellerReportingId,產生包含與該出價相關聯交易 ID 的出價。只有在傳回的交易 ID 與其他報表 ID 和興趣群組的選取屬性皆為 k 匿名時,出價才可能贏得競價。 - 在廣告評分期間,賣方可以取得所選交易和刊登位置 ID。
- 賣方的報表功能會顯示交易和刊登位置 ID。
- 買方的報表功能會顯示交易和座位 ID。
1. 註冊交易和席位 ID
買家會在競價開始前,於興趣群組設定中註冊交易和帳戶 ID。優惠和座位 ID 會在 selectableBuyerAndSellerReportingIds 中設為字串陣列。如果所有交易的座位 ID 相同,且不需要重複,則可以在接受字串的 buyerAndSellerReportingId 欄位中新增座位 ID:
const interestGroupConfig = {
owner: 'https://buyer.example',
name: 'example-ig',
ad: [
{
renderURL: 'https://buyer.example/ad.html',
selectableBuyerAndSellerReportingIds: ['deal123', 'deal456', 'deal789'], // Deal IDs
buyerAndSellerReportingId: 'seat123', // Seat ID
// Though it is not used to facilitate deals, the buyer
// reporting ID can be defined with other reporting IDs
buyerReportingId: 'brid123'
},
],
};
navigator.joinAdInterestGroup(interestGroupConfig);
如果交易的座位 ID 不同,可以使用下列設定:
const interestGroupConfig = {
owner: 'https://buyer.example',
name: 'example-ig',
ad: [
{
renderURL: 'https://buyer.example/ad.html',
selectableBuyerAndSellerReportingIds: [
'deal123seat123',
'deal456seat456',
'deal789seat456'
], // Deal and Seat IDs
},
],
};
navigator.joinAdInterestGroup(interestGroupConfig);
2. 出價產生期間買方的交易和席位 ID
在產生出價時,買方會決定是否要對交易 ID 出價。在 generateBid() 中,買方可以從 selectableBuyerAndSellerReportingIds 選取交易 ID,並以 selectedBuyerAndSellerReportingId 形式傳回值。如果所選交易 ID 不在 selectableBuyerAndSellerReportingIds 陣列中,系統就會拒絕出價。
function generateBid(interestGroup, ...) {
const [{
buyerAndSellerReportingId, // 'seat123'
selectableBuyerAndSellerReportingIds // ['deal123', 'deal456', 'deal789']
buyerReportingId // 'brid123' - Not used for deals, but the value is available
}] = interestGroup.ads;
// ...
return {
bid: 1,
render: 'https://buyer.example/ad.html',
selectedBuyerAndSellerReportingId: 'deal456', // Buyer selects a deal ID
};
}
如果 selectedbuyerAndSellerReportingId 傳回值,只有在 selectedbuyerAndSellerReportingId 的值與 buyerAndSellerReportingId (如有)、buyerReportingId (如有)、興趣群組擁有者、出價指令碼網址、算繪網址和廣告大小 (至少在 2025 年第 1 季前,廣告大小不會納入這項檢查) 共同達到 k 匿名狀態時,出價才能贏得競價。
即使在興趣群組設定中定義了 selectablebuyerAndSellerReportingIds,generateBid() 仍可傳回不含 selectedbuyerAndSellerReportingId 的出價;在這種情況下,如果這項出價勝出,提供給報表函式的報表 ID 會遵循無法選取的報表 ID 行為。
如果因為初始叫用未產生任何通過 k 匿名性檢查的廣告出價,而重新執行 generateBid(),則重新執行時,興趣群組中不會出現未通過 k 匿名性檢查的 selectableBuyerAndSellerReportingIds。
3. 廣告評分期間賣方的交易和席位 ID
選取的交易 ID (如有席位 ID) 會提供給 scoreAd()。賣家會考量交易 ID 和任何特殊條款,提供勝出出價的合適度分數。如果賣方認為買方選擇的交易 ID 不適用,可以給予零分或負分,藉此拒絕出價。
function scoreAd(..., browserSignals, ...) {
const {
buyerAndSellerReportingId, // 'seat123'
selectedBuyerAndSellerReportingIds, // 'deal456'
} = browserSignals;
// ...
}
4. 賣家報表的交易和席位 ID
請注意,只有在selectedBuyerAndSellerReportingId、buyerAndSellerReportingId (如有) 和buyerReportingId (如有) 與興趣群組擁有者、出價指令碼網址、顯示網址和廣告大小 (至少在 2025 年第 1 季前,廣告大小不會納入這項檢查) 進行 k 匿名化處理後,出價才可能贏得競價。因此,包含 selectedBuyerAndSellerReportingId 的報表 ID 值一律會顯示在 reportResult() 中。請注意,即使 buyerReportingId 已通過 k 匿名性檢查,該值也只會提供給買方報表函式,不會提供給這裡的賣方報表函式。
function reportResult(..., browserSignals, ...) {
const {
buyerAndSellerReportingId, // 'seat123'
selectedBuyerAndSellerReportingIds // 'deal456'
} = browserSignals;
// ...
}
5. 買方報表適用的交易和席位 ID
買家報表也適用賣家報表的相同概念。請注意,只有在selectedBuyerAndSellerReportingId、buyerAndSellerReportingId (如有) 和buyerReportingId (如有) 與興趣群組擁有者、出價指令碼網址、顯示網址和廣告大小 (至少在 2025 年第 1 季前,廣告大小不會納入這項檢查) 進行 k 匿名化處理後,出價才可能贏得競價。因此,包含 selectedBuyerAndSellerReportingId 的報表 ID 值一律會顯示在 reportWin() 中。
function reportWin(..., browserSignals, ...) {
const {
buyerAndSellerReportingId, // 'seat123'
selectedBuyerAndSellerReportingId // 'deal456'
buyerReportingId // 'brid123' - Not used for deals, but the value is available
} = browserSignals;
}
參與討論及分享意見
- 如要進一步瞭解報表 ID,請參閱「Protected Audience 說明」的「報表 ID」一節。
- GitHub:在 API 存放區的問題中提出問題並追蹤討論。
- W3C:在 WICG 通話中討論產業應用實例。
- 公告:加入或查看郵寄清單。
- Privacy Sandbox 開發人員支援:在 Privacy Sandbox 開發人員支援存放區提出問題並參與討論。
- Chromium:提出 Chromium 錯誤,詢問可在 Chrome 中測試的實作項目。