Planning

Successful game analysis requires up-front planning to ensure you implement the correct events and parameters. While every game is different, most games use the same core mechanics and features. We’ve tried to standardize the instrumentation process for consistency across all games. Talk with your Project Manager to list which events to integrate at each developmental stage or for help identifying the correct event and required parameters for your game mechanics. Please review all sections of this guide to familiarize yourself with our systems.

Events Overview

Lion - Analytics package provide many event types for tracking and analyzing aspects of your game.

Event Type Description
Ad

Use Ad events to track how players interact with ads (interstitials, rewarded videos, and banners) in your game and track ad performance throughout your game.

  • Example: A player is shown an interstitial ad.
  • Example: A player collects a reward after viewing a rewarded ad.

Learn more: Ad Events

Debug

Debug Events help you understand if some part of your game is causing crashes or acting unexpectedly. Use Debug events when players encounter errors, including the error message. These diagnostic events can help you see what is happening behind the scenes in your game (e.g., load time, network errors, etc.)

  • Example: You’ve hooked up a 3rd party service in your game, and now some players are reporting unexpected crashes.
  • Example: A level is taking far longer to load than expected.

Learn more: Debug Events

Economy

Use economy events to track In-App Purchases or when players gain, spend, or use in-game resources like currency or boosters. You can include extra information about the type of currency, screen, or area of the game where the transaction occurred.

  • Example: A player purchased a Hint booster with 100 coins.

  • Example: A player used a Double Coins booster before starting the next level.

  • Example: A player bought the No More Ads In-App Purchase.

Learn more: Economy Events

Experiment

Experiment events help you track players participating in A/B tests. Use A/B tests to optimize your game or when trying new features. Typical A/B tests will have a control group and one or more experimental variant groups to which players are assigned.

  • Example: You want to see if play time increases if the ball movement speed is increased by 10%.
  • Example: You want to see if players spend more money when you give them free gems every 10 levels or every 15 levels.

Learn more: Experiment Events

Game

Use Game events to track basic game features such as when players unlock achievements and features, use power-ups, and interact with UI elements (screens, popups, buttons).

  • Example: A player just unlocked the Incredible Matcher achievement.
  • Example: A player clicks on your logo on the credits screen.

Learn more: Game Events

Level

Use Level events to track when players start, finish, abandon, or restart levels in your game. In general, linear progression means players can only progress in a single order through sequentially numbered levels (e.g., Level 1, 2, 3, … n). Linear progression events are an excellent way to track where players drop off and time spent on a given level, etc. Think of linear progression events like a traditional funnel.

  • Example: A player has just started Level 1.
  • Example: A player has just completed Level 5.
  • Example: A player has failed Level 50.

Learn more: Level Events

Mission

Use mission events to track users’ progress that doesn’t require a pre-determined order. Quests, missions, tasks, and daily challenges are good mechanics to track with mission events.

  • Example: A player just started a quest to slay all rats in the basement of the local Inn.
  • Example: On their first try today, a player has completed the Daily Mission to collect as many coins as possible.

Learn more: Mission Events

Social

Use social events to track when players connect their social media accounts (e.g., FaceBook, Game Center, or Google Play), invite friends, or send gifts to other players.

  • Example: A player finishes the Login with Google process
  • Example: A player invites their friend to the game, and that friend accepts the invitation link.

Learn more: Social Events

Custom

Custom events are not recommended and shouldn’t be necessary. Our standard events (above) should cover all common use cases and game mechanics in mobile games. If your game has an unusual mechanic that doesn’t align with our standard events, please contact Support, and we will help you.

Learn more: Custom Events

Helper Methods

Many events have required and optional parameters. Rather than manually adding these parameters to every event you fire, these methods allow you to set the value once, and Lion - Analytics will automatically add to all events

Helper Methods for Common Parameters
Method Other Methods In addition, LionSDK can provide some interanl values you can use.
SetGlobalAdditionalData()

This method allows developers to add their own global parameter values that will be fired off with every subsequent event.

Learn more: Implementation: Helper Functions

ClearGlobalAdditionalData()

Clears an entry in the developer provided global additional data.

Learn more: Implementation: Helper Functions

SetPlayerLevel()

This method sets the global Player Level (account) value that will be attached to all events. It should be called anytime the Player Level changes.

  • Example: A player levels up and is now level 10.

Learn more: Implementation: Helper Functions

ClearPlayerLevel()

Clear a players level, and remove the tracking from other events.

Learn more: Implementation: Helper Functions

SetPlayerScore()

This method sets the global Player Score value that will be attached to all events.

  • Example: A player earns some stars and now has a score of 250.

Learn more: Implementation: Helper Functions

ClearPlayerScore()

Clear a players score, and remove the tracking from other events.

Learn more: Implementation: Helper Functions

SetPlayerXP()

This method sets the global Player XP (experience) value that will be attached to all events. It should be called anytime the Player XP changes.

  • Example: A player accomplishes something in-game, earns XP points and now has 10500 xp.

Learn more: Implementation: Helper Functions

ClearPlayerXP()

Clear Player XP.

Learn more: Implementation: Helper Functions

SetSoftCurrency()

This method sets the global Soft Currency Balance (virtual currency) value (wallet value) that will be attached to all events. It should be called anytime that virtual currency is spent or received.

  • Example: A player earns or purchases some coins and now has a balance of 150 coins.

Learn more: Implementation: Helper Functions

ClearSoftCurrency()

Clear Soft Currency.

Learn more: Implementation: Helper Functions

SetHardCurrency()

This methods sets the global Hard Currency Balance (real currency) value (wallet value) that will be attached to all events. It should be called anytime that real currency is spent or received.

  • Example: A player earns or purchases some gems and now has a balance of 25 gems.

Learn more: Implementation: Helper Functions

ClearHardCurrency()

Clear Hard Currency balance.

Learn more: Implementation: Helper Functions

SetTutorial()

Set Tutorial

  • Example: A just started a FTUE screen or sequence of steps.

Learn more: Implementation: Helper Functions

RemoveLevelAttemptTrackingData()

Clears internal attempt number tracking data for a specified level. You should not need this.

Learn more: Implementation: Helper Functions

RemoveMissionAttemptTrackingData()

Clears internal attempt number tracking data for a specified mission You should not need this.

Learn more: Implementation: Helper Functions

Other Methods

In addition, LionSDK can provide some internal values you can use.

Other Common Methods
Method Description
AbCohort()

The method should be fired every session. If a user is in multiple AB tests, the event should be fired multiple times. This will attach the cohort information to all events.

  • Example: A player is assigned to the control group in the interstitial_cooldown AB Test.

Learn more: Experiments

GetTotalTimeInApp()

Returns the time in app variable that is being tracked on to all LA events currently.

  • Example: You want to show a popup or unlock a feature 10 minutes into game play.

Learn more: Implementation: Helper Functions

SetWhitelistPriorityLevel()

Set Priority level for whitelisted countries to send events.

  • Example: You want to include less critical (lower priority) events in the player’s event stream.

Learn more: Implementation: Event Filter

AddWhitelistCountries()

Add to the list of whitelist countries to fire events.

  • Example: You are soft-launch in a country we don’t usually collect events. You add Turkey to the whitelist of geos for events.

Learn more: Implementation: Event Filter