透過示範和 Colab 逐步說明 Privacy Sandbox API。
我們提供多個 Privacy Sandbox API 的示範。大多數的示範都需要您熟悉 API,因此如果您尚未閱讀說明文件,請查看我們提供的示範連結。
示範和 Colab
Protected Audience API
此示範會使用 Protected Audience API,彙整兩個廣告客戶網站上的廣告群組興趣群組,然後展開裝置端競價,選擇在發布商網站上顯示的廣告。
Topics API
With the Topics API, a user's device observes and records topics that appear to be of interest to the user based on their activity. The API then allows callers (such as ad tech platforms) to access these topics without revealing other information about the user's activity. The following resources provide examples of the API in action.
Resources for Topics on the Web
- Headers demo: This is a recommended, more performant approach.
- JavaScript demo: Use JavaScript Topics methods if you can't modify headers.
- Topics API colab: Experiment with the TensorFlow Lite model used by Chrome to infer topics from hostnames.
- Topics documentation for the Web: Learn more about how Topics work and how to implement it.
Resources for Topics on Android
- Sample apps: Refer to Kotlin sample app or Java sample app to guide your integration.
- Topics API colab: Test different combinations of app info against the topics classifier model.
- Topics documentation for Android: Learn how Topics works on Android.
Attribution Reporting
廣告客戶和廣告技術供應商可利用 Attribution Reporting API 評估轉換,包括廣告點擊和觀看、第三方 iframe 中的廣告,以及第一方情境中的廣告。在本示範中,廣告客戶透過廣告技術供應商在發布商網站上放送廣告。
示範模式
噪音研究室
如果可匯總報表由收集器批次處理,並由匯總服務處理,產生的摘要報表就會隨機加入資料,以保護使用者隱私。使用噪音研究室測試不同值,瞭解雜訊造成的影響。
Aggregation Service
匯總服務負責解密及合併從可匯總報表收集到的資料、加入雜訊,並傳回最終摘要報告。所有操作都是在受信任的執行環境 (TEE) 中完成。
哥倫比亞
共用儲存空間
Shared Storage API 提供的儲存空間可跨網站使用,也就是說,您可以將值儲存在某個網域,然後讀取另一個網域的值。您可以自由設定數據用量,但存取儲存空間的方式受到限制。本示範將說明運作方式。
方塊
具有獨立分區狀態 (CHIPS) 的 Cookie 可讓開發人員選擇將 Cookie 加入分區儲存空間,並為每個頂層網站設置獨立的 Cookie 吧,以改善使用者隱私與安全性。本示範將說明運作方式。
相關網站集
「相關網站集」可讓公司宣告網站之間的關係,讓瀏覽器允許有限的第三方 Cookie 存取特定用途。如果在第三方使用情境中,Chrome 會使用這些聲明關係,判斷何時要允許或拒絕網站存取 Cookie。
- 示範模式
- 提交內容 JSON 產生器。這個工具會產生提交相關網站集 (RWS) 所需的 JSON 資源。
- 文件
使用者代理程式縮減
使用者代理程式縮減功能可以盡量減少 User-Agent 字串中分享的識別資訊,這些資料可能會用來進行被動式數位指紋採集。資源要求現在有較少的 User-Agent 標頭,且特定 Navigator 介面的傳回值也減少。在這個示範中,您可以實驗新的通用 Analytics (分析) 字串值。
Private State Token API
有了 Private State Token API,網站就能核發加密編譯權杖給所信任的使用者,供之後用於其他地方。使用者的瀏覽器會安全地儲存這類權杖,並可用於在其他情況下兌換,以確認使用者的真實性。查看這個示範中的 API。
Privacy Sandbox Demos Framework
Privacy Sandbox Demos framework offers cookbook recipes, sample code, and demo applications, based on Privacy Sandbox APIs. These are intended to aid businesses and developers in adapting their applications and the businesses they support to a web ecosystem without third-party cookies.
Use case | Description | APIs |
---|---|---|
Retargeting / Remarketing | How to show relevant ads to a user who has researched a brand or product online. | Protected Audience API Fenced Frame |
Single-touch conversion Attribution | How to measure conversion after seeing ads on a news site and buying a product on an online shopping site. | Attribution Reporting API |
Instream VAST video ad in a Protected Audience single-seller auction | Provides details on a temporary solution allowing Top Level embedded video players access to the VAST XML URL. | Protected Audience API |
Instream VAST video ad in a Protected Audience sequential auction setup | Shows one of the ways that VAST XMLs can be handled in a Protected Audience sequential auction setup when the ad is rendered in an iframe. | Protected Audience API |