刊登位置類型
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
所有對 adBreak()
的呼叫都必須指定刊登位置類型。這個字串會在廣告顯示時說明遊戲狀態。你的遊戲是否正在載入內容?玩家是否暫停了遊戲?或者他們是否在遊戲中獲得了獎勵?
您使用的精確類型很重要。這類廣告可直接影響實際放送的廣告類型,包括插頁式廣告和獎勵廣告。但也可能影響 API 行為的其他可見度。請務必正確指定刊登位置類型,以便 API 達到最佳成效。
刊登位置類型 |
說明 |
'preroll' |
您的遊戲尚未載入 UI,且並未播放音效。遊戲中的每次網頁載入頁面只能有一個「片頭」刊登位置。
範例:玩家在遊戲目錄中點選您的遊戲。系統會顯示遊戲面板,且在遊戲轉譯 UI 或啟用廣告音效之前。玩家可點擊廣告,或是關閉遊戲的時間點。 |
'start' |
已載入您的遊戲,且 UI 已顯示且已啟用音效,玩家可與遊戲互動,但尚未開始遊戲。
範例:顯示簡短載入畫面「載入中...」,並顯示插頁式廣告。玩家可以點擊廣告或關閉廣告,以便繼續遊戲。
注意:與 start 刊登位置相比,preroll 的工作效果更好。preroll 會等待 API 初始化並自動預先載入廣告。您應使用 preroll ,而非 start ,以便在遊戲載入期間放送的第一則廣告顯示 (在使用者介面顯示之前)。start 您的 UI 顯示後,會是一個更好的刊登位置,且玩家能夠與遊戲互動。
start 你也可以在遊戲重新啟動時使用,而且每次載入網頁時也可以有多個 start 刊登位置。如果start 刊登位置是遊戲的第一個刊登位置 (亦即不使用 preroll 刊登位置),您可能需要手動要求廣告預先載入。 |
'pause' |
玩家暫停玩遊戲。
範例:玩家暫停玩遊戲,並顯示插頁式廣告。廣告會持續顯示在畫面上,直到播放器關閉為止。繼續玩遊戲時,遊戲仍會暫停。讓玩家繼續執行遊戲並繼續遊戲。 |
'next' |
玩家進入下一級。
範例:玩家剛完成一個關卡。使用者輕觸一個「下一步」按鈕,並顯示插頁式廣告。使用者觀看並關閉廣告,然後進入下一級。 |
'browse' |
玩家會探索遊戲過程以外的選項。
範例:玩家想修改角色的風格。使用者輕觸按鈕 [選項...],然後隨即顯示插頁式廣告。觀看者關閉廣告後關閉廣告,然後繼續前往角色編輯器。 |
'reward' |
在這類遊戲中,玩家可獲得點數以獲得獎勵。
範例:玩家剛死亡,即將失去生命。觀看廣告後,他們就會獲得額外獎勵。Ad Placement API 會呼叫您的程式碼,向玩家提供獎勵。他們輕觸獎勵按鈕並觀看所有影片廣告。他們會開始接受新的生命,並繼續遊戲。 |
注意:這組刊登位置類型是開發中的有效區域。
如果遊戲中的刊登位置無法自然融入上述任一類別,請通知 Google 客戶經理,我們會逐步參考這些意見回饋來調整這些類別。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\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."]]