Adding game into panel

This article is dedicated to new game adding and platform integrations. You can resort to it every time you need to add new game.

#Add the game into the control panel

1. To use the SDK features, you need to add the game into the panel. Fill in the project name and click Add game. You will be redirected to the just created project.

2. In the Project Settings section, you can select the default avatar generator. This step can be skipped. Here you can also add a Yandex.Metrica or Google Analytics counter.

#Local development

To get the script and use our API, you need to add your site address to Allowed origins. If you are developing locally, then add localhost with the specified port to the Allowed origins.

Go to the Allowed Origins block and fill in according to the screenshot example.

The Test flag means that the character will be marked as Test and will not be displayed on production origins. These two sources types exist separately from each other and do not overlap with data.

#Add the VK Games platform

Let’s start with Vkontakte. There are fewer problems with them. First, you need to add the platform to the project.

Scroll down to the Platform block and click Add Platform. Select VK Games.

1. You need to fill in the App ID and the Secret Key, for this go to the list of VK apps and select your application. Fill in the fields with the data marked on the screenshot.

2. Vkontakte requires the game to be uploaded to your hosting. We do not support hosting on our side as of yet, so you need to upload the game to any hosting. We use Hostland hosting services.

3. You need to add your site to Allowed origins. Go to the Allowed origins block (if you are adding manually) and click Add origin. Paste your website link. It can be the full path, we will process. For example, https://preview.eponesh.com/gamescore/c3/.

4. It remains to connect advertising. Vkontakte advertising is implemented on the side of the AppsCentrum service.

  1. Log in to your account and connect the game, to do this, select Media Adv, go to the Application tab.
  2. Select the type of application VK Mini App or the game on Direct Games.
  3. Click Add.

The VK Games platform setup is completed.

#Add the Yandex.Game platform

By analogy with VK, you need to add the Yandex.Games platform.

You can get the App ID from the game URL.

Getting Secret Key is more difficult. At the moment, there is only a duct tape with purchases. You need to go to the purchase section and add any purchase.

Then refresh the page and the Secret Key field will appear.

Add data and save the platform.

#Add the Sticky banner for Yandex.Game

Sticky banner is a banner at the screen bottom. It is always in the viewport. The banner can be set to auto-refresh frequency to change ads.

An example of a VK/Yandex sticky banner:

Unfortunately, there is still no sticky banner native support on Yandex.Games, but you can create an ad unit manually.

1. First, you need to go to the YAN panel and if you do not have an account, then register.

2. Add a new ad unit:

  • Go to the Products tab
  • Then to the RTB blocks
  • Click Add RTB block

2.1. Select the game platform and name the banner:

2.2. Select the mobile version of the site:

2.3. Customize the block design:

  1. Screen orientation – landscape
  2. Formats – adaptive
  3. Adaptive block height – 90px
  4. Save design

In the next configuration steps everything can be left by default.

2.4. You will be prompted to insert the code, or you can click the Get Code button. Find the banner ID in the code. It looks like R-A-1234567-3. Copy it.

3. Go to Ads section in our panel and select Sticky Banner.

  1. Insert banner ID
  2. Set the banner auto-refresh time

Don’t forget to save. Congratulations – the banner has been added!

#Add the OK Games platform

1. You need to fill in App ID and Secret Key. They are sent to the mail when registering the application in Odnoklassniki.

2. Odnoklassniki requires the game to be uploaded to your hosting. We do not support hosting on our side as of yet, so you need to upload the game to any hosting. We use Hostland hosting services.

3. You need to add your site to Allowed origins. Go to the Allowed origins block (if adding manually) and click Add origin. Paste your website link. It can be the full path, we will process. For example, https://preview.eponesh.com/gamescore/c3/.

4. OK Games advertising is implemented on the platform side and you do not need to add anything to panel.

The OK Games platform setup is completed.

#Add the GameMonetize platform

1. You only need to fill in the App ID. It is visible after creating a game.

2. An allowed origins will be created automatically.

3. Advertising is implemented on the platform side.

The GameMonetize platform setup is completed.

#Add the GameDistribution platform

1. You only need to fill in the App ID. It is visible after creating a game.

2. An allowed origins will be created automatically.

3. Advertising is implemented on the platform side.

The GameDistribution platform setup is completed.

#Add the CrazyGames platform

1. You just need to add the platform to the list, you don't need to fill in anything.

2. An allowed origins will be created automatically.

3. Advertising is implemented on the platform side.

The CrazyGames platform setup is completed.

#Add the SmartMarket platform

1. Create a smartapp on the developers.sber.ru

2. Add the Smartup Webhook in the Settings section

If you need only ads in the app, use the hook below:

https://smartapp-code.sberdevices.ru/chatadapter/chatapi/webhook/sber_nlp2/TAQKYcCq:fc53e1440f90ee439af4af4f6c6d1d62730228ab

If you need ads and in-game purchases, use GameScore's hook:

https://gs.eponesh.com/api/smartmarket/webhook

3. If you are using hosting link, then you need to add a query parameter to it with an explicit indication of the platform, to ensure platform recognition, including on the sber.ru portal:

?_platform=SMARTMARKET

4. Add platform to GameScore and enter smartup ID

It can be found in the following way:

Further instructions for those who want to connect payments

5. Add a SmartPay project

6. Get test token and service_id:

7. Specify them in the GameScore platform settings, as well as specify VAT:

There are 2 values available in the VAT (Tax type) list:
None - no VAT (STS) and Vat 20% - 20% VAT.
If you have a different VAT rate, please let us know.

The SmartMarket platform setup is completed.

#Connect the SDK to the game

To embed the SDK into your game, you need to add a script to the game’s index.html. The script can be found on the project page in the Install Code section.

Then declare a callback function to pass the SDK instance to. And then it’s up to you. The code below is given as an example; you can customize it by preference.

window.onGSInit = async (gs) => {
    const { player, ads } = gs;

    // Wait while the player syncs with the server
    await player.ready;
    // Show the ad preloader and wait until it ends
    await ads.showPreloader();
    // Show the sticky banner (then it will update itself)
    ads.showSticky();

    // You can start the game :)

    /**
    * Below you can see examples of functions for work with ads
    */

    // Call a fullscreen banner when the level is over
    // onLevelEnd();
    function onLevelEnd () {
        ads.showFullscreen();
    }

    // Player wants to get x5 reward for watching video
    // getX5Reward(500);
    async function getX5Reward (basicReward) {
        const success = await ads.showRewardedVideo();
        if (success) {
            // See out the video
            player.add('gold', 5 * basicReward);
        } else {
            // Doesn’t want to
            player.add('gold', basicReward);
        }
    }
};

It remains only to upload the game to the platforms and enjoy the result.
Good luck!