SDK

Analytics events

Smaz Games measures plays of every game and shows the totals on your dashboard. With the SDK you can add your own gameplay events. Games must not include analytics or tracking scripts of their own, including Google Analytics (gtag.js) and Google Tag Manager.

What the site measures for you

Open Stats on a game in the developer dashboard. Figures are totals for your own games only, over 7, 30 or 90 days, and refresh every few minutes.

FigureHow it is counted
Page viewsVisits to the game page
PlaysEach time the game is started in the player
PlayersDistinct browsers, not verified people
Play timeSeconds while the game is visible, not paused, in a supported orientation and, for SDK games, between gameplayStart and gameplayStop
Gameplay startsPlays where the SDK reported gameplayStart
DevicesDesktop or mobile, from the player's pointer type
CountriesFrom the network request. IP addresses are not stored
Session lengthsPlays grouped by length: under 1, 1–5, 5–15, 15–30 and over 30 minutes
New and returning playersWhether the browser had played the game before
Day 1 and day 7 returnShare of new players who came back one and seven days later

You never receive player names, emails or individual play records.

Custom events

OpenArcade.track('level_complete', { level: 3, seconds: 74, stars: 2 });
OpenArcade.track('tutorial_skipped');
OpenArcade.track('shop_opened', { from: 'pause_menu' });
RuleLimit
Event name1 to 40 characters: lowercase letters, numbers, _, starting with a letter
ParametersUp to 10 per event
Parameter namesSame rule as event names. game_id is reserved and added by the site
Parameter valuesNumbers, true/false, or strings up to 100 characters. Anything else is dropped
Rate60 events per minute per game frame. Extra events are rejected with status 429

Events are sent to the site's Google Analytics property with your game's ID. They are not sent from private previews or the SDK test game, and in local test mode they are only logged to the console in debug mode.

Events the site sends

EventWhen
game_launchThe player started the game
game_loadedYour game called loadingStop(). Includes load_ms
happy_momentYour game called happyMoment()

Your own Google Analytics property

If you want your game's events in your own Google Analytics 4 property, send its measurement ID (G-XXXXXXXXXX) through developer support. Once it is attached, your game's events and a page view for its game page are also sent to your property. Your property receives nothing else from the site.

What not to send

  • No personal data: no names, usernames, emails, player IDs, chat text, locations or device identifiers.
  • No free text typed by players.
  • No events that duplicate the site's own, such as a launch event.

Name events after what happened (level_failed, boss_defeated), and put details in parameters rather than in the name (level_complete with { level: 3 }, not level_3_complete).

Younger players

For signed-in players under 18, Google signals and ad personalisation are turned off for all events.