ประเภทตำแหน่ง
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การเรียกไปยัง adBreak()
ทั้งหมดต้องระบุประเภทตําแหน่ง ซึ่งเป็นสตริงที่อธิบายสถานะของเกมเมื่อโฆษณาจะแสดง เกมของคุณกําลังโหลดอยู่หรือเปล่า ผู้เล่นหยุดเล่นเกมชั่วคราวใช่ไหม หรือพวกเขามาถึงจุดใดในเกมของคุณเพื่อมอบรางวัลให้คุณ
ประเภทที่ถูกต้องที่คุณใช้เป็นสิ่งที่สําคัญ เนื่องจากมีผลต่อประสบการณ์การใช้งานโฆษณาที่จะแสดงโดยตรง (โฆษณาคั่นระหว่างหน้าเทียบกับโฆษณาที่มีการให้รางวัล) แต่ก็อาจมีผลกระทบอื่นๆ ที่มองเห็นได้น้อยในลักษณะการทํางานของ API ด้วยเช่นกัน คุณจําเป็นต้องระบุประเภทตําแหน่งอย่างถูกต้องเพื่อให้ API ทํางานได้อย่างเหมาะสม
ประเภทตำแหน่ง |
คำอธิบาย |
'preroll' |
เกมของคุณไม่โหลด UI และไม่เล่นเสียง ในเกมจะมีการโหลดหน้าเว็บเพียง 1 ตําแหน่งเท่านั้น
ตัวอย่าง: ผู้เล่นคลิกเกมภายในแคตตาล็อกเกม ผืนผ้าใบเกมจะปรากฏขึ้น และก่อนที่เกมจะแสดงผล UI หรือเปิดเสียงโฆษณาจะปรากฏขึ้น ผู้เล่นจะคลิกโฆษณาหรือปิดโฆษณาที่จุดเริ่มเกมได้ |
'start' |
เกมของคุณโหลดแล้ว UI สามารถมองเห็นได้และเปิดเสียง ผู้เล่นสามารถโต้ตอบกับเกม แต่การเล่นเกมยังไม่ได้เริ่มต้น
ตัวอย่าง: คุณแสดงหน้าจอการโหลดสั้นๆ "กําลังโหลด..." และมีการแสดงโฆษณาคั่นระหว่างหน้า โปรแกรมเล่นจะคลิกโฆษณาหรือปิดโฆษณาเพื่อให้เล่นเกมต่อได้
หมายเหตุ: preroll ทํางานแทนคุณมากกว่าตําแหน่ง start เล็กน้อย preroll รอให้ API เริ่มต้นทํางานและโหลดโฆษณาไว้ล่วงหน้าโดยอัตโนมัติ คุณควรใช้ preroll แทน start สําหรับโฆษณาแรกที่แสดงขณะที่เกมกําลังโหลดก่อนที่ UI จะแสดงผล start เป็นตําแหน่งที่ดีกว่าเมื่อ UI แสดงผลและผู้เล่นโต้ตอบกับเกมได้ นอกจากนี้ยังใช้ start ได้เมื่อเกมรีสตาร์ท ซึ่งอาจมีตําแหน่ง start ตําแหน่งต่อการโหลดหน้าเว็บ 1 ครั้ง หากตําแหน่งโฆษณา start เป็นตําแหน่งแรกในเกม (เช่น คุณไม่ได้ใช้ตําแหน่ง preroll ) คุณอาจต้องส่งคําขอให้โหลดโฆษณาล่วงหน้าด้วยตนเอง |
'pause' |
ผู้เล่นหยุดเกมชั่วคราว
ตัวอย่าง: ผู้เล่นหยุดเกมชั่วคราวและมีการแสดงโฆษณาคั่นระหว่างหน้า โฆษณาจะยังคงอยู่ในหน้าจอจนกว่าโปรแกรมเล่นจะปิด ตอนที่ผู้เล่นกลับมาเล่นเกมจะยังคงหยุดชั่วคราวอยู่ จากนั้น ผู้เล่นจะกลับมาเล่นเกมต่อและเล่นต่อได้ |
'next' |
ผู้เล่นจะไปยังระดับถัดไป
ตัวอย่าง: ผู้เล่นเพิ่งผ่านระดับ โดยแตะปุ่ม &การเสนอราคา ระดับถัดไป...&การเสนอราคา โฆษณาคั่นระหว่างหน้าจะปรากฏขึ้น ผู้ใช้จะดูโฆษณา ปิด และดําเนินการต่อไปยังระดับถัดไป |
'browse' |
ผู้เล่นสํารวจตัวเลือกนอกเกม
ตัวอย่าง: ผู้เล่นต้องการเปลี่ยนรูปแบบของตัวละคร และแตะปุ่ม &การเสนอราคา{0}ตัวเลือก..." แล้วแสดงโฆษณาคั่นระหว่างหน้า ผู้ใช้จะดูโฆษณา ปิด และไปยังตัวแก้ไขอักขระได้ |
'reward' |
ผู้เล่นถึงจุดในเกมที่จะมอบรางวัลได้
ตัวอย่าง: ผู้เล่นเพิ่งเสียชีวิตและหมดชีวิต และจะได้รับคะแนนโบนัสเป็นโบนัสในขั้นตอนนี้หากดูโฆษณา Ad Placement API เรียกใช้โค้ดเพื่อเสนอรางวัลแก่ผู้เล่น ผู้ใช้จะแตะปุ่มรางวัลเพื่อดูโฆษณาวิดีโอทั้งหมด พวกเขาจะได้ชีวิตใหม่และเล่นต่อ |
หมายเหตุ: ชุดของประเภทตําแหน่งนี้คือพื้นที่ของการพัฒนาที่ดําเนินการอยู่
หากคุณมีตําแหน่งในเกมที่ไม่เหมาะกับหมวดหมู่เหล่านี้เลย โปรดแจ้งให้ผู้จัดการฝ่ายดูแลลูกค้าของ Google ทราบ แล้วเราจะใช้ความคิดเห็นนี้เพื่อปรับหมวดหมู่เหล่านี้ต่อไป
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eAll calls to \u003ccode\u003eadBreak()\u003c/code\u003e require a placement type string describing the game's state when the ad is shown (e.g., loading, paused, reward offered).\u003c/p\u003e\n"],["\u003cp\u003eThe placement type impacts the ad experience (interstitial or rewarded) and the API's behavior, so accurate specification is crucial for optimal performance.\u003c/p\u003e\n"],["\u003cp\u003ePlacement types include \u003ccode\u003epreroll\u003c/code\u003e (before UI loads), \u003ccode\u003estart\u003c/code\u003e (after UI loads), \u003ccode\u003epause\u003c/code\u003e, \u003ccode\u003enext\u003c/code\u003e, \u003ccode\u003ebrowse\u003c/code\u003e, and \u003ccode\u003ereward\u003c/code\u003e, each with specific use cases.\u003c/p\u003e\n"],["\u003cp\u003eWhile the current placement types cover common scenarios, developers with unique placements should inform their Google Account Manager for potential refinements to the categories.\u003c/p\u003e\n"]]],["The `adBreak()` function requires a placement type string, which defines the game's state when an ad appears. Placement types include `'preroll'` (game loading, before UI), `'start'` (game loaded, UI visible), `'pause'` (game paused), `'next'` (level transition), `'browse'` (exploring non-gameplay options), and `'reward'` (player offered an in-game reward for watching an ad). The selected placement directly impacts ad type and API behavior. `'preroll'` preloads ads and is preferable for the first ad.\n"],null,["# Placement types\n\nAll calls to `adBreak()` must specify a placement type. This is a string that\ndescribes the state of your game when the ad will be shown. Is your game just\nloading? Has the player paused the game play? Or have they reached a point in\nyour game where they could be offered a reward?\n\nThe precise type that you use is important. As it can directly affect the kind\nof ad experience that will be shown (an interstitial versus a rewarded ad). But\nit can also have other less visible effects on behaviour of the API. It's\nimportant that you specify the placement type correctly so the API can work\noptimally.\n\n| Placement type | Description |\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `'preroll'` | Your game has not loaded its UI and is not playing sound. There can only be one 'preroll' placement in your game for each page load. **Example:** a player clicks on your game within a game catalogue. The game canvas is displayed, and before your game renders its UI or enables sound an ad is shown. The player can click on the ad or dismiss it at which point the game will start. |\n| `'start'` | Your game has loaded, the UI is visible and sound is enabled, the player can interact with the game, but the game play has not started yet. **Example:** You display a brief loading screen \"Loading...\" and an interstitial ad is shown. The player can click on the ad or dismiss it to continue to the game. **NOTE:** A `preroll` does quite a bit more work for you than a `start` placement. `preroll` waits for the API to initialise and automatically preloads ads. You should use `preroll` instead of `start` for the very first ad that's shown while your game is loading, before the UI has rendered. `start` is a better placement once your UI has rendered and the player is able to interact with the game. `start` can also be used when the game restarts---there can be multiple `start` placements per page load. If a `start` placement is the very first placement in your game (i.e. you don't use the `preroll` placement), you may need to [manually request that ads are preloaded](/ad-placement/docs/preload-ads). |\n| `'pause'` | The player pauses the game. **Example:** the player pauses the game and an interstitial ad is shown. The ad remains on the screen until the player dismisses it. When they return the game is still paused. The player can then resume the game and keep playing. |\n| `'next'` | The player navigates to the next level. **Example:** The player has just completed a level. They tap a button \"Next level...\" an interstitial ad is shown. They view the ad, dismiss it, and proceed to the next level. |\n| `'browse'` | The player explores options outside of the gameplay. **Example:** The player wants to alter the style of their character. They tap the button \"Options...\" an interstitial ad is shown. They view the ad, dismiss it, and proceed to the character editor. |\n| `'reward'` | The player reaches a point in the game where they can be offered a reward. **Example:** The player has just died and run out of lives. They are offered a bonus life at this point if they watch an ad. The Ad Placement API calls your code to offer the reward to the player. They tap the reward button and watch all of a video ad. They then receive a new life and keep playing. |\n\n**Note**: this set of placement types is an\narea of active development.\n\nIf you have placements in your game that don't naturally fit into one of\nthese categories, let your Google Account Manager know, and we will use this\nfeedback over time to refine these categories."]]