SDK docs

Getting started

Use one PlayKovo SDK in your HTML5 game. The same calls show mock ads locally, web ads in the PlayKovo player, and native mobile ads inside the PlayKovo app.

Revenue share is active

Integrating the SDK shows ads once your game is live, and you get 70% of the ad revenue on PlayKovo and 60% on our partner websites. Payments are made monthly once your balance reaches $100; smaller balances roll over to the next month.

Already integrated? Nothing breaks

SDK 2 keeps every v1 call (init, showInterstitial, showRewarded, cloudSave, storage) exactly as it was, and the script URL does not change. Games already live keep working without a new build. Pause, sound, gameplay and loading are optional additions you can adopt when you next update your game.

Quick start

  • Add the PlayKovo SDK script to index.html.
  • Call init() once before your main menu starts.
  • Call interstitial or rewarded ads only at natural game moments.
  • Recommended: follow pause/resume and mute/unmute, and report gameplay and loading.
  • Upload the same ZIP build to PlayKovo for review.

1. Add the SDK script

Place the script before your game scripts. This is the same official SDK for localhost, review, web launch, and mobile app launch.

HTML
<head>
  <script src="https://playkovo.com/sdk/playkovo-sdk.js" data-playkovo-sdk="v1"></script>
  <!-- your game scripts follow -->
</head>

Local preview check

Run your game from localhost, trigger an ad call, and a PlayKovo test ad (“Congratulations! You've set up … ads”) appears with a 10-second timer, so you can check your ad flow and callbacks. The same build calls native ads when opened inside the PlayKovo mobile app. If the console says PlayKovoSDK is undefined, the script was not loaded; do not add a game-owned mock or grant a fallback reward.

Mobile app setup (Android / iOS)

This is the whole mobile setup — the identical script tag from step 1 above, nothing added, nothing else to install:

HTML
<script src="https://playkovo.com/sdk/playkovo-sdk.js" data-playkovo-sdk="v1"></script>

No mobile-specific script, no second SDK, no if (isMobile) branch in your code. When this exact build runs inside the PlayKovo Android or iOS app, the SDK detects it and automatically routes showRewarded / showInterstitial to PlayKovo's native AdMob layer instead of web ads.

You never touch AdMob

You never receive an AdMob account, App ID, or Ad Unit ID. To get a game into the mobile app catalog: opt in to mobile distribution as a checkbox during submission, PlayKovo reviews the ad calls, then tests it in an Android/iOS debug build using Google's official test ad unit — no AdMob account needed on your end.

2. Initialize once

Await init before using the SDK. On local development it returns localPreview: true.

JavaScript
async function bootGame() {
  const status = await window.PlayKovoSDK.init();
  startMainMenu();
}

3. Show an interstitial

Use this after a level ends, when returning to a menu, or at another clear pause in gameplay.

JavaScript
await window.PlayKovoSDK.showInterstitial({
  placement: "level_complete",
  onClose: () => openNextLevel(),
  onError: () => openNextLevel(),
});

4. Show a rewarded ad

Only grant the reward from onReward. Never reward from the button click itself.

JavaScript
await window.PlayKovoSDK.showRewarded({
  placement: "continue_run",
  onReward: () => grantContinue(),
  onError: () => showRewardUnavailable(),
});

Local testing

When the game runs locally, PlayKovo shows a mock overlay: PlayKovo ads will display here when your game runs on playkovo.com.

5. Pause and sound

PlayKovo pauses your game during ads, while the app menu is open, when the tab is hidden and when the app goes to the background. The player and app also have a sound button. Follow these events so your game stops and goes quiet at the right time:

JavaScript
const sdk = window.PlayKovoSDK;
sdk.on("pause", () => { game.paused = true; });
sdk.on("resume", () => { game.paused = false; });
sdk.on("audio", ({ muted }) => { masterVolume = muted ? 0 : 1; });

Tell PlayKovo when the player is really playing and when your own loader is up:

JavaScript
sdk.loadingStart();      // your loading screen is visible
await loadAssets();
sdk.loadingFinished();   // the game is interactive

sdk.gameplayStart();     // a level or run begins
sdk.gameplayStop();      // menu, shop, pause or result screen

Optional, but subscribe only if you mean it

If you never subscribe to pause, PlayKovo freezes the page for you, as before. Once you subscribe, the platform trusts your game to pause itself. Full reference: JavaScript API.

Engine support

PlayKovo does not provide separate engine SDK packages. Unity, Godot, Construct, GDevelop, Cocos, and GameMaker all call the same browser global: window.PlayKovoSDK.

EngineHow it calls the SDK
HTML5 / JavaScriptScript tag + window.PlayKovoSDK
Unity WebGL.jslib bridge
Godot 4JavaScriptBridge
Construct 3JavaScript action
GDevelop 5JavaScript event
Cocos CreatorTypeScript service
GameMaker HTML5JavaScript extension

Stuck on your engine?

Ask your own AI assistant to write the integration

Opens the assistant with a ready-made SDK 2 prompt (ads, pause, sound, gameplay, saves), so it can write the exact integration code for your engine or language. Or copy the prompt and paste it anywhere.

We use optional cookies for site analytics and site advertising. You can change your choice later. Privacy policy.