ส่วนนี้ประกอบด้วยชุดตัวอย่างและทรัพยากรที่เกี่ยวข้องสำหรับไลบรารีแท็กผู้เผยแพร่โฆษณาผ่าน Google (GPT)
เนื้อหาส่วนใหญ่ในส่วนนี้มีอยู่ในที่เก็บของ GitHub โค้ดตัวอย่างและเอกสารที่เกี่ยวข้องจะเผยแพร่เป็นโอเพนซอร์สภายใต้ใบอนุญาต Apache 2.0
ลองสร้างตัวอย่างที่กำหนดเองด้วย เครื่องมือสร้างตัวอย่าง GPT (เบต้า)
แสดงโฆษณาคั่นระหว่างหน้าในเกม H5
แสดงโฆษณาคั่นระหว่างหน้าในเกมที่จัดการโดย GPT
- TypeScript
- HTML
- JavaScript
แสดงโฆษณาแบบจํากัด
แสดงโฆษณาโดยไม่ได้รับความยินยอมให้ใช้คุกกี้หรือตัวระบุอื่นๆ ในเครื่อง
- TypeScript
- JavaScript
Collapse empty ad slots
Automatically show/hide ad slots when certain criteria are met.
- TypeScript
- JavaScript
Display ads in the shadow DOM
Use GPT to request and render ads in the shadow DOM.
- TypeScript
- JavaScript
Control SRA batching
Precisely control which ad slots are requested when in Single Request Architecture (SRA) mode.
- JavaScript
- TypeScript
Key-value targeting
Use key-value targeting to control the ads eligible to serve to specific ad slots.
- JavaScript
- TypeScript