Ads in Your Own HTML5 Game: Google H5 Games Ads and the Ad Placement API
Developers who host their own web game, or hand it to a site that just iframes it, keep asking which ad SDK to use, since AdMob only covers mobile apps (r/gamedev, "Which SDK for monetize HTML5 Games?"; r/gamedev, "Are web (HTML5) games dead at this point?"). Google's answer is H5 Games Ads. Here is what Google's own pages say. We have not run H5 Games Ads ourselves. Pages checked November 12, 2026.
1. What H5 Games Ads is
- Interstitial and rewarded ads for HTML5 games. Google's AdSense help page on H5 Games Ads says the program shows full-screen interstitials at natural breaks and opt-in rewarded ads, including display ads and video ads.
- It runs on the AdSense code. The same help page says you use the AdSense code, so one tag covers your game ads and any content ads, and that the Ad Placement API replaces the older IMA SDK for games.
- Works on your page, in an iframe, or in an Android app. Google says the ads work when the game is embedded directly, iframed into a different site, or shown in an app WebView with AdMob (Android only) (help page).
2. You have to apply
- Google's sign-up page calls H5 Games Ads "a by-application product" and links an application form.
- Approval is not guaranteed and depends on partner eligibility (sign-up page).
- You need an approved AdSense account to show ads in your H5 games (sign-up page).
3. What Google pays
- No published share for game ads. Google's AdSense revenue share page says publishers get 80 percent of the revenue for AdSense for Content, after the advertiser platform's fee, which works out to about 68 percent when advertisers buy through Google Ads. The same page says Google does not disclose the revenue share for all AdSense products. It does not list one for H5 Games Ads.
- Check your own account. The same page says your share is shown in AdSense under Account, Settings, Account information, next to "Active products".
- Platform partners take an extra cut. If your site is linked to an AdSense platform partner, there is another revenue share after Google's (same page). Portals like Lagged pay developers through AdSense this way.
4. How the API works
Google's Ad Placement API reference has just two functions, adBreak() and adConfig().
- Load the tag. The example implementation adds the AdSense script with your
data-ad-clientproperty code and a small snippet that definesadBreakandadConfig. Test locally through a web server, not by opening the file. - Test mode.
data-adbreak-test="on"turns on test settings. Google says to remove it before release (example). - adBreak() only offers a slot. The API decides whether an ad actually shows, based on the placement type, whether a suitable ad exists, consent settings, how many ads the player has seen and your frequency settings (API reference). Your game never knows in advance.
- Interstitials. Placement types include
start, and Google lists moments like game start or between levels. Pause and mute inbeforeAd(), resume inafterAd().adBreakDone()is always called, even when no ad showed (API reference). - Prerolls. A preroll is an interstitial before your UI loads. Only one can trigger per page load. Don't pass
beforeAd()orafterAd(); start the game fromadBreakDone()instead (API reference). - Rewarded ads. Use type
reward. Show your reward button only whenbeforeReward()fires, give the reward inadViewed(), and give nothing onadDismissed()(API reference). - iframes. If the game page with the ad tag is iframed into another page, add
allow='autoplay'to the iframe. Google says some ads need it (API reference).
5. Where ads are not allowed
Google's H5 Games Ads guidance says full-screen ads must use adBreak() and go at natural transitions, such as between levels or between your games catalogue and a game. It says not to show them:
- where they could be mistaken for the normal running of the game, such as after the game has exited
- right after the player closes another full-screen ad
- unexpectedly, after every interaction, or during continuous, heavy gameplay
- in a way that gets in the way of navigation
6. Before you apply
- Get your AdSense account approved first.
- Mark the natural breaks in your game and one place where a reward makes sense.
- Make sure the game pauses and mutes cleanly, and still works when no ad shows.
- If you also put the game on portals, most want their own SDK instead. See one HTML5 build, many portals.
Related
Web game earnings per 1,000 plays · Publish on Lagged · Publisher vs self-publishing · First players for your web game · Browse the directory
FAQ
Can I use AdMob in an HTML5 web game?
AdMob is for apps. For HTML5 games on the web, Google offers H5 Games Ads through the Ad Placement API, which uses your AdSense account. AdMob comes in only when the game runs inside an Android app WebView.
Do I need to apply for H5 Games Ads?
Yes. Google calls it a by-application product, approval is not guaranteed, and you need an approved AdSense account.
What revenue share does Google pay on H5 Games Ads?
Google does not publish one for H5 Games Ads. For AdSense for Content it says publishers get 80 percent after the advertiser platform fee, and it says you can see your own share in your AdSense account settings.
Does every adBreak() call show an ad?
No. Google says adBreak() only declares a place where an ad could show; the API decides based on ad availability, consent, frequency and your settings.
Sources checked 2026-11-12. Terms you sign override this page. Spot an error? Report a correction.