Clear search
Close search
Google apps
Main menu

AdSense for games (AFG)

AdSense for games overview

AdSense for games allows you to earn money from your web-based games. AdSense for games uses Google’s Interactive Media Ads (IMA) SDK, the technology used to request ads from within your Flash or HTML5-based game launcher. The Google IMA SDK allows developers to make ad requests to the AdSense network, interpret ad responses and render ads. Many of the leading gaming publishers use Google’s IMA SDK to request and display in-game ads.

Ad formats
Integration options
Additional resources


If you want to integrate AdSense for games into your Flash-based games, you’ll need to make sure that you adhere to the following prerequisites:

  • Ensure you're compliant with the AdSense program policies, including these specific games policies.
  • Utilize a game launcher capable of Google IMA3 SDK integration and/or compliant with VAST 3.0 and VPAID 2.0.
  • Utilize a HTML5 or Flash-based game launcher: AdSense for games is only available for Flash and HTML5-based web game content.
  • Have a high volume of games content, i.e., greater than 70% games content with over 1 million games impressions monthly.

Get started with AdSense for games

Back to top

Ad formats

The Google IMA SDK supports the following ad types:

  • Video: A video ad that appears while the game loads, between game levels or at the end of the game (i.e., pre-roll, mid-roll, post-roll).
    • Standard: Non-skippable video ads that can serve in pre-roll, mid-roll and post-roll slots.
    • TrueView: Skippable video ads that allow users to skip the ad after approximately five seconds. TrueView ads can serve in the pre-roll position or mid-roll in-between levels.
      TrueView skippable video ads are only available to AdSense for games publishers who meet additional policies. For more information, see the video-specific guidelines for AdSense.
    Example video ad

    Figure 1: Example of a video ad

    Example TrueView video ad

    Figure 2: Example of a TrueView video ad

  • Full-slot: A text, image, or rich media ad that usually appears while the game loads, between game levels or at the end of the game. Full-slot ads includes a countdown timer, visible ad text, and close button. The full-slot ad also automatically closes after displaying for 15 seconds.Example full-slot ad

    Figure 3: Example of a full-slot ad

Back to top

Integration options

You can choose the AdSense for games integration option that best suits your business model:

  • Direct integration (Flash or HTML5 games)

    To directly integrate with AdSense for games, you need to integrate either the IMA HTML5 SDK (JavaScript) into your HTML5 game launcher or the IMA Flash SDK (ActionScript 3) into your Flash game launcher.

    Your game launcher will need to be compatible with the respective technologies, as the IMA Flash SDK should only used to monetize Flash games and the IMA HTML5 SDK should only be used to monetize HTML5 games. You'll also need to be able to execute the code integration independently. The setup process page will help guide you through the required steps.

    For additional details about the IMA SDK, check out the IMA SDK developer site for API references, and advice on how to troubleshoot technical issues.

  • SWF Preloader integration

    The SWF preloader is a Flash object that you can display over the game frame area, which implements the request and rendering of AdSense for games ads. You'll need to remove the preloader object after the ad has been displayed, so your users can see and start playing the game. Google engineers have developed a sample IMA Flash SDK integration that you can use as a starting point to develop your own preloader solution for use with Flash games: preloader download page.

    Publishers looking to monetize HTML5 games may register their interest to use a simple solution, which does not require a custom IMA SDK integration.

Back to top

Additional resources

Back to top

Was this article helpful?
How can we improve it?
Sign in to AdSense

Sign in to AdSense to see help for your account

Don't have an AdSense account? Sign Up for AdSense!