Protected Audience オークションでのレポート ID の仕組み
概要
レポート ID は、広告に関連付けられた識別子で、入札の生成、入札のスコアリング、レポート作成に使用できます。レポート ID はインタレスト グループ構成でバイヤーによって提供され、このガイドで説明するさまざまな条件の下で generateBid()、scoreAd()、reportResult()、reportWin() で利用できるようになります。
レポート ID を使用すると、広告の識別子を報告できるほか、取引などのユースケースも有効になります。
レポート ID には次の 2 種類の 3 つの ID があります。
- 選択できないレポート ID
buyerReportingId(文字列)buyerAndSellerReportingId(文字列)
- 選択可能なレポート ID
selectableBuyerAndSellerReportingIds(文字列の配列)
レポート用識別子は、選択可能なレポート用識別子が使用されているかどうかによって動作が異なります。選択できないレポート ID のみが使用されている場合、これらの ID はレポート関数内でのみ使用可能になります。選択可能なレポート用 ID が使用されている場合、必要に応じて選択不可能なレポート用 ID も使用されている場合、定義されたすべての ID が generateBid() と scoreAd() でも使用可能になります。
選択できないレポート ID
buyerReportingId と buyerAndSellerReportingId は、インタレスト グループ設定で定義された選択不可のレポート ID で、購入者と販売者のレポート機能で使用できます。購入者と販売者のレポート機能は、落札した広告に対してのみ実行され、その広告に定義されたレポート ID を受け取ります。
選択可能なレポート ID を使用しない場合、購入者レポート関数は上書き動作に応じて buyerReportingId または buyerAndSellerReportingId を受け取り、販売者レポート関数は buyerAndSellerReportingId を受け取ります。インタレスト グループ構成で buyerReportingId と buyerAndSellerReportingId のどちらも定義されていない場合、reportWin() 関数は落札した入札のインタレスト グループ名(interestGroupName)を受け取ります。
選択可能なレポート ID と組み合わせて使用されていない場合、選択不可の ID は generateBid() と scoreAd() 内では使用できません。
インタレスト グループのレポート ID
レポート ID は、インタレスト グループ内の各広告について購入者が定義します。
navigator.joinAdInterestGroup({
owner: 'https://buyer.example',
name: 'example-interest-group',
ads: [{
renderUrl: `https://buyer.example/ad.html`,
// buyerAndSellerReportingId goes to the buyer and seller reporting functions
buyerAndSellerReportingId: 'bsrid123',
// buyerReportingId is defined here as an example, but
// is not used due to the overwrite rules described later
buyerReportingId: 'brid123',
}]
});
販売者レポート
販売者のレポート フェーズでは、buyerAndSellerReportingId の値が reportResult() で利用できるようになります。
function reportResult(..., browserSignals, ...) {
const {
buyerAndSellerReportingId // 'bsrid123'
} = browserSignals;
sendReportTo(`https://seller.example/report?bsrid=${buyerAndSellerReportingId}`);
}
ID が reportResult() 内で利用可能になる前に、インタレスト グループの所有者、入札スクリプトの URL、レンダリング URL、広告サイズ(広告サイズは少なくとも 2025 年第 1 四半期まではこのチェックから除外されます)を使用して k-匿名性がチェックされます。k 匿名性がない場合でも、reportResult() 関数は実行されますが、レポート ID の値は関数内で使用できません。
購入者のレポート
オークションの購入者レポート フェーズでは、1 つのレポート ID が reportWin() で使用できるようになります。インタレスト グループで複数のレポート ID が定義されている場合は、buyerAndSellerReportingId が buyerReportingId を上書きする上書きルールが適用されます。
buyerAndSellerReportingIdとbuyerReportingIdの両方が定義されている場合、buyerAndSellerReportingIdはbuyerReportingIdを上書きし、buyerAndSellerReportingIdはreportWin()内で使用可能になります。buyerReportingIdのみが定義されている場合、buyerReportingIdを使用できます。buyerAndSellerReportingIdもbuyerReportingIdも定義されていない場合、interestGroupNameが使用可能になります。
function reportWin(..., browserSignals, ...) {
const {
buyerAndSellerReportingId // 'bsrid123'
} = browserSignals;
sendReportTo(`https://seller.example/report?bsrid=${buyerAndSellerReportingId}`);
}
reportWin() 内で利用可能になるレポート ID は、インタレスト グループの所有者、入札スクリプトの URL、レンダリング URL、広告サイズ(広告サイズは少なくとも 2025 年第 1 四半期までこのチェックから除外されます)を使用して k-匿名性がチェックされます。k 匿名性チェックに失敗した場合でも、reportWin() は実行されますが、レポート ID の値は関数内で使用できません。
buyerReportingId のみが定義されている
インタレスト グループ構成で buyerReportingId のみが定義されている場合:
navigator.joinAdInterestGroup({
owner: 'https://buyer.example',
name: 'example-interest-group',
ads: [{
renderUrl: `https://buyer.example/ad.html`,
buyerReportingId: 'brid123',
}]
});
buyerReportingId は reportWin() 内で利用可能になります。
function reportWin(..., browserSignals, ...) {
const {
buyerReportingId, // 'brid123'
} = browserSignals;
}
reportWin() で利用可能になる前に、buyerReportingId の k 匿名性がインタレスト グループの所有者、入札スクリプトの URL、レンダリング URL、広告サイズ(広告サイズは少なくとも 2025 年第 1 四半期まではこのチェックから除外されます)とともにチェックされます。
buyerAndSellerReportingId のみが定義されている
インタレスト グループ構成で buyerAndSellerReportingId のみが定義されている場合:
navigator.joinAdInterestGroup({
owner: 'https://buyer.example',
name: 'example-interest-group',
ads: [{
renderUrl: `https://buyer.example/ad.html`,
buyerAndSellerReportingId: 'bsrid123',
}]
});
buyerAndSellerReportingId は reportWin() 内で利用可能になります。
function reportWin(..., browserSignals, ...) {
const {
buyerAndSellerReportingId, // 'bsrid123'
} = browserSignals;
}
reportWin() で利用可能になる前に、buyerAndSellerReportingId の k 匿名性がインタレスト グループの所有者、入札スクリプトの URL、レンダリング URL、広告サイズ(広告サイズは少なくとも 2025 年第 1 四半期まではこのチェックから除外されます)とともにチェックされます。
buyerAndSellerReportingId と buyerReportingId の両方が定義されている
インタレスト グループ構成で buyerAndSellerReportingId と buyerReportingId の両方が定義されている場合:
navigator.joinAdInterestGroup({
owner: 'https://buyer.example',
name: 'example-interest-group',
ads: [{
renderUrl: `https://buyer.example/ad.html`,
buyerReportingId: 'brid123',
buyerAndSellerReportingId: 'bsrid123',
}]
});
この場合、上書き動作により、reportWin() 内では buyerAndSellerReportingId のみを使用できます。
function reportWin(..., browserSignals, ...) {
const {
buyerAndSellerReportingId, // 'bsrid123'
} = browserSignals;
}
reportWin() で利用可能になる前に、buyerAndSellerReportingId の k 匿名性がインタレスト グループの所有者、入札スクリプトの URL、レンダリング URL、広告サイズ(広告サイズは少なくとも 2025 年第 1 四半期まではこのチェックから除外されます)とともにチェックされます。
buyerAndSellerReportingId も buyerReportingId も定義されていない
インタレスト グループ構成でレポート ID が定義されていない場合:
navigator.joinAdInterestGroup({
owner: 'https://buyer.example',
name: 'example-interest-group',
ads: [{
renderUrl: `https://buyer.example/ad.html`,
}]
});
これで、インタレスト グループ name が reportWin() 内で使用できるようになります。
function reportWin(..., browserSignals, ...) {
const {
interestGroupName, // 'example-interest-group'
} = browserSignals;
}
reportWin() で利用可能になる前に、インタレスト グループ名(interestGroupName)の k 匿名性が、インタレスト グループの所有者、入札スクリプトの URL、レンダリング URL、広告サイズ(広告サイズは少なくとも 2025 年第 1 四半期まではこのチェックから除外されます)とともにチェックされます。
選択可能なレポート ID
選択可能なレポート ID を使用すると、購入者は入札の生成時に ID を選択でき、ブラウザは選択された値を scoreAd() とレポート関数で使用できるようにします。文字列の配列である selectableBuyerAndSellerReportingIds 値が generateBid() に提供され、購入者は選択した ID を selectedBuyerAndSellerReportingId として返すことができます。
generateBid() 関数と scoreAd() 関数は、インタレスト グループ構成で定義された各広告に対して実行され、各広告のレポート ID を受け取ります。購入者と販売者のレポート機能は、落札した広告に対してのみ実行され、その広告に定義されたレポート ID を受け取ります。
選択可能なレポート ID と選択不可能なレポート ID を組み合わせて使用すると、その動作は前のセクションで説明したワークフローとは異なります。選択できないレポート用 ID はレポート関数内でのみ使用可能でしたが、選択可能なレポート用 ID を使用すると、選択できないレポート用 ID を generateBid() と scoreAd() でも使用できるようになります。
インタレスト グループ
選択可能なレポート ID フィールド(selectableBuyerAndSellerReportingIds)は、広告のインタレスト グループでバイヤーが定義した文字列の配列です。選択可能なレポート ID とともに、選択不可能なレポート ID を定義することもできます。
navigator.joinAdInterestGroup({
owner: 'https://buyer.example',
name: 'example-interest-group',
ads: [{
renderUrl: `https://buyer.example/ad.html`,
buyerReportingId: 'brid123',
buyerAndSellerReportingId: 'bsrid123',
selectableBuyerAndSellerReportingIds: ['sbsrid1', 'sbsrid2', 'sbsrid3']
}]
});
購入者の入札単価の生成
インタレスト グループの構成で selectableBuyerAndSellerReportingIds が定義されている場合、定義された他のレポート ID とともに generateBid() 内で使用できるようになります。
function generateBid(interestGroup, ...) {
const [{
buyerReportingId, // 'brid123'
buyerAndSellerReportingId, // 'bsrid123'
selectableBuyerAndSellerReportingIds // ['sbsrid1', 'sbsrid2', 'sbsrid3']
}] = interestGroup.ads;
return {
bid: 1,
render: 'https://buyer.example/ad.html',
selectedBuyerAndSellerReportingId: 'sbsrid2' // Buyer returns the selected ID
};
}
購入者は generateBid() の selectableBuyerAndSellerReportingIds 配列から ID を 1 つ選択し、選択した ID を selectedBuyerAndSellerReportingId として返すことができます。選択した値が selectableBuyerAndSellerReportingIds 配列に含まれていない場合、入札は拒否されます。インタレスト グループ設定で selectableBuyerAndSellerReportingIds が定義されていて、購入者が generateBid() から selectedBuyerAndSellerReportingId を返さない場合、レポート ID は選択できないレポート ID で説明されている動作に戻ります。
selectedbuyerAndSellerReportingId の値が返された入札は、selectedbuyerAndSellerReportingId の値が buyerAndSellerReportingId(存在する場合)、buyerReportingId(存在する場合)、インタレスト グループの所有者、入札スクリプトの URL、レンダリング URL、広告サイズ(広告サイズは少なくとも 2025 年第 1 四半期まではこのチェックから除外されます)とともに k-匿名性がある場合にのみ、オークションで落札できる可能性があります。
販売者広告のスコアリング
販売者にとって、購入者が generateBid() から返品した selectedBuyerAndSellerReportingId は、scoreAd() で利用可能になります。また、インタレスト グループの構成で buyerAndSellerReportingId が定義されている場合は、buyerAndSellerReportingId も利用可能になります。
function scoreAd(..., browserSignals, ...) {
const {
buyerAndSellerReportingId, // 'bsrid123'
selectedBuyerAndSellerReportingId, // 'sbsrid2'
} = browserSignals;
// ...
}
販売者レポート
販売者レポートでは、インタレスト グループで定義されている場合、generateBid() から購入者が返した selectedBuyerAndSellerReportingId が buyerAndSellerReportingId とともに reportResult() で利用可能になります。
function reportResult(..., browserSignals, ...) {
const {
buyerAndSellerReportingId, // 'bsrid123'
selectedBuyerAndSellerReportingId // 'sbsrid2'
} = browserSignals;
// ...
}
インタレスト グループ設定で selectableBuyerAndSellerReportingIds が定義され、generateBid() から selectedBuyerAndSellerReportingId が返された場合、selectedBuyerAndSellerReportingId と buyerAndSellerReportingId(存在する場合)がインタレスト グループの所有者、入札スクリプトの URL、レンダリング URL、広告サイズ(広告サイズは少なくとも 2025 年第 1 四半期まではこのチェックから除外されます)と k 匿名性があり、その入札で reportResult() が実行されない限り、オークションで落札できません。したがって、selectedBuyerAndSellerReportingId の値を使用して reportResult() が呼び出された場合、レポート ID が k-匿名性チェックに合格したことを意味し、定義されたすべてのレポート ID が reportResult() 内で使用可能になります。
購入者のレポート
インタレスト グループの構成で selectableBuyerAndSellerReportingIds が定義され、generateBid() から selectedBuyerAndSellerReportingId が返された場合、インタレスト グループの構成で定義されたすべてのレポート ID が利用可能になります。販売者レポートと同様に、レポート ID が k-匿名性でない場合、オークションで落札できず、その入札に対して reportWin() は実行されません。
function reportWin(..., browserSignals, ...) {
const {
buyerReportingId, // 'brid123'
buyerAndSellerReportingId, // 'bsrid123'
selectedBuyerAndSellerReportingId // 'sbsrid2'
} = browserSignals;
// ...
}
オーバーライド ルール
ここでは、選択不可のレポート ID と選択可能なレポート ID の両方のオーバーライド ルールについてまとめます。selectableBuyerAndSellerReportingIds、buyerAndSellerReportingId、buyerReportingId、インタレスト グループ名のうち、どれが reportWin() に渡されるかは、ブラウザが次のロジックで決定します。
- 入札から
selectedBuyerAndSellerReportingIdが返された場合、selectedBuyerAndSellerReportingId、buyerAndSellerReportingId(インタレスト グループで定義されている場合)、buyerReportingId(インタレスト グループで定義されている場合)はすべてレポートに使用できます。 - それ以外の場合、インタレスト グループで
buyerAndSellerReportingIdが定義されていると、レポートにbuyerAndSellerReportingIdのみが使用可能になります。 - それ以外の場合、インタレスト グループで
buyerReportingIdが定義されていると、レポートにbuyerReportingIdのみが使用可能になります。 - それ以外の場合は、インタレスト グループ
nameのみがレポートで使用できます。
次の表に、上書きの動作を示します。
| インタレスト グループの設定でレポート ID が定義されているか? | 利用可能なレポート ID | |||
selectableBuyerAnd
|
buyerAndSeller
|
buyerReportingId
|
reportWin()
|
reportResult()
|
はい、generateBid() で を選択しました |
省略可 | 省略可 |
1)selectedBuyerAnd2) buyerAndSeller(定義されている場合)3) buyerReportingId(定義されている場合)
|
1)selectedBuyerAnd2) buyerAndSeller(定義されている場合) |
generateBid() で を選択していない |
はい | 無視 | buyerAndSeller |
buyerAndSeller |
generateBid() で を選択していない |
いいえ | はい | buyerReportingId |
なし |
generateBid() で を選択していない |
いいえ | いいえ | interestGroupName |
なし |
意見交換とフィードバックの提供
- レポート用 ID について詳しくは、Protected Audience の説明のレポート用 ID のセクションをご覧ください。
- GitHub: API リポジトリの問題で質問を投稿し、意見交換に参加します。
- W3C: WICG の通話で業界のユースケースについて意見を交換してください。
- お知らせ: メーリング リストに参加または表示します。
- プライバシー サンドボックス デベロッパー サポート: プライバシー サンドボックス デベロッパー サポート リポジトリで質問を投稿し、意見を交換してください。
- Chromium: Chromium バグを報告して、Chrome でテスト可能な実装について質問します。