使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
控制 SRA 批处理
Google 发布商代码 (GPT) 库的单一请求架构 (SRA) 模式会将多个广告位批量处理为一个广告请求。这样做有益于提升性能,但也必须确保遵循竞争性排除规则和包版条件。
默认情况下,在 SRA 模式处于启用状态时,在调用 display()
或 refresh()
之前定义的所有广告位都会一起进行批量处理和请求。不过,在某些情况下,您可能需要更好地控制此批处理行为。例如,优先加载特定槽或避免超出单个 SRA 请求中的槽数上限。
此示例演示了如何针对 SRA 请求应用控制广告加载和刷新的技术。
实现示例
观看演示
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]