playgen.io

Documentation

Player events

Events

Explanation of Events in the playgen.io Player

playgen.io offers various game events to help you understand player interactions and track engagement within each game. Below is an overview of each event type and its purpose:

  • PLAYGEN_GAME_STARTED: Marks the start of a new game session, tracking when a player begins gameplay.

  • PLAYGEN_GAME_RESET: Occurs when a player chooses to reset their current game, restarting from the beginning.

  • PLAYGEN_GAME_COMPLETED: Occurs when a player successfully completes a game, marking the end of gameplay.

  • PLAYGEN_SHARE_CLIPBOARD: Triggered when a player copies their game results or score to the clipboard for easy sharing.

  • PLAYGEN_SHARE_X: Triggered when a player shares their game progress or result across external platforms.

  • PLAYGEN_SHARE_FACEBOOK: Specific event for sharing the game result directly on Facebook.

  • PLAYGEN_REQUEST_ARCHIVE: Used to request gated access to the game archive. This event can be used to control access to archived games.

  • PLAYGEN_REQUEST_LEADERBOARD: Used to request gated access to the leaderboard. This can control who has permission to view leaderboard data.

Note on Request Events

The Request events (like PLAYGEN_REQUEST_ARCHIVE and PLAYGEN_REQUEST_LEADERBOARD) are particularly useful if you want to implement gated access to certain features. These events allow you to control access based on specific conditions or permissions, enhancing the flexibility of playgen.io’s integrations. Detailed documentation on gating features will follow in a separate section.

On this page