作为 Privacy Sandbox 的一部分,Chrome 提出了实验性 Topics API。Topics API 会为网页上的第三方调用方(包括广告技术提供商)提供网页访问者当前可能感兴趣的粗略广告主题。这些主题可以补充有关当前网页的上下文信息,并且有助于支持针对用户兴趣投放广告。
Topics API 实验可供实时出价合作伙伴在出价请求中使用。系统会根据可用性将主题发送给所有实时出价合作伙伴。
出价请求代表
Google Authorized Buyers 协议
主题在 BidRequest
消息的 topics
字段中表示。该协议的公开 Beta 版中提供了此字段。
其定义如下:
// Experimental field; subject to change.
// A coarse-grained topic that a website visitor might currently be interested
// in based on recent browsing activity. See
// https://developer.chrome.com/docs/privacy-sandbox/topics/ and/or
// https://privacysandbox.com/intl/en_us/proposals/topics/ for more
// information about the Topics API. Reach out to your account manager to
// participate in the Topics API experiment.
message Topic {
// The value of a topic ID. A numerical identifier corresponding to a
// coarse-grained advertising topic. See
// https://github.com/patcg-individual-drafts/topics/blob/main/taxonomy_v1.md
// for a list of topics in the initial taxonomy.
optional int32 id = 1;
// The version of the advertising taxonomy which defines the semantic
// meaning of each topic ID for the topics, for example "v1".
optional string taxonomy_version = 2;
// The version of the classifier used by the browser to map hostnames to
// topic IDs in the taxonomy.
optional string classifier_version = 3;
}
// The list of topics that a website visitor might currently be interested in
// inferred by the browser based on recent browsing activity. See
// https://developer.chrome.com/docs/privacy-sandbox/topics/ and/or
// https://privacysandbox.com/intl/en_us/proposals/topics/ for more
// information about Topics API.
repeated Topic topics = 74;
OpenRTB 协议
主题在 OpenRTB BidRequest.user.data
消息中以片段表示。
字段 | 类型 | 说明 |
---|---|---|
Data.ext.segtax
|
整数 | 集中注册的分类的 ID。对于主题,这是广告分类的版本,用于定义每个主题 ID 的语义含义。600 用于 Chrome 的 Topics 初始分类。 |
Data.ext.segclass
|
字符串 | 等同于 classifier_version 。
|
Data.segment.id
|
字符串 | 等同于转换为字符串的 id 。
|
Data.ext
是 BidRequest.user.data
消息的扩展。该扩展程序位于该协议的公开 Beta 版中。
其定义如下:
// Ad Exchange extensions for the Data object.
message DataExt {
// The ID for a taxonomy that is registered centrally. Used to define the
// namespace and semantic meaning of the segment IDs. See
// https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/extensions/community_extensions/segtax.md#enumeration-of-taxonomies
// for the enumeration of the taxonomies that this value can take. Currently
// only Chrome Topics API taxonomy (segtax=600) is supported.
optional int32 segtax = 1;
// The version of the classifier which produced the segment IDs within the
// taxonomy. For example, in the case of Chrome Topics API (segtax=600), this
// is the version of the classifier used by the browser to map hostnames to
// topics in the taxonomy.
optional string segclass = 2;
}
示例
以下示例展示了 Google Authorized Buyers 和 OpenRTB 协议如何表示 Chrome Topics API 返回的主题。
Chrome Topics API 响应,由 document.browsingTopics()
返回:
[
{
"modelVersion": "classifier_v1",
"taxonomyVersion": "taxonomy_v1",
"topic": 3
},
{
"modelVersion": "classifier_v1",
"taxonomyVersion": "taxonomy_v1",
"topic": 44
},
{
"modelVersion": "classifier_v1",
"taxonomyVersion": "taxonomy_v1",
"topic": 59
}
]
Google Authorized Buyers 协议 BidRequest:
topics {
id: 3
taxonomy_version: "taxonomy_v1"
classifier_version: "classifier_v1"
}
topics {
id: 44
taxonomy_version: "taxonomy_v1"
classifier_version: "classifier_v1"
}
topics {
id: 59
taxonomy_version: "taxonomy_v1"
classifier_version: "classifier_v1"
}
OpenRTB BidRequest:
{
"user": {
"data": [
{
"ext": {
"segtax": 600,
"segclass": "classifier_v1"
},
"segment": [
{ "id": "3" },
{ "id": "44" },
{ "id": "59" }
]
}
]
}
}
在上述示例中,taxonomy_version
表示使用了 categories_v1 映射。根据分类,这些主题 ID 与以下主题相对应:
主题 ID | 主题值 |
---|---|
3 | /艺术与娱乐/漫画 |
44 | /艺术与娱乐/歌剧 |
59 | /汽车与交通工具/经典车型 |
可用性
出价请求中存在的主题受现有隐私保护措施和控制措施的制约。例如,如果用户选择停用个性化广告或非个性化广告广告资源,则主题将不可用。