Skip to content

Overview

Glance renders ads in a game using the Glance Monetization Library (MLib). Glance MLib is an Ad integration tool that connects Ad Libraries to the Ad slots in your games.

The major Ad Libraries are Google Publisher Tag (GPT), Meson Web, and Meson SDK. MLib can add more Ad Libraries if required. MLib eliminates the Game Developers’ efforts to integrate or update Ad Libraries into their games individually.

The tool publishes the ad automatically from an Ad Library based on availability. MLib helps you with an increased Ad Fill rate of the ad slots in your game.

Integration steps

1. Insert the MLib script

Insert the MLib script in the header tag of the index.html file of the game.

 <script type="text/javascript" src="./ads.js "></script>

2. Populate gameInput object

In the ads.js file, populate the gameInput object that contains gameName and publisherName. This object initializes Glance MLib.

    var gameInput = { gameName: '', publisherName: ''}
Key Mandatory/Optional Data Type Description
gameName Mandatory String
  • The name of the game you want to integrate with MLib.
  • Do not put a space in the name.
  • If your game has multiple words, start each word with a capital letter.
    Example: AngryBubble for “Angry Bubble”.
publisherName Mandatory String
  • The name of the game publisher.
  • Do not put a space in the name.
  • If the name has multiple words, start each word with a capital letter.
    Example: GameCompany for “Game Company”.

3. Load the ads on gameLoad

After the Success method, call the load ad or show ad methods along with options parameters.

replayInstance = window?.GlanceGamingAdInterface?.loadRewardedAd(replayObj, rewardedCallbacks);
rewardInstance = window?.GlanceGamingAdInterface?.loadRewardedAd(rewardObj, rewardedCallbacks);