Tipi di posizionamento
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Tutte le chiamate al numero adBreak()
devono specificare un tipo di posizionamento. Si tratta di una stringa che descrive lo stato del gioco quando l'annuncio viene mostrato. Il gioco si sta appena caricando? Il giocatore ha messo in pausa il gioco? O hanno raggiunto un punto in
il tuo gioco per poter offrire un premio?
Il tipo esatto che utilizzi è importante. In quanto può influire direttamente sul tipo di esperienza pubblicitaria che verrà mostrata (un interstitial rispetto a un annuncio con premio). Tuttavia, può anche avere altri effetti meno visibili sul comportamento dell'API. È importante specificare correttamente il tipo di posizionamento affinché l'API possa funzionare in modo ottimale.
Tipo di posizionamento |
Descrizione |
'preroll' |
Il gioco non ha caricato l'UI e non emette alcun suono. Per ogni caricamento della pagina nel gioco può essere presente un solo posizionamento "pre-roll".
Esempio: un giocatore fa clic sul tuo gioco all'interno di un catalogo. La tela di gioco viene visualizzata e prima che il tuo gioco visualizzi l'UI o attiva l'audio per un annuncio. Il giocatore può fare clic sull'annuncio o ignorarlo, al termine del quale inizierà il gioco. |
'start' |
Il gioco è stato caricato, l'UI è visibile e l'audio è attivato, il giocatore può interagire con il gioco, ma il gioco non è ancora iniziato.
Esempio: viene visualizzata una breve schermata di caricamento "Caricamento in corso..." e viene mostrato un annuncio interstitial. Il giocatore può fare clic sull'annuncio o ignorarlo per continuare a giocare.
NOTA: un preroll fa un po' più di lavoro per te rispetto a un posizionamento start . preroll attende l'inizializzazione dell'API e precarica automaticamente gli annunci. Devi utilizzare preroll anziché start per il primo annuncio pubblicato durante il caricamento del gioco, prima che l'UI venga visualizzata. start è un posizionamento migliore una volta che la tua UI è stata visualizzata e il giocatore è in grado di interagire con il gioco.
start può essere utilizzato anche al riavvio del gioco, con più caricamenti start per caricamento pagina. Se un posizionamento start è il primo posizionamento nel tuo gioco (ovvero non utilizzi il posizionamento preroll ), potresti dover richiedere manualmente che gli annunci vengano precaricati. |
'pause' |
Il giocatore mette in pausa il gioco.
Esempio: il giocatore mette in pausa il gioco e viene mostrato un annuncio interstitial. L'annuncio rimane sullo schermo finché il player non lo ignora. Quando torna, il gioco viene comunque messo in pausa. Il giocatore può quindi riprendere il gioco e continuare a giocare. |
'next' |
Il giocatore passa al livello successivo.
Esempio: il giocatore ha appena completato un livello. Toccano un pulsante "Livello successivo". Viene visualizzato un annuncio interstitial. Visualizzano l'annuncio, lo ignorano e passano al livello successivo. |
'browse' |
Il giocatore esplora alcune opzioni al di fuori del gameplay.
Esempio: il giocatore vuole modificare lo stile del suo personaggio. Toccano il pulsante "Opzioni". Viene visualizzato un annuncio interstitial. L'utente visualizza l'annuncio, lo ignora e passa all'editor dei caratteri. |
'reward' |
Il giocatore raggiunge un punto del gioco in cui può ricevere un premio.
Esempio: il giocatore è appena morto ed è esaurito. A questo punto viene offerta una vita bonus se guarda un annuncio. L'API Ad Placement chiama il tuo codice per offrire il premio al giocatore. Toccano il pulsante del premio e guardano tutti gli annunci video. Hanno poi una nuova vita e continuano a giocare. |
Nota: questo insieme di tipi di posizionamenti è un'area di sviluppo attivo.
Se nel tuo gioco sono presenti posizionamenti che non rientrano naturalmente in una di queste categorie, informa il tuo account manager Google che useremo nel tempo per perfezionare queste categorie.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 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."]]