在 Protected Audience 競價中導入交易 (也稱為私下市集 (PMP))
總覽
交易又稱私人市集 (PMP),可針對一部分的廣告空間提供專屬的存取權或優惠價格。系統會使用席位 ID 和交易 ID 來協助進行程式輔助交易:
- 座位 ID 來自買方,是代表買方客戶的 ID。座位 ID 可能會影響帳單,例如某個座位有特定賣家的折扣。
- 交易 ID 是由買方或賣方提供,用於代表買方與賣方之間的協議。交易 ID 可包含多種屬性,例如費用/價格、大量使用合約、目標對象資訊、專屬性等。
Protected Audience 會使用報表 ID 來協助處理交易,這項 ID 可讓席位和交易 ID 可用於競價出價、評分和報表。廣告技術公司可以利用報表 ID 機制,在競價後的 Protected Audience 報表內接收這些交易和席位 ID,以便交易交易及整理帳單工作。我們預期買方、賣方、代理商和廣告主可能會採用專屬策略,解讀並瞭解所收到的交易和座位 ID。
逐步操作說明
在目標對象受保護競價中,進行交易的步驟如下:
- 買方會在競價活動開始前,在興趣群組設定中註冊交易和座位 ID
- 產生出價時,交易和席位 ID 可供使用。買方從
selectableBuyerAndSellerReportingIds
中選取交易 ID。買方會傳回selectedBuyerAndSellerReportingId
,產生包含與該出價相關聯的交易 ID 的出價。只有在傳回的交易 ID 與其他報表 ID 和興趣群組的特定屬性皆為 k-anonymous 時,出價才有可能勝出競價。 - 在廣告評分期間,賣方將可使用所選交易和席位 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
(如有)、興趣群組擁有者、出價指令碼網址、顯示網址和廣告大小共同符合 k-anonymous 條件時,才可能勝出競價 (至少在 2025 年第 1 季前,廣告大小不會納入這項檢查)。
即使 selectablebuyerAndSellerReportingIds
已在興趣群組設定中定義,generateBid()
仍可傳回不含 selectedbuyerAndSellerReportingId
的出價;在這種情況下,如果這個出價勝出,則提供給報表函式的報表 ID 會遵循不可選取的報表 ID 行為。
如果初始叫用作業未產生任何出價,且其中的廣告未通過 k 匿名性檢查,系統就會重新執行 generateBid()
。在重新執行時,如果 selectableBuyerAndSellerReportingIds
未通過 k 匿名性檢查,就不會出現在興趣群組中。
3. 廣告評分期間的賣方交易和席位 ID
scoreAd()
將可存取所選交易 ID,以及席位 ID (如有)。賣方會考量交易 ID 和任何特殊條款,提供勝出出價的理想度分數。如果賣方認為自己適用買方所選交易 ID,賣方就會給予零或負的期望分數,藉此拒絕出價。
function scoreAd(..., browserSignals, ...) {
const {
buyerAndSellerReportingId, // 'seat123'
selectedBuyerAndSellerReportingIds, // 'deal456'
} = browserSignals;
// ...
}
4. 賣家報表的交易和席位 ID
請注意,只有在 selectedBuyerAndSellerReportingId
、buyerAndSellerReportingId
(如有) 和 buyerReportingId
(如有) 與興趣群組擁有者、出價指令碼網址、顯示網址和廣告大小皆為 k-anonymous 時,出價才有可能勝出競價 (至少在 2025 年第 1 季前,廣告大小不會納入這項檢查)。因此,包含 selectedBuyerAndSellerReportingId
的報表 ID 值一律會在 reportResult()
中提供。請注意,即使 buyerReportingId
會檢查 k-anonymity,該值仍僅供買方報表函式使用,賣方報表函式不支援。
function reportResult(..., browserSignals, ...) {
const {
buyerAndSellerReportingId, // 'seat123'
selectedBuyerAndSellerReportingIds // 'deal456'
} = browserSignals;
// ...
}
5. 買方報表的交易和席位 ID
買家報表的概念與賣家報表相同。請注意,只有在 selectedBuyerAndSellerReportingId
、buyerAndSellerReportingId
(如有) 和 buyerReportingId
(如有) 與興趣群組擁有者、出價指令碼網址、顯示網址和廣告大小皆為 k-anonymous 時,出價才有可能勝出競價 (至少在 2025 年第 1 季前,廣告大小不會納入這項檢查)。因此,包含 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 中進行的實作測試。