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
Already integrated? Nothing breaks
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.
<head>
<script src="https://playkovo.com/sdk/playkovo-sdk.js" data-playkovo-sdk="v1"></script>
<!-- your game scripts follow -->
</head>Local preview check
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:
<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
2. Initialize once
Await init before using the SDK. On local development it returns localPreview: true.
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.
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.
await window.PlayKovoSDK.showRewarded({
placement: "continue_run",
onReward: () => grantContinue(),
onError: () => showRewardUnavailable(),
});Local testing
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:
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:
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 screenOptional, but subscribe only if you mean it
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.
| Engine | How it calls the SDK |
|---|---|
| HTML5 / JavaScript | Script tag + window.PlayKovoSDK |
| Unity WebGL | .jslib bridge |
| Godot 4 | JavaScriptBridge |
| Construct 3 | JavaScript action |
| GDevelop 5 | JavaScript event |
| Cocos Creator | TypeScript service |
| GameMaker HTML5 | JavaScript 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.