Analytics Events from Web Playable

What events are accessable from the Playable API?

Playable Events

EventDescription
game_load_startedTriggers when a player clicks 'start' or the game begins loading automatically.
game_loadedTriggers when the initial loading is complete. Requires implementation (Read more)
user_interactedTriggers when first player action is taken in-game. Requires implementation (Read more)
user_engagedTriggers when the player progresses in-game. Requires implementation (Read more).
purchase_startedTriggers when a user initializes a purchase.
purchase_completedTriggers when a user completes a purchase.
account_linkedTriggers when Pley Connect successfully links a mobile user to a Pley user.

Click here to jump the the properties of the web playable events.

Gameplay Events

These events are all optional and must be triggered using AnalyticsKit in the game code. If called from the Pley SDK AnalyticsKit, they'll be available on the game site for you to send to any analytics service (read more here).

EventDescriptionProperties
gameplay_analytics_initializedTriggered when you initialize AnalyticsKit, setting the basic user properties.username, level, application_version, custom_user_id, custom[]
gameplay_tutorial_advancedWhen the player advances a step in the tutorial.tutorial_step
gameplay_tutorial_completedWhen the player completes the tutorial.-
gameplay_tutorial_skippedWhen the player skips the tutorial.-
gameplay_level_advancedWhen the player advances a level (levels up or beats a mission, game dependent)level
gameplay_premium_spentWhen the player spends premium currency.name, amount, source, new_balance
gameplay_premium_gainedWhen the player gains premium currency.name, amount, source, new_balance
gameplay_resource_spentWhen the player spends game currency.name, amount, source, new_balance
gameplay_resource_gainedWhen the player gains game currency.name, amount, source, new_balance
gameplay_offer_shownWhen the player is shown an offer, deal, liveOps, or promotion.offer
Custom EventSet any game-specific custom event you need, and deliver it to your analytics services.name,parameters[]

Click here to jump to the properties of gameplay analytics.


Event Properties (Playable)

All Playable API Events

user_id (string) provides user identification for all users on Pley. Can be used to look for individual users, or to be provided for attribution services. This property is accessible for all Playable API events.

email_sha256 (string) provides the user email in a hashed format, to be provided to attribution services for user identification. Note that only logged-in sessions have access to emails. This property is accessible for all Playable API events.

purchase_completed

amount_usd (number) provides gross revenue for purchase_completed events. This value is before payment merchant fees, currency conversion costs, or Pley revenue splits. The data provided is converted into USD, regardless of the transaction currency.

product_id (string) provides the ID for the purchased product, letting you identify which product is bought with which purchase. ID matches those found in the Game Manager.

product_name (string) provides the name for the purchased product, letting you identify which product is bought with which purchase. The name matches those found in the Game Manager for the time of purchase.

account_linked

trigger shows where the Pley Connect account linking was initialized by the user, once they complete the account linking. Read more about Pley Connect here. It can have multiple different values:

  • game_site, Pley Connect initialized from a button on your game site.
  • in_game, Pley Connect is initialized by a QR code popup triggered by an in-web-game button.
  • direct_link, Pley Connect is initialized by clicking a direct link to the QR code page.
  • prompt, Pley Connect initialized by a popup prompt during gameplay/loading.
  • settings, Pley Connect initialized through account settings.
  • connect_code, Pley Connect initialized through input code from pley.com/connect

Event Properties (Gameplay)

gameplay_analytics_initialized

  • username, the visible username of the player.
  • level, the current level of the player.
  • application_version, current game version.
  • custom_user_id, the game's unique identifier, useful for tracking users across different platforms with account linking.
  • currencies[], an array containing the player currencies of your game. Each currency in the array has a name, amount, and a premium boolean.
  gameplay_analytics_initialize: {
    custom_user_id?: string;
    level?: number;
    application_version?: string;
    username?: string;
    currencies?: Array<{
      name: string;
      amount: number;
      isPremium: boolean;
    }

Additionally, you can use SetUserProperty to set custom user properties unique to your game.

  • custom[], use SetUserProperty-methods in the Pley SDK to set additional user properties (reference)

gameplay_tutorial_advanced

  • tutorial_step, which tutorial step was just completed.

gameplay_tutorial_completed

No properties.

gameplay_tutorial_skipped

No properties.

gameplay_level_advanced

  • level, the level which the player just achieved.

gameplay_resource/premium_spent/gained

  • name, the name of the currency.
  • amount, how much was spent/gained.
  • source, what it was spent on/gained from.
  • new_balance, how much of the currency the player has now.

gameplay_offer_shown

  • offer, which offer was shown to the player.

Custom Events

  • name, the name of the custom event.
  • parameters[], the parameters/properties of the custom event.

Implementation Example

export interface Events {  
  event_name: Empty;  
  purchase_completed: {  
    amount_usd: string;  
  };  
}