Logo

Player Events

Explanation of Events in the Playgent Player

Playgent 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:

  • PG_GAME_VIEW: Marks the view of a game when loaded.

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

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

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

  • PG_SHARE: (platform: clipboard, x, facebook, whatsapp) Triggered when a player shares their game progress or result across external platforms.

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

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

  • PG_REQUEST_STATS: Used to request gated access to the player stats. This can control who has permission to view stats data.

Note on Request Events

The Request events (like PG_REQUEST_ARCHIVE, PG_REQUEST_STATS and PG_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 Playgent’s integrations. Detailed documentation on gating features will follow in a separate section.