Skip to main content
Totem injects a small browser script into a valid build. You do not install it or add its tag yourself.

Injected tag

Totem places this tag before the closing </body>:
The script is served with the published build and connects game events to the trusted Totem shell.

Public object

The script exposes a frozen window.Totem object with two methods:
  • gameOver({ score })
  • event(name, props)
Use feature detection if your game also runs outside Totem:

Event path

Events travel game → SDK → postMessage → Totem shell → API. The game and overlay never call the ingest API directly. The shell owns the one trusted analytics and score-write path.

Included player features

A valid gameOver call can open Totem’s game-over screen, save a score, update the leaderboard, and keep Play again available. Do not send passwords, API keys, or private player information in custom event properties.