Achievement

Introduction

  • Backend Name: achievement

  • Description: The player completed an achievement. This event can also record the rewards for this achievement.

  • Event Type: Game

  • Priority: P3

Parameters

Name Type Select Backend name Description
achievementID string Required achievement_id achievementID is an ID that represents the achievement.
achievementName string Required achievement_name achievementName is the name of the achievement in the game.
additionalData Dictionary Optional additional_data Any additional information
reward Reward Required reward If rewards are given to the player at the time of the event, the reward object is used to track the items (e.g., boosters, coins, gems, etc) or currencies gifted or earned by the player to the player.

Code example:

Product product = new Product();
product.virtualCurrencies = new List<VirtualCurrency>
    { new VirtualCurrency("coins", "gold", 100) };
Reward reward = new Reward(product);

LionAnalytics.Achievement(reward, "StarsCollect50", "Collect 50 Stars");