Introduction to

Web Monetization

in HTML5 Games

TPAC 2020

Andrzej Mazur@end3rEnclave Games
TPAC 2020, online, October 20th 2020

June 2019: W3C Games workshop

Indie perspective on Web games

2011 vs 2019

Two main issues:

  • Discoverability
  • Monetization


Web Monetization API

Many more

Monetized website

							  <meta name="monetization" content="$">
							  // ...

Real-time money transfer

$5 / month

Detecting active subscribers

Checking the state

							if(document.monetization && document.monetization.state === 'started') {
							  // do something

Listening for an event

							function startEventHandler(event) {
							  // do something
							document.monetization.addEventListener('monetizationstart', startEventHandler);

Extra content

Levels, points, coins, weapons, bonuses, etc...

No advertisements

  • No privacy issues
  • No spying on users
  • No selling data

Full control

  "Classic" publisher Web Monetization
Implementation: Complicated, changing code 1 line of HTML + 2 lines of JS
Income: Waiting months for reports Instant, streamed in real time

Finally, the "native"

monetization alternative!

Ender Efka @end3r