Gaming Event Spec

This page defines the recommended event taxonomy for gaming products — covering web, mobile, and desktop games. The events span the player lifecycle from session start through progression, in-game economy, and social play.

All event names use snake_case. Use stable identifiers for game_id, level_id, item_id, and achievement_id — these will be used as join keys in your data warehouse. Avoid changing them once live.


Session

Events tracking game sessions from launch to close.

game_started

A player has launched the game and begun a session.

PropertyTypeRequiredDescription
game_idstringNoIdentifier for the game or game mode
game_versionstringNoApplication or build version (e.g. '2.4.1')
platformstringNoPlatform: 'web', 'mobile', 'desktop'
modestringNoPlay mode: 'single_player', 'multiplayer', 'co_op'
_df.track('game_started', {
  game_id: 'dungeon_quest',
  game_version: '2.4.1',
  platform: 'mobile',
  mode: 'single_player'
})

game_ended

A player’s session has ended.

PropertyTypeRequiredDescription
game_idstringNoIdentifier for the game
session_duration_secondsnumberNoTotal session length in seconds
reasonstringNoHow the session ended: 'completed', 'quit', 'disconnect'
_df.track('game_ended', {
  game_id: 'dungeon_quest',
  session_duration_seconds: 1842,
  reason: 'quit'
})

Progression

Events tracking player advancement through levels, achievements, and tutorials.

level_started

A player has begun a level or stage.

PropertyTypeRequiredDescription
level_idstringYesStable identifier for the level
level_namestringNoDisplay name (e.g. 'The Dark Cavern')
attemptnumberNoWhich attempt at this level this is (1 for first play, 2 for first retry, etc.)
_df.track('level_started', {
  level_id: 'world_2_level_4',
  level_name: 'The Dark Cavern',
  attempt: 1
})

level_completed

A player has successfully completed a level.

PropertyTypeRequiredDescription
level_idstringYesStable identifier for the level
level_namestringNoDisplay name
scorenumberNoScore achieved
starsnumberNoStar rating earned (0–3)
duration_secondsnumberNoTime taken to complete the level
attemptnumberNoWhich attempt number this completion was on
_df.track('level_completed', {
  level_id: 'world_2_level_4',
  level_name: 'The Dark Cavern',
  score: 48200,
  stars: 3,
  duration_seconds: 147,
  attempt: 2
})

level_failed

A player has failed a level.

PropertyTypeRequiredDescription
level_idstringYesStable identifier for the level
level_namestringNoDisplay name
scorenumberNoScore at point of failure
duration_secondsnumberNoTime played before failing
attemptnumberNoWhich attempt this failure was on
failure_reasonstringNoReason for failure (e.g. 'time_expired', 'no_lives', 'boss_defeated_player')
_df.track('level_failed', {
  level_id: 'world_2_level_4',
  level_name: 'The Dark Cavern',
  score: 12400,
  duration_seconds: 63,
  attempt: 1,
  failure_reason: 'no_lives'
})

achievement_unlocked

A player has unlocked an achievement or badge.

PropertyTypeRequiredDescription
achievement_idstringYesStable achievement identifier
achievement_namestringNoDisplay name (e.g. 'Speed Runner')
achievement_typestringNoCategory (e.g. 'speed', 'completion', 'social', 'collection')
pointsnumberNoPoints awarded for the achievement
_df.track('achievement_unlocked', {
  achievement_id: 'ach_speed_runner',
  achievement_name: 'Speed Runner',
  achievement_type: 'speed',
  points: 50
})

tutorial_started

A player has entered a tutorial sequence.

PropertyTypeRequiredDescription
tutorial_idstringNoIdentifier for the tutorial
_df.track('tutorial_started', {
  tutorial_id: 'tut_basic_controls'
})

tutorial_completed

A player has finished a tutorial sequence.

PropertyTypeRequiredDescription
tutorial_idstringNoIdentifier for the tutorial
duration_secondsnumberNoTime taken to complete the tutorial
skipped_stepsnumberNoNumber of steps the player skipped
_df.track('tutorial_completed', {
  tutorial_id: 'tut_basic_controls',
  duration_seconds: 95,
  skipped_steps: 0
})

tutorial_skipped

A player has opted to skip a tutorial.

PropertyTypeRequiredDescription
tutorial_idstringNoIdentifier for the tutorial
at_stepnumberNoStep number at which the player skipped (1-indexed)
_df.track('tutorial_skipped', {
  tutorial_id: 'tut_advanced_crafting',
  at_step: 3
})

Economy

Events tracking in-game purchases, item usage, and virtual currency flows.

Distinguish between real-money purchases (purchase_type: 'iap') and virtual currency transactions (purchase_type: 'virtual'). This separation is important for revenue reporting and App Store / Play Store reconciliation.

item_purchased

A player has purchased an item, either with real money or virtual currency.

PropertyTypeRequiredDescription
item_idstringYesStable identifier for the item
item_namestringNoDisplay name (e.g. 'Dragon Skin')
item_typestringNoItem category: 'weapon', 'skin', 'powerup', 'loot_box', 'currency_pack', or a custom value
pricenumberNoPrice paid
currencystringNoISO 4217 code for real-money purchases (e.g. 'GBP') or virtual currency name (e.g. 'gems')
quantitynumberNoQuantity purchased
purchase_typestringNo'iap' for real-money in-app purchase, 'virtual' for virtual currency spend
_df.track('item_purchased', {
  item_id: 'skin_dragon_red',
  item_name: 'Red Dragon Skin',
  item_type: 'skin',
  price: 4.99,
  currency: 'GBP',
  quantity: 1,
  purchase_type: 'iap'
})

item_equipped

A player has equipped an item to their character or loadout.

PropertyTypeRequiredDescription
item_idstringYesIdentifier of the equipped item
item_namestringNoDisplay name
slotstringNoEquipment slot the item was placed in (e.g. 'helmet', 'primary_weapon', 'character_skin')
_df.track('item_equipped', {
  item_id: 'skin_dragon_red',
  item_name: 'Red Dragon Skin',
  slot: 'character_skin'
})

currency_earned

A player has received virtual currency.

PropertyTypeRequiredDescription
currency_namestringYesName of the virtual currency (e.g. 'gems', 'coins', 'star_tokens')
amountnumberNoAmount earned
sourcestringNoHow the currency was earned: 'level_complete', 'daily_reward', 'achievement', 'purchase'
_df.track('currency_earned', {
  currency_name: 'coins',
  amount: 500,
  source: 'level_complete'
})

currency_spent

A player has spent virtual currency.

PropertyTypeRequiredDescription
currency_namestringYesName of the virtual currency
amountnumberNoAmount spent
item_idstringNoItem purchased with the currency
item_namestringNoDisplay name of the item purchased
_df.track('currency_spent', {
  currency_name: 'gems',
  amount: 200,
  item_id: 'powerup_shield_x3',
  item_name: 'Shield Pack x3'
})

Social

Events tracking multiplayer activity, friend interactions, and community features.

friend_invited

A player has sent a friend invitation.

PropertyTypeRequiredDescription
invitation_methodstringNoHow the invitation was sent: 'in_game', 'link_share', 'sms', 'email'
_df.track('friend_invited', {
  invitation_method: 'link_share'
})

match_started

A multiplayer match has begun.

PropertyTypeRequiredDescription
match_idstringNoUnique identifier for the match
match_typestringNoMatch type: 'ranked', 'casual', 'custom'
player_countnumberNoTotal number of players in the match
game_modestringNoIn-game mode or map (e.g. 'capture_the_flag', 'battle_royale')
_df.track('match_started', {
  match_id: 'match_9f3a2c1e',
  match_type: 'ranked',
  player_count: 10,
  game_mode: 'battle_royale'
})

match_completed

A multiplayer match has ended.

PropertyTypeRequiredDescription
match_idstringNoMatch identifier
outcomestringNoPlayer’s result: 'win', 'loss', 'draw'
scorenumberNoFinal score for this player
duration_secondsnumberNoTotal match duration in seconds
rank_changenumberNoChange in ranking points as a result of the match (can be negative)
_df.track('match_completed', {
  match_id: 'match_9f3a2c1e',
  outcome: 'win',
  score: 2840,
  duration_seconds: 624,
  rank_change: 18
})

leaderboard_viewed

A player has opened a leaderboard.

PropertyTypeRequiredDescription
leaderboard_idstringNoIdentifier for the leaderboard
scopestringNoLeaderboard scope: 'global', 'friends', 'regional'
_df.track('leaderboard_viewed', {
  leaderboard_id: 'ldr_season_3_ranked',
  scope: 'friends'
})