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

NameTypeSelectBackend nameDescription
achievementIDstringRequiredachievement_idachievementID is an ID that represents the achievement.
achievementNamestringRequiredachievement_nameachievementName is the name of the achievement in the game.
additionalDataDictionaryOptionaladditional_dataAny additional information
rewardRewardRequiredrewardIf 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");