Display Ads - GameDistribution/GD-HTML5 GitHub Wiki

To be able to use display ads feature of SDK, firstly, SDK Integration is supposed to be handled. Follow the instructions in here.

Display Ads

A display(banner) ad is a particular kind of online advertising resource that often shows up at the top or side of a webpage. It is an HTML construct that displays a given advertisement and, when clicked, takes the user to the advertiser's site.

The display ad sizes SDK supports are:

  • 336x280
  • 300x250
  • 970x250
  • 728x90
  • 120x600
  • 160x600

Usage

  1. Create a container inside your game and give it an id.
  2. Make size of the container, whatever you desire.
  3. SDK will put the appropriate ad into it. (One of sizes SDK support and fits inside your container)
 window.gdsdk
           .showAd(window.gdsdk.AdType.Display, { containerId: "CONTAINER_ID_TO_PUT_AD_IN"})
               .then(() => console.info('showAd(window.gdsdk.AdType.Display) resolved.'))
               .catch(error => console.info(error));

There is no limit to ad slots. You can create many containers to show display ads. All you need is new container with an id. To refresh ad, same method can be used to request fresh one.

Best Practices

Placing the ad into the main page or splash screen of your game is not a bad idea.

300x250

728x90