AdSense for games (AFG)

HTML5 game advertising migration guidelines

AdSense and Google Ad Manager provide support for HTML5 game advertising. These guidelines provide a number of resources to assist with the migration from Flash to HTML5 advertising.

Note: Support for AdSense for games in Flash is deprecated.

Integration options

Custom game launcher

If you've built your HTML5 game launcher from scratch, you need to integrate the IMA HTML5 SDK to continue monetizing with Google ads. Downloadable sample code is available to help you get started.

Use a VAST and VPAID 2 JS compliant video player

If you have a HTML5 video player that is VAST and VPAID 2 JS-compliant, you can continue to use AdSense for games ads using the IMA Adapter tag and appending the &type=js parameter (refer to the sample test tag).

Use a third-party HTML5 video player that supports the Google IMA HTML5 SDK

Many third-party players are already compatible with HTML5 and support video ads delivered by Google Ad Manager and AdSense for games. If you already work with a video player from one of our video technology partners, contact their support team to ensure you are configured for HTML5.

Creative trafficking

Google Ad Manager creative hosting and transcoding

Video creative assets that are uploaded to Ad Manager are automatically transcoded and hosted in HTML5 compatible formats including MPEG4 and WebM.

Policy reminder

AdSense policies state that ads must only be displayed when gaming content is present for every user. To ensure that users are only shown ads when game content is playable, we recommend that only HTML5 web games are monetized using the IMA HTML5 SDK.

Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue