利用 PPS 改进广告系列
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
您可以在广告请求中以发布商提供的信号 (PPS) 的形式发送受众群体和情境数据。借助 PPS,您可以使用用户数据,通过使用标准类目向所有交易类型中的出价方传达受众群体特征,从而提升程序化变现效果,而无需分享用户标识符。受众群体特征可能包括行为数据和兴趣数据(IAB 受众群体类目 1.1),以及情境数据(IAB 内容类目 2.2)。您还可以发送由 Google 定义的发布商提供的结构化信号,并允许发送其他信号。
构建用户信号 JSON
在顶级,创建一个包含单个键值对的 JSON 对象。键应为 PublisherProvidedTaxonomySignals
,其值应为对象数组。数组中的每个对象都应包含 2 个键值对:
构建结构化信号数组
对于结构化信号,请添加 PublisherProvidedStructuredSignals
键,并将其值设为对象数组。根据以下信号键值对列表构建对象:
切换结构化信号表的视图
信号 |
<code" dir="ltr" translate="no">"type" Value</code"> |
可能的 "single_value" 值 |
可能的 "values" 值 |
音频 Feed 类型 |
"audio_feed" |
"af_1" :音乐
"af_2" :广播
"af_3" :播客
|
无 |
内容分级 |
"content_rating" |
"cr_1" :G
"cr_2" :PG
"cr_3" :T
"cr_4" :马萨诸塞州
|
无 |
内容传送 |
"delivery" |
无 |
"cd_1" :在线播放
"cd_2" :渐进式
"cd_3" :下载
|
制作质量 |
"prodq" |
"pq_1" :专业制作
"pq_2" :专业消费者
"pq_3" :用户生成的内容 (UGC)
|
无 |
请参阅以下示例,其中使用了 IAB_AUDIENCE_1_1
和 IAB_CONTENT_2_2
来获取分类信号,并包含结构化信号。
const userSignals = {
"PublisherProvidedTaxonomySignals": [{
"taxonomy": "IAB_AUDIENCE_1_1",
"values": ["6", "284"]
// '6' = 'Demographic | Age Range | 30-34'
// '284' = 'Interest | Business and Finance | Mergers and Acquisitions'
},
{
"taxonomy": "IAB_CONTENT_2_2",
"values": ["49", "138"]
// '49' = 'Books and Literature | Poetry'
// '138' = 'Education | College Education | College Planning'
}],
"PublisherProvidedStructuredSignals": [{
"type": "audio_feed",
"single_value": "af_1",
},
{
"type": "delivery",
"values": ["cd_1", "cd_3"],
},
],
};
如需通过 IMAAdsRequest
发送 PPS,请按以下步骤操作:
- 使用用户的兴趣、行为或情境数据创建 JSON 字符串。
- 根据上面的 JSON 字符串创建一个 Base64 编码的 ASCII 字符串。
- 将经过编码的字符串附加到广告代码网址中,并附加
&ppsj=
参数。
let userSignals = """
{
"PublisherProvidedTaxonomySignals": [
{
"taxonomy": "IAB_AUDIENCE_1_1",
"values": [
"1",
"284"
]
}
],
}
"""
let base64Signals = Data(userSignals.utf8).base64EncodedString()
var encodedSignals = base64Signals.replacingOccurrences(of: "+", with: "%2B")
encodedSignals = encodedSignals.replacingOccurrences(of: "/", with: "%2F")
encodedSignals = encodedSignals.replacingOccurrences(of: "=", with: "%3D")
let finalAdTag = sampleAdTag + "&ppsj=" + encodedSignals
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003ePublisher-provided signals (PPS) let you share audience and contextual data in ad requests to boost programmatic ad revenue.\u003c/p\u003e\n"],["\u003cp\u003ePPS uses standard taxonomies like IAB Audience Taxonomy 1.1 and IAB Content Taxonomy 2.2 to convey user characteristics to bidders without revealing personal information.\u003c/p\u003e\n"],["\u003cp\u003eYou can send structured signals, including details about audio feed type, content rating, delivery method, and production quality, using predefined keys and values.\u003c/p\u003e\n"],["\u003cp\u003eTo use PPS, construct a JSON object containing taxonomy and structured signals, encode it in Base64, and append it to your ad tag URL using the \u003ccode\u003e&ppsj=\u003c/code\u003e parameter.\u003c/p\u003e\n"]]],[],null,["You can send audience and contextual data as\n[publisher provided signals](//support.google.com/admanager/answer/12451124)\n(PPS) in ad requests. With PPS, you can use your user data to improve\nprogrammatic monetization by communicating your audience characteristics to\nbidders in all\n[transaction types](//support.google.com/admanager/answer/2805834), using\nstandard taxonomies, without the need to share user identifiers. Your audience\ncharacteristics can include behavioral and interest-based data (\n[IAB Audience Taxonomy 1.1](//iabtechlab.com/standards/audience-taxonomy/)), and\ncontextual data (\n[IAB Content Taxonomy 2.2](https://iabtechlab.com/standards/content-taxonomy/)).\nYou can also send publisher provided structured signals, which are defined by\nGoogle, and allow for additional signals to be sent.\n\nConstruct the user signals JSON\n\nAt the top level, create a JSON object with a single key-value pair. The key\nshould be `PublisherProvidedTaxonomySignals`, and its value should be an array\nof objects. Each object in the array should have 2 key-value pairs:\n\n- The `taxonomy` key, which accepts the following values that are mapped to\n following IAB public specifications:\n\n - `IAB_AUDIENCE_1_1` for Audience Taxonomy 1.1\n - `IAB_CONTENT_2_2` for Content Taxonomy 2.2\n- The `values` key with a corresponding array of string taxonomy values.\n\nConstruct the structured signals array\n\nFor structured signals, add the `PublisherProvidedStructuredSignals` key with a\nvalue of an array of objects. Construct the object based on the following list\nof signal key-values: \n\nToggle view of structured signals table\n\n| Signal | \"type\" Value | Possible `\"single_value\"` Values | Possible `\"values\"` Values |\n|--------------------|--------------------|-------------------------------------------------------------------------------------------|--------------------------------------------------------------------|\n| Audio Feed Type | `\"audio_feed\"` | - `\"af_1\"`: Music - `\"af_2\"`: Broadcast - `\"af_3\"`: Podcast | n/a |\n| Content Rating | `\"content_rating\"` | - `\"cr_1\"`: G - `\"cr_2\"`: PG - `\"cr_3\"`: T - `\"cr_4\"`: MA | n/a |\n| Content Delivery | `\"delivery\"` | n/a | - `\"cd_1\"`: Streaming - `\"cd_2\"`: Progressive - `\"cd_3\"`: Download |\n| Production Quality | `\"prodq\"` | - `\"pq_1\"`: Professionally Produced - `\"pq_2\"`: Prosumer - `\"pq_3\"`: User Generated (UGC) | n/a |\n\nSee the following example that uses the `IAB_AUDIENCE_1_1` and `IAB_CONTENT_2_2`\nfor taxonomy signals and includes structured signals. \n\n const userSignals = {\n \"PublisherProvidedTaxonomySignals\": [{\n \"taxonomy\": \"IAB_AUDIENCE_1_1\",\n \"values\": [\"6\", \"284\"]\n // '6' = 'Demographic | Age Range | 30-34'\n // '284' = 'Interest | Business and Finance | Mergers and Acquisitions'\n },\n {\n \"taxonomy\": \"IAB_CONTENT_2_2\",\n \"values\": [\"49\", \"138\"]\n // '49' = 'Books and Literature | Poetry'\n // '138' = 'Education | College Education | College Planning'\n }],\n \"PublisherProvidedStructuredSignals\": [{\n \"type\": \"audio_feed\",\n \"single_value\": \"af_1\",\n },\n {\n \"type\": \"delivery\",\n \"values\": [\"cd_1\", \"cd_3\"],\n },\n ],\n };\n\nConfigure your ad request\n\nFollow these steps to send PPS with your\n[`IMAAdsRequest`](/interactive-media-ads/docs/sdks/tvos/client-side/reference/Classes/IMAAdsRequest):\n\n- Create a JSON string with the user's interest, behavior, or contextual data.\n- Create a Base64-encoded ASCII string from the JSON string above.\n- Append the encoded string to your ad tag URL with the `&ppsj=` parameter.\n\n let userSignals = \"\"\"\n {\n \"PublisherProvidedTaxonomySignals\": [\n {\n \"taxonomy\": \"IAB_AUDIENCE_1_1\",\n \"values\": [\n \"1\",\n \"284\"\n ]\n }\n ],\n }\n \"\"\"\n let base64Signals = Data(userSignals.utf8).base64EncodedString()\n var encodedSignals = base64Signals.replacingOccurrences(of: \"+\", with: \"%2B\")\n encodedSignals = encodedSignals.replacingOccurrences(of: \"/\", with: \"%2F\")\n encodedSignals = encodedSignals.replacingOccurrences(of: \"=\", with: \"%3D\")\n\n\n let finalAdTag = sampleAdTag + \"&ppsj=\" + encodedSignals"]]