How to Add Rewarded Video Ads to an HTML5 Game: SDK Guide
TL;DR
To add rewarded video ads to an HTML5 game: sign up with a web rewarded video network, drop its JavaScript SDK into your page, call the ad function from a player-initiated button, and grant the reward only inside the completion callback. Integration is usually an afternoon of work, not a sprint.
Unity Ads, AdMob, AppLovin and ironSource do not serve web inventory. Their SDKs are built for native iOS and Android apps, so a browser game cannot fill from them. AppLixir is a rewarded video platform built for the browser and does serve HTML5, WebGL and Canvas games.
Rewarded video on the web delivers $4+ CPM through AppLixir, against roughly $0.50–$2 for typical web display inventory — the same traffic, priced differently because the player opted in and watched.
Gate the reward on the SDK’s completion status, never on the button click, and validate completion server-side for anything with real economic value. Client-only rewards get farmed.
AppLixir ships TCF 2.3 / GDPR consent handling via Didomi, so European players are covered without you building a consent layer. The publisher threshold is 5,000 daily active users.
The hard part of adding rewarded video to an HTML5 game is not the code. It is finding a network that actually serves the browser, then wiring the reward to the right callback so players cannot claim it without watching. This guide covers both, with the integration steps in order, the pattern the code follows, and a plain answer on which networks work in a browser and which do not.
How do I add rewarded video ads to an HTML5 game?
Adding rewarded video ads to an HTML5 game takes five steps: pick a network that serves web inventory, register your game domain, load the SDK script, call the ad from a player-initiated button, and grant the reward in the completion callback. With AppLixir, publishers at 5,000+ daily active users can move through all five in a single working session.
Choose a web rewarded video network. This is the decision that actually gates the project. Most rewarded video SDKs are native mobile SDKs and will not run in a browser at all. See the next section for the comparison.
Register the game and its domain. You get an account ID and a zone (placement) ID. Web ad serving is domain-scoped, so register every domain the game is embedded on, including any staging host you test from.
Load the SDK. One <script> tag in the page that hosts your game, placed before your game bundle so the ad function exists by the time your UI can call it.
Add the opt-in surface. A button, not an automatic trigger. State the reward on the button: “Watch a video for 50 coins” converts far better than “Free coins”.
Handle every status, not just success. Completed, interrupted, blocked and no-fill each need a branch. A rewarded button that does nothing when there is no ad is worse than no button.
The AppLixir how-it-works page walks the same sequence with the current dashboard screens and parameter names, which is where you should confirm the exact option keys before you ship.
Do Unity Ads, AdMob or AppLovin work for HTML5 and WebGL games?
No. Unity Ads, Google AdMob, AppLovin and ironSource do not serve web inventory. Their SDKs are compiled for native iOS and Android builds, their demand is bought against mobile app placements, and there is no browser build to integrate. If you are searching for “unity rewarded ads” for a WebGL export, this is the wall you have hit: the Unity Ads package works in an Android or iOS player build and does nothing in a WebGL build.
This is a technical fact about where those networks operate, not a criticism of them. They are strong products in the environment they were built for. The problem is that HTML5 game developers keep being pointed at them by tutorials written for mobile, lose a day to a package that cannot fill, and conclude that rewarded video does not work on the web. It does — it just needs a platform whose demand is bought for browser placements.
Platform
Serves browser / HTML5?
Integration for a web game
Unity Ads
No — native iOS/Android only
Not available for WebGL builds
Google AdMob
No — native app SDK
Not available for HTML5 pages
AppLovin
No — native app SDK
Not available for HTML5 pages
ironSource
No — native app SDK
Not available for HTML5 pages
AppLixir
Yes — built for web
JavaScript SDK, one script tag plus a callback
Poki, CrazyGames and similar portals
Distribution, not a network you integrate
Complementary: they distribute your game; AppLixir monetizes the traffic you own
That last row matters. Distribution platforms like Poki and CrazyGames are not competitors to a rewarded video network — they are where a lot of web games find their audience, and they run their own monetization on their own domains. AppLixir sits alongside them, covering the traffic you control: your own site, your itch.io or Newgrounds build, your Telegram mini app, your embedded portal builds where monetization is yours to run. For a fuller breakdown of how the named mobile networks compare on format, demand and web support, see AdMob vs AppLovin vs Unity Ads vs ironSource.
What is a rewarded video ad in an HTML5 game?
A rewarded video ad is an opt-in video placement where the player chooses to watch a short spot — typically 15 to 30 seconds — in exchange for a specific in-game benefit, and receives that benefit only on completion. In an HTML5 game, the ad renders in an overlay or iframe above the Canvas or WebGL context, and the SDK reports back to your JavaScript when the view finishes, is interrupted, or fails.
The format’s value comes from the opt-in. The player asked for the ad, so the view is attentive rather than incidental, which is why rewarded inventory prices above display on the same traffic. It is also the only ad format that can make a game feel more generous rather than less: a continue after a death, a second spin, a doubled level reward. The developer’s guide to rewarded video ads covers the format’s mechanics in more depth, and rewarded vs interstitial covers why forced formats behave differently on retention.
Placements that work in HTML5 games
Continue / revive — offered at the fail state, when the player’s motivation to keep going is highest. Usually the highest-engagement placement in an arcade or IO game.
Reward doubling — “2x your level payout”. Costs you nothing real because the baseline economy still balances.
Soft-currency top-up — a capped daily amount of coins or energy, which keeps non-payers progressing without undercutting your IAP tiers.
Timer skip — one skip per session on energy or build timers.
Cosmetic or trial unlock — a skin for a session, a locked character for one run.
Rewarded video ads SDK: what the integration code looks like
A rewarded video ads SDK for HTML5 is a JavaScript library you load with a script tag. It exposes one function to request and show an ad, and one status callback your game listens to. There is no build step, no native plugin and no store submission — which is the practical advantage of web rewarded video over the native mobile equivalent.
Unity WebGL and other engine exports
For a Unity WebGL build, the rewarded call lives in JavaScript and is bridged into C# with a .jslib plugin: your C# code calls an external function, the plugin calls the SDK, and the status callback calls back into the game with SendMessage or an UnityInstance reference. That is the whole bridge — there is no Unity package to install, because the ad never leaves the browser layer. Adding rewarded ads to Unity WebGL in three steps has the plugin code. Phaser, PixiJS, Three.js, Godot HTML5 and Construct exports all follow the plain JavaScript pattern above, since your game code already lives in the page.
Reward validation: granting the reward without getting farmed
Reward validation means confirming an ad was genuinely completed before the player’s balance changes. In an HTML5 game the entire client is inspectable, so any reward granted purely in browser JavaScript can be called directly from the console. The size of that risk scales with what the reward is worth.
Client-side grant is acceptable for session-local, non-tradeable rewards: a revive in a single run, a cosmetic that resets on reload, a level-scoped bonus. The worst case is a player cheating themselves.
Server-side validation is required for anything persistent, tradeable, leaderboard-affecting or convertible to real value. Your server records the completion signal, then credits the account — the client never writes the balance.
Cap frequency per player per session regardless of validation. Caps protect your economy from the small minority of players who would watch dozens in a row, and they keep your placement’s engagement quality high.
Also watch the abuse case that has nothing to do with code: reward amounts so generous that watching ads becomes more efficient than playing. If ad-watching is the optimal strategy, you have built an ad clicker with a game attached, and retention goes with it. The guide to preventing rewarded ad fraud and reward abuse covers both sides — technical validation and economy design.
Are rewarded video ads GDPR compliant for players in Europe?
Rewarded video ads can be served compliantly to players in the EU and UK, but only if a valid TCF consent signal is collected and passed to the ad request. AppLixir has TCF 2.3 / GDPR compliance built in via Didomi, which means the consent management layer ships with the platform rather than being something you build, host and maintain yourself.
For an indie developer this removes a genuinely awkward chunk of work — a compliant CMP is not a weekend project. For a studio or enterprise publisher, it matters differently: the consent framework is already in place when legal review asks how European traffic is handled, and it is consistent across every domain your games are embedded on. If you already run a CMP on your site, the practical question at integration time is signal handoff, not duplication, and it is worth ten minutes with your existing consent configuration before you launch.
How much do rewarded video ads pay on HTML5 games?
AppLixir delivers $4+ CPM on web rewarded video, against roughly $0.50–$2 CPM for typical web display inventory. That gap is the whole argument for the format: the same player, the same session, priced several times higher because the view was requested and completed rather than scrolled past.
Your actual revenue is a function of three things you control and one you do not. The ones you control: how many daily active users you have, what share of them engage with a rewarded placement, and how many views each engaged player takes per session. The one you do not: geographic mix, since CPMs vary substantially by country. A rough model looks like DAU × engagement rate × views per engaged user × CPM ÷ 1,000, and it is worth building that spreadsheet before integration so you know whether the format moves your numbers meaningfully.
AppLixir’s minimum publisher threshold is 5,000 daily active users, and the platform serves 100M+ monthly impressions across web publishers. If you are below 5,000 DAU, the honest answer is that growth is the higher-leverage project this month, not monetization. For the full revenue math with worked examples, see how much rewarded video ads pay on web. [DATA NEEDED: current AppLixir web rewarded completion rate and engagement-rate benchmark by genre, with time window.]
When rewarded video ads are the wrong choice
Rewarded video is not universally correct, and the cases where it underperforms are predictable. Being clear about them saves you the integration day.
Sessions under about a minute with no fail state. If there is no natural moment where a player wants something, there is no placement. Hyper-short puzzle or clicker loops often have nowhere honest to put the offer.
Games with no reward economy at all. A pure narrative or sandbox game with nothing scarce cannot construct an incentive, and inventing a currency just to sell ads against it is the wrong order of operations.
Competitive games where the reward affects balance. If watching an ad grants a PvP advantage, you are selling wins. Restricting rewards to cosmetics, entries or currency that cannot be spent on combat power.
Below 5,000 DAU. Not a judgement on the game — just that the revenue at that scale rarely justifies the integration and economy-tuning time yet.
Premium or paid games where the purchase was the transaction. Adding ads afterwards reads as a broken promise.
Where rewarded video does fit, it usually fits as one layer rather than the whole plan. Most healthy web games run rewarded ads alongside in-app purchases, with the ad path serving the majority who will never pay and the IAP path serving the minority who will.
FAQ
How do I add rewarded video ads to an HTML5 game?
Sign up with a network that serves web inventory, register your game’s domain to get an account and zone ID, load the JavaScript SDK with a script tag before your game bundle, and call the ad function from a player-initiated button. Grant the reward only inside the SDK’s completion callback, and handle the interrupted, blocked and no-fill statuses explicitly. With AppLixir, publishers typically complete this in one working session.
Is there a rewarded video ads SDK that works in the browser?
Yes. AppLixir provides a JavaScript rewarded video SDK built for browser games — HTML5 Canvas, WebGL and Unity WebGL exports — loaded with a single script tag and driven by a status callback. The native mobile SDKs from Unity Ads, AdMob, AppLovin and ironSource have no browser build and cannot fill web placements, which is why a mobile integration tutorial will not get you there.
Do rewarded video ads work for content websites, not just games?
Yes, wherever the site has something to grant: an article unlock, a download, an extra tool use, a credit toward a feature. The mechanic is identical to a game’s — opt-in video, reward on completion — and the same $4+ CPM applies versus roughly $0.50–$2 for display on comparable traffic. Rewarded video ads for website monetization covers the non-game placements in detail.
What is a good eCPM for rewarded video ads on the web?
$4+ CPM is the level AppLixir delivers on web rewarded video, and it is a reasonable bar to judge a web placement against — several times the $0.50–$2 range typical of web display. Actual eCPM varies with geographic mix, seasonality and completion rate, so compare your own numbers period over period rather than against a single headline figure, and treat geography as the largest single variable.
The post How to Add Rewarded Video Ads to an HTML5 Game: SDK Guide appeared first on AppLixir – Rewarded Video Ad Monetization.
