แก้ปัญหา Worklet และสังเกตเหตุการณ์ Protected Audience API
ตั้งแต่ Chrome Canary 98.0.4718.0 เป็นต้นไป คุณสามารถแก้ไขข้อบกพร่องของ Protected Audience API และ Worklet ของ Protected Audience API ในเครื่องมือนักพัฒนาเว็บ Chrome ได้
อ่านคู่มือสำหรับนักพัฒนาซอฟต์แวร์เพื่อดูวงจรทั้งหมดของ Protected Audience API หากคุณไม่ใช่ผู้พัฒนาแอป ดูภาพรวมของ Protected Audience API
Worklet ของ Protected Audience API
ขั้นตอนแรกคือการตั้งค่าเบรกพอยต์ผ่านหมวดหมู่ใหม่ในบานหน้าต่างเบรกพอยต์ของเครื่องฟังสัญญาณเหตุการณ์ในแผงแหล่งที่มา
เมื่อเบรกพอยต์ทริกเกอร์ ระบบจะหยุดการดำเนินการชั่วคราวก่อนคำสั่งแรกที่ ระดับบนสุดของสคริปต์ Worklet คุณสามารถใช้เบรกพอยต์ปกติหรือคำสั่ง step เพื่อไปยังฟังก์ชันการเสนอราคา/การให้คะแนน/การรายงานได้
สคริปต์ Worklet แบบสดจะปรากฏในแผง Threads ด้วย
เนื่องจาก Worklet บางรายการอาจทำงานแบบขนาน หลายๆ เทรดจึงอาจอยู่ในสถานะ "หยุดชั่วคราว" คุณใช้รายการเธรดเพื่อสลับไปมาระหว่างเธรดต่างๆ และ ดูต่อหรือตรวจสอบอย่างละเอียดมากขึ้นได้ตามความเหมาะสม
สังเกตเหตุการณ์
จากแผงแอปพลิเคชันใน Chrome DevTools คุณจะสังเกตเห็นกลุ่มความสนใจและเหตุการณ์การประมูลของ Protected Audience API ได้
หากคุณไปที่เว็บไซต์ผู้ลงโฆษณาเดโมของ Protected Audience API
ในเบราว์เซอร์ที่เปิดใช้ Protected Audience API ไว้ DevTools จะแสดงข้อมูลเกี่ยวกับเหตุการณ์ join
ตอนนี้หากคุณไปที่เว็บไซต์ของผู้เผยแพร่โฆษณาที่สาธิต Protected Audience API
ในเบราว์เซอร์ที่เปิดใช้ Protected Audience API ไว้ DevTools จะแสดงข้อมูลเกี่ยวกับเหตุการณ์ bid
และ win
การอ้างอิง Protected Audience API ทั้งหมด
API reference guides are available:
- Developer guide for the Protected Audience API.
- Ad buyer guide to Protected Audience interest groups and bid generation.
- Ad seller guide to Protected Audience ad auctions.
- Guide to reporting auction results
- Best practices for Protected Audience ad auction latency
- Troubleshoot Protected Audience
The Protected Audience API explainer also provides detail about feature support and constraints.
What's next?
We want to engage in conversations with you to ensure we build an API that works for everyone.
Discuss the API
Like other Privacy Sandbox APIs, this API is documented and discussed publicly.
Experiment with the API
You can experiment and participate in conversation about the Protected Audience API.