This article introduces the AdSense H5 Games Ads program, which enables you to grow your earnings by showing ads in your HTML5 (H5) games.
On this page
About H5 Games Ads
H5 Games Ads let you grow your earnings by showing ads in your HTML5 (H5) games. H5 games can run in web browsers and also in WebViews on native apps. H5 Games Ads use the new H5 Games Ad Placement API. After you integrate the API into your H5 games, we show ads at the best moments for your users.
Benefits of H5 Games Ads
The Ad Placement API lets you place the following high-performing formats within your H5 games:
High-performing formats
- Interstitials: Full-screen ads that are displayed at natural breaks in your game, such as between levels. Users can choose to either click these ads or return to your game.
- Rewarded: Ads that users can choose to interact with in exchange for in-game rewards.
H5 Games Ads formats support display ads and TrueView and Bumper video ads.
Simplicity
- H5 Games Ads use the AdSense code which means you can use the same ad code for your game ads and content ads.
- We've replaced the IMA SDK with a new H5 Games Ad Placement API that's easier to use and less prone to errors. For example, the new API uses a simple JavaScript object to describe ad placements and offers simple controls that let you adjust the frequency of ads that are shown to players. Learn more about the H5 Games Ad Placement API.
Cross-platform support
- H5 Games Ads support embedding your game into a page directly, as well as iframing your game into a different site.
- H5 Games Ads also support app integration with AdMob, so that you can monetize your game with app ads when your H5 game is hosted in the webview of a mobile app (Android support only).
With H5 Games Ads, your games will be able to show ads on your site, on a page, or within an app WebView—all from a single API.
How to show ads in your H5 game
To show ads in your H5 game, you need to:
- Integrate the Ad Placement API into your game. Refer to: Get started with the Ad Placement API.
- If your game is played in a mobile app, we recommend you set up your AdMob account for optimal user experience and performance.
Important: When you design your game to be embedded within an app and you own the app, or are entering into a revenue share agreement with the owner of the app, then the only way to do this in a high-performing and policy compliant way is to use this AdMob support for mobile apps.
- Add the AdSense code to your game page.
H5 Games Ads guidance
The following guidance is solely for the use of publishers participating in the AdSense H5 Games Ads program using the Ad Placement API.
Full screen ads
Full screen ads may be placed within H5 Games using the Ad Placement API via the adBreak() function. They should be displayed at natural transition points in the flow of an application, such as between activities or during the pause between levels in a game. These ad placements must comply with the following requirements:
Publishers are not allowed to use full screen ads:
- where the ad might be confused with the normal operation of the application or hosting page, for example:
- ads that appear before an application or a hosting page has opened–where the user may believe that clicking on the ad is part of the startup sequence of the app or hosting page
- ads that appear after the application has exited or the hosting page has closed
- that are triggered after a user closes another full screen ad.
- that appear unexpectedly while a user is viewing the application or web page’s content.
- that trigger after every user interaction.
- that interrupt the user during periods of continuous game play and heavy user interaction.
- that interfere with user navigation and interaction
Publishers of H5 Games may only use full screen ads:
- that appear between screens of an application or content pages,
- at transitions between a games catalog and the individual games
- that were created using
- the adBreak() function defined in the H5 Games Ad Placement API
For more information about our policies and tips for how to comply: