使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
配置隐私设置
此示例展示了如何使用 Google 发布商代码 (GPT) 库为广告请求配置隐私权设置。如需详细了解可用的隐私设置,请访问 Google Ad Manager 帮助中心:
如需了解如何在 GPT 中使用受限广告,请参阅展示受限广告示例。
实现示例
查看演示
[null,null,[],[],[],null,["# Configure privacy settings\n==========================\n\nThis example shows how to configure privacy settings for ad requests using the\nGoogle Publisher Tag (GPT) library. Learn more about available privacy settings\nin the Google Ad Manager help center:\n\n- [Child-directed treatment](//support.google.com/admanager/answer/3671211)\n- [Non-personalized ads](//support.google.com/admanager/answer/9005435)\n- [Restricted data processing](//support.google.com/admanager/answer/9598414)\n- [Under age of consent](//support.google.com/admanager/answer/9004919)\n\nTo learn about working with [Limited ads](//support.google.com/admanager/answer/9882911) in GPT, see the\n[Display a limited ad](//developers.google.com/publisher-tag/samples/display-limited-ad) sample.\n\nSample implementation\n---------------------\n\n[View demo](https://googleads.github.io/google-publisher-tag-samples/configure-privacy/js/demo.html) \n\n### JavaScript\n\nLoading...\n----------\n\nLoading...\n----------\n\n[Improve this sample](https://github.com/googleads/google-publisher-tag-samples/tree/main/dist/configure-privacy/js) [Report an issue](https://github.com/googleads/google-publisher-tag-samples/issues/new?labels=documentation&template=sample-feedback.md&title=Sample+feedback%3A+configure-privacy/js)\n\n### TypeScript\n\nLoading...\n----------\n\nLoading...\n----------\n\n[Improve this sample](https://github.com/googleads/google-publisher-tag-samples/tree/main/dist/configure-privacy/ts) [Report an issue](https://github.com/googleads/google-publisher-tag-samples/issues/new?labels=documentation&template=sample-feedback.md&title=Sample+feedback%3A+configure-privacy/ts)"]]