แสดงโฆษณาแบบจํากัดต่อผู้ใช้
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ตั้งแต่วันที่ 14 มกราคม 2021 เป็นต้นไป IMA HTML5 SDK จะอนุญาตให้แสดงโฆษณาแบบจํากัดเมื่อผู้ใช้ไม่ได้ให้ความยินยอมในการใช้คุกกี้ ผู้ใช้ปฏิเสธความยินยอมในการใช้คุกกี้ หรือเมื่อ IMA ไม่ได้รับสตริง TC ที่ถูกต้องในภูมิภาค GDPR และ ePrivacy ตามระยะเวลาผ่อนผันของการผสานรวม IAB TCFv2
สําหรับ SDK ฝั่งไคลเอ็นต์ คุณต้องพารามิเตอร์
ltd
เพื่อเรียกใช้คําขอโฆษณาแบบจํากัด
โปรดดูข้อมูลเพิ่มเติมใน
คู่มือโฆษณาแบบจํากัดนี้
ผู้เผยแพร่โฆษณาที่ใช้แท็กผู้เผยแพร่โฆษณาผ่าน Google (GPT) จะต้องตั้งค่า
PrivacySettingsConfig.limitedAds เพื่อปิดใช้คุกกี้ที่เกี่ยวข้องกับ GPT ด้วย ข้อมูลโค้ดต่อไปนี้แสดงวิธีดำเนินการนี้โดยอิงตาม
คู่มือโฆษณาที่แสดงร่วมของ IMA
...
<!-- Register your companion slots -->
<script type='text/javascript'>
googletag.cmd.push(function() {
googletag.pubads().setPrivacySettings({
limitedAds: true,
});
// Supply YOUR_NETWORK and YOUR_UNIT_PATH.
googletag.defineSlot('/YOUR_NETWORK/YOUR_UNIT_PATH', [728, 90], 'companionDiv')
.addService(googletag.companionAds())
.addService(googletag.pubads());
googletag.companionAds().setRefreshUnfilledSlots(true);
googletag.pubads().enableVideoAds();
googletag.enableServices();
});
</script>
...
นอกจากนี้ คุณยังเปิดใช้โฆษณาแบบจํากัดโดยอัตโนมัติผ่านการผสานรวมกับแพลตฟอร์มการจัดการความยินยอม (CMP) ได้ด้วย ฟีเจอร์นี้ใช้ได้ใน HTML5 SDK เวอร์ชันล่าสุด ณ วันที่ 14 มกราคม 2021
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-31 UTC
[null,null,["อัปเดตล่าสุด 2025-08-31 UTC"],[[["\u003cp\u003eAs of January 14, 2021, the IMA HTML5 SDK allows limited ads to be served when users do not consent to cookies or a valid TC string is not received in GDPR and ePrivacy regions.\u003c/p\u003e\n"],["\u003cp\u003eClient-side SDK users must utilize the \u003ccode\u003eltd\u003c/code\u003e parameter to initiate a limited ads request.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Publisher Tag (GPT) users need to set \u003ccode\u003ePrivacySettingsConfig.limitedAds\u003c/code\u003e to disable GPT-related cookies when serving limited ads.\u003c/p\u003e\n"],["\u003cp\u003eAutomatic enabling of limited ads is possible via integration with a Consent Management Platform (CMP) on the latest HTML5 SDK version.\u003c/p\u003e\n"]]],[],null,["# Serve users with Limited Ads\n\nAs of January 14th 2021, the IMA HTML5 SDK\nallows [limited ads](//support.google.com/admanager/answer/9882911) to be served\nwhen the user does not give consent to cookies, the user denies consent to\ncookies, or when IMA does not receive a valid TC string in GDPR and ePrivacy\nregions following the grace period of IAB TCFv2 integration.\nFor client-side SDKs you must use the [`ltd`](//support.google.com/admanager/table/9749596#ltd) parameter to trigger a limited ads request. Please see this [Limited ads guide](//support.google.com/admanager/answer/9882911) for more information.\n\n\u003cbr /\u003e\n\nPublishers using Google Publisher Tag (GPT) will need to also set [PrivacySettingsConfig.limitedAds](/publisher-tag/reference#boolean-limitedads) to disable GPT-related cookies. The following code snippet shows how to do this based on [IMA's companion ads guide](/interactive-media-ads/docs/sdks/html5/client-side/companions):\n\n\u003cbr /\u003e\n\n```carbon\n...\n\n\u003c!-- Register your companion slots --\u003e\n\u003cscript type='text/javascript'\u003e\n googletag.cmd.push(function() {\n googletag.pubads().setPrivacySettings({\n limitedAds: true,\n });\n // Supply YOUR_NETWORK and YOUR_UNIT_PATH.\n googletag.defineSlot('/YOUR_NETWORK/YOUR_UNIT_PATH', [728, 90], 'companionDiv')\n .addService(googletag.companionAds())\n .addService(googletag.pubads());\n googletag.companionAds().setRefreshUnfilledSlots(true);\n googletag.pubads().enableVideoAds();\n googletag.enableServices();\n });\n\u003c/script\u003e\n\n...\n```\n\nIt is also possible to enable limited ads automatically through integrating with\na Consent Management Platform (CMP). This is supported on\n\nthe latest version of the HTML5 SDK as of January 14th 2021."]]