预定位配置
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
出价方可以使用 pretargetingConfigs
资源仅接收与其定位条件匹配的展示机会的出价请求。您一次最多可以有 10 个预定位配置。
每项预定位配置都会将出价请求分配到所有端点。出价请求并非总是在所有端点之间均匀分布。例如,在给定区域中,针对特定地理位置 ID 的预定位配置在离该区域较远的交易地点中的匹配项可能会较少。较远交易地点附近的端点收到的出价请求可能会较少。
最佳实践
为了接收出价请求,您必须创建至少一个预定位配置。以下是有关管理预定位配置的一些提示:
- 范围
预定位类似于过滤。您应该使用预定位条件将出价请求过滤为与您的用例相关的请求。如果未设置任何预定位条件,您可能会收到针对所有展示的出价请求。
如果您未收到与特定预定位配置相关的足够出价请求,则可能需要放宽预定位条件。
- 逻辑
系统会通过逻辑 OR
处理顶级定位字段中的值。这意味着,您可以收到至少具有您在顶级字段中指定的一个值的出价请求。例如,如果您的预定位配置包含 languageCodes
值 en
、de
和 sv
,您可能会收到检测语言为 en
、de
或 sv
的出价请求。
不同字段使用逻辑 AND
进行处理。您只会收到与您设置的每个预定位字段中的至少一个值匹配的出价请求。例如,如果您的配置 languageCodes
值为 en
、de
和 sv
,includedPlatforms
值为 PERSONAL_COMPUTER
,那么,您将只收到检测到的语言为 en
、de
或 sv
且设备类型为 PERSONAL_COMPUTER
的出价请求。
由于各个预定位字段采用了逻辑 AND
,因此您不能添加相互冲突的条件。例如,在 includedIds
和 NumericTargetingDimensions
条件的 excludedIds
中添加相同的值会导致错误。
- 重叠
出价请求可以采用多种预定位配置。
您最多可以创建 10 个预定位配置来定位不同类型的广告资源。预定位配置可能会重叠,因此单个出价请求可能符合多项预定位配置的条件。在本例中,出价请求的 billing_id
字段包含每个适用配置的 billingId
。如果在出价请求中找到多个结算 ID,您必须在出价响应的 billing_id
字段中指定要对哪个结算 ID 进行出价。
地理位置 ID
由于政策原因,某些地理位置 ID 无法定位。例如,某些人口较少的区域无法定位,因为这样会违反我们的隐私权政策。我们的政策可能会发生变化。如果您在预定位配置的 geoTargeting
中指定的地理位置 ID 日后失效,那么届时该 ID 会显示在 invalidGeoIds
字段下。invalidGeoIds
下的地理位置 ID 对定位没有任何影响。如果 invalidGeoIds
中的 Goegraphic ID 有效,系统会将其添加到预定位配置的 geoTargeting
字段中。
geo-table.csv 文件列出了可定位的地理位置 ID,并会随着 ID 的添加和移除定期更新。
出价请求数量
您应该为出价工具端点配置 QPS 上限,并允许出价邀约配额系统针对每项预定位配置管理发送到您的端点的流量。
在下面这些极端情况下,使用 maximumQps
在预定位配置级别管理最大 QPS 可能很有用:
- 收到的请求过多
- 如果出价邀约配额系统根据指定的预定位配置向出价方端点发送异常大量的出价请求,您可以使用
maximumQps
手动调整请求数量。
- 测试新广告资源的配置
- 如果您要尝试支持新的广告资源(例如新的广告素材格式),可以实施一项预定位配置,仅定位到
maximumQps
较低的广告资源。
对于多个预定位配置定位的广告资源,只要其中一个配置尚未达到其 maximumQps
上限,出价请求就会发送到出价工具的端点,包括每项配置的 billingId
。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eUse pretargeting configurations to filter bid requests and receive only relevant impressions, with the ability to create up to 10 configurations.\u003c/p\u003e\n"],["\u003cp\u003ePretargeting criteria use logical \u003ccode\u003eOR\u003c/code\u003e within fields and logical \u003ccode\u003eAND\u003c/code\u003e across fields, allowing for flexible but specific targeting.\u003c/p\u003e\n"],["\u003cp\u003eBid requests can match multiple pretargeting configurations, requiring bidders to specify the desired billing ID in their bid response.\u003c/p\u003e\n"],["\u003cp\u003eSome geographic IDs may be untargetable for policy reasons, and the \u003ccode\u003egeo-table.csv\u003c/code\u003e file provides a list of valid targetable IDs.\u003c/p\u003e\n"],["\u003cp\u003eManage bid request traffic using the Callout Quota System and \u003ccode\u003emaximumQps\u003c/code\u003e for specific pretargeting configurations when necessary.\u003c/p\u003e\n"]]],["Bidders use `pretargetingConfigs` to filter bid requests, receiving only those matching their criteria; up to 10 configurations are allowed. These configurations filter requests using logical `OR` within fields and logical `AND` across fields. Bid requests can match multiple configurations, identified by `billingId` in the request. Geographic targeting may have restrictions and invalid IDs are listed under `invalidGeoIds`. You can set `maximumQps` per configuration to manage traffic volume. At least one configuration is required to receive bid requests.\n"],null,["# Pretargeting configurations\n\nBidders can use the `pretargetingConfigs` resource to receive only bid\nrequests for impressions that match their targeting criteria.You can have up to\n10 pretargeting configurations at once.\n\nEach pretargeting configuration distributes bid requests across all endpoints.\nBid requests aren't always distributed evenly across all endpoints. For example,\na pretargeting configuration for specific geographic IDs in a given region might\nhave fewer matches in [trading\nlocations](/authorized-buyers/rtb/peer-guide#trading-locations) that are farther\nfrom that region. Endpoints near those farther trading locations might receive\nfewer bid requests.\n\nBest practices\n--------------\n\nIn order to receive bid requests, you must create at least one\npretargeting configuration. Here are some tips for managing your pretargeting\nconfigurations:\n\nScope\n\n: Pretargeting is like filtering. You should use pretargeting criteria to filter\n bid requests to those that are relevant to your use case. If you don't set any\n pretargeting criteria, you can receive bid requests for all impressions.\n\n If you aren't receiving enough bid requests related to a given pretargeting\n configuration, you might want to broaden your pretargeting criteria.\n\nLogic\n\n: Values in top-level targeting fields are processed with logical `OR`. This\n means you can receive bid requests that have at least one of the values you\n specify in the top-level field. For example, if your pretargeting\n configuration has `languageCodes` values `en`, `de`, and `sv`, you might receive\n bid requests with `en`, `de`, or `sv` as the detected language.\n\n Different fields are processed with logical `AND`. You only receive bid\n requests that have a match for at least one value in every pretargeting field\n you set. For example, if your configuration has `languageCodes` values `en`,\n `de`, and `sv`, and `includedPlatforms` value `PERSONAL_COMPUTER`, you receive\n only bid requests that have a detected language of `en`, `de`, or `sv` and a\n device type of `PERSONAL_COMPUTER`.\n\n Due to the logical `AND` across pretargeting fields, you can't include\n contradictory criteria. For example, including the same value in `includedIds`\n and `excludedIds` in a `NumericTargetingDimensions` criteria results in an\n error.\n\nOverlap\n\n: Bid requests can be eligible for multiple pretargeting configurations.\n\n You can create up to 10 pretargeting configurations to target different\n kinds of inventory. Pretargeting configurations can overlap, so a single bid\n request might be eligible for multiple pretargeting configurations. In this\n case, the bid request's `billing_id` field contains the `billingId` of\n each applicable configuration. If multiple billing IDs are found in the bid\n request, you must specify which billing ID you're bidding on in the bid\n response's `billing_id` field.\n\nGeographic IDs\n--------------\n\nSome geographic IDs aren't targetable for policy reasons. For example, some\nregions with small populations can't be targeted because it would violate our\nprivacy policy. Our policies are subject to change. If you specify\na geographic ID in your pretargeting configuration's `geoTargeting` that becomes\ninvalid at a later date, the ID appears under the `invalidGeoIds` field at that\ntime. Geographic IDs under `invalidGeoIds` have no impact on targeting. If a\ngoegraphic ID in `invalidGeoIds` becomes valid, it's added to your pretargeting\nconfiguration's `geoTargeting` field.\n\nThe\n[geo-table.csv](//storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv)\nfile lists targetable geographic IDs, and is updated periodically as IDs are\nadded and removed.\n\nBid request count\n-----------------\n\nYou should configure the maximum QPS for your bidder endpoints,\nand allow the [Callout Quota System](/authorized-buyers/rtb/callout-quota-system)\nto manage the traffic sent to your endpoints for each of your pretargeting\nconfigurations.\n\nHere are edge cases where managing maximum QPS at the\npretargeting configuration level with `maximumQps` might be useful:\n\nReceiving too many requests\n: If the Callout Quota System is sending an unusually large number of bid\n requests to bidder endpoints for a given pretargeting configuration, you can\n use `maximumQps` to manually adjust the number of requests.\n\nTesting a configuration for new inventory\n: If you're trying to support new inventory, like a new creative format,\n you can implement a pretargeting configuration targeting only that inventory\n with a low `maximumQps`.\n\nFor inventory that's targeted by multiple pretargeting configurations,\nbid requests are sent to the bidder's endpoints, including the `billingId`\nfor each configuration, as long as at least one of the configurations hasn't\nreached its `maximumQps` limit."]]