Documentation

Log Preset Events

Events offer you many hints about the way users interact with your app. This allows you to improve your campaigns in terms of acquisition, engagement and retention. While you are able to track custom events, we also offer out-of-box preset events to help guide you. The preset events we make available to you focus on a chain of events, known as a “conversion chain”. Conversion chains prove engagement and allow you to understand the events that could be optimized, and the places that could give you more opportunities to add further revenue triggers. Without tracking events which lead to conversions, you could lose on the data that informs critical decisions.

The bucket of areas that we focus preset events are:

  • Authentication & Registration
  • Interactions
  • Troubleshooting

Before You Begin

Make sure that you've set up your project and have your appGameId and apiKeys issued as described in Getting Started With Mikros Unity SDK.

Mikros Analytics

Once you have initialized the SDK, you can immediately start logging events for analytics. Make sure you have the following namespaces defined at the top of your scripts:

using MikrosClient;
using MikrosClient.Analytics;

Authentication & Registration

MIKROS SSO lets users register once to get access to all games in the MIKROS ecosystem who are also using MIKROS authentication and registration.

There are a few main benefits for users who interact with SSO.

  • Convenience: Users only need to remember one set of login details. Even sporadic users can remember how to log in; they just log into MIKROS. Also, this assists MIKROS technology in keeping track of users across all apps.
  • Transparency: Users know who is tracking information and what's being shared from one app to another. If users are not happy, they have the option to opt out.
  • Speed: With MIKROS SSO, users don't have to go through lengthy sign-up and authorization processes. MIKROS has already done all the email verification and data collection, new users can sign up as quickly as they can log into MIKROS.
  • Security: Users get the peace of mind that MIKROS continues to be the main point of trust, which allows the user to try your product without fear.

There are also a few main benefits for you and your business.

  • More Signups: MIKROS SSO provides a lower barrier of entry so new users can signup easily and securely, by relying on a known brand. Trust is increased, which increases conversions.
  • Less Backend Work: You won't have to futz around with passwords. While reducing your hack risk is important, even more important is not having to reset people's passwords every five minutes. All the authentication and password heavy-lifting is managed by a trusted authenticator.
  • Data Collection: You get to tap into more information about users because you are contributing and helping to build an ecosystem. It's all the benefits of data collection without all the hassle associated with it.
  • Reduced Risk: Finally, hackers have less incentive to hit your app if you don't host a ton of login details. You're also less likely to have a bunch of users with horribly weak passwords poking holes in your apps overall security.

Note: If using signin and signup from MIKROS, you do not need to call TrackSigninRequest() or TrackSignupRequeset(). These KPIs are automatically tracked for you. If using your own authentication and registration systems, you can use the trackers below.

Track Signin Request

Track user authentication.
Description Parameters Type Requirement
The platform or means which the user signed into e.g. Email, MIKROS, Google, Facebook, ect. Platform String Optional

Track Signin Request:

TrackSigninRequest.Builder()
.Platform(platform)
.Create(
trackSigninRequest =>
MikrosManager.Instance.AnalyticsController.LogEvent(trackSigninRequest),
onFailure =>
{
   // handle failure
});

Track Signup Request

Track user registration.
Description Parameters Type Requirement
The platform or means which the user registered e.g. Email, MIKROS, Google, Facebook, ect. Platform String Optional

Track Signup Request:

TrackSignupRequest.Builder()
.Platform(platform)
.Create(
trackSignupRequest =>
MikrosManager.Instance.AnalyticsController.LogEvent(trackSignupRequest),
onFailure =>
{
   // handle failure
});

Interactions

Tracking how users interact with your app helps you uncover vital insights. MIKROS can help you watch everything your users do in and out of your app. As well as find reproducible bugs fast, reveal edge case errors, and help you understand the most relevant areas of your app for your business bottomline; onboarding, engagement and monetization.

We provide a number of preset events to help guide you. These are events that we suggest you track to better understand your user behaviors.

Track Player Rating

Several methods exist for detecting hacking within mobile games. Hacking is typically used to level up a player's character faster than in normal game play. Additionally, gold-farming groups, which are malicious groups that use game hacking programs to gain illegal financial profits, are formed to monopolize in-game items and money.

Mobile game hacking can be classified into three types: automatic play using a macro, memory modification, and denial of service. While there are tools to identify these hacking methodologies, none of them are reliable. This results in users who weren't hacking being locked out of their favorite games and leaving due to frustration.

Many developers do not understand the importance of the MIKROS reputation scoring system until their game suffers from hackers and trolls. By then it's too late. You have lost money and your users are frustrated and have moved on.

It's not only important to capture toxic players, you have to also report them. Only through reporting can developers take a proactive approach to dealing with toxic players, as opposed to a reactive approach. With MIKROS, for the first time ever, developers know from the very start

what type of users they are dealing with. Building up a users' Reputation Score is equivalent in importance as building up a users' credit score. You not only report bad behaviors, but also good behaviors. Here are a few suggestions for the situations in which you would want to send player ratings to MIKROS.

  • No Hacks Detected: If you are using hack detection tools, you can reward users for not hacking. This will positively build up your users' reputation profile so that other developers know these users play games honestly.

    Note: We don't suggest sending a report with every session, although you can. Ideally, during this situation you want to send sampling sized reports. For example, for every 5, 10, or 20 sessions with no hacking detected then send a positive report to MIKROS about that particular user.

  • End Game Matches: After game matches you can send user submitted ratings of each other to MIKROS. The available reporting options are aligned with end of game matches. As users rate each other about hacking, trolling, or on the more positive side of being a MVP teammate, you can funnel these ratings into MIKROS to quickly establish users' Reputation Score.
  • Whistleblowers: Oftentimes hacking and trolling behaviors are reported directly to developers from users. Take these reports and send them to MIKROS. You are not only helping to protect users in your game, but you are protecting other developers as well.
Track Player Rating
Description Parameters Type Requirement
The participants whose behaviors are being recorded. Participant List Required
Participant
Description Parameters Type Requirement
A special name given to uniquely identify users. Username String Must provide username and/or email
The email of the user. Email String Must provide username and/or email

Track Player Rating:

List participants = new List();

// participant #1
Participant.Builder()
.Username(username)
.Email(email)
.Behavior(PlayerBehavior.CHEATING)
.Create(
participantRequest =>
{
   participants.Add(participantRequest);
},
onFailure =>
{
   // handle failure
});

// participant #2
Participant.Builder()
.Username(username)
.Behavior(PlayerBehavior.GREAT_LEADERSHIP)
.Create(
participantRequest =>
{
   participants.Add(participantRequest);
},
onFailure =>
{
   // handle failure
});

TrackPlayerRatingRequest.Builder()
.Participants(participants)
.Create(
playerRatingRequest =>
{
   MikrosManager.Instance
   .AnalyticsController
   .LogEvent(playerRatingRequest, response =>
   {
      STATUS_TYPE statusType = Utils.DetectStatusType(response.Status.StatusCode);
      if(statusType == STATUS_TYPE.SUCCESS)
      {
         // Player Rating submitted successfully
      }
      else if(statusType == STATUS_TYPE.ERROR)
      {
         // Error occurred during player rating submission
      }
      else
      {
         // Other StatusCode that is related to other types of errors
      }
   });
},
onFailure =>
{
   // handle failure
});

Track Content Share

Track any time users share content, screenshots or other forms of media in your app.
Description Parameters Type Requirement
The platform where content was shared e.g. Google, Facebook, ect. Platform String Required
The type of shared media e.g. Text, Image, Video, ect. ContentType ContentType Required

Track Content Share:

TrackShareRequest.Builder()
.Platform(platform)
.ContentType(contentType)
.Create(
trackShareRequest =>
MikrosManager.Instance.AnalyticsController.LogEvent(trackShareRequest),
onFailure =>
{
   // handle failure
});

Track Timed Events (Start)

Track the time it took for an action to occur, such as how long it takes to level, or the time it takes to unlock an item or achievement using TrackStartTimerRequest() and TrackStopTimerRequest().
Description Parameters Type Requirement
The name of the timed event. Event String Required

Track Timed Events (Start):

TrackStartTimerRequest.Builder()
.Event(eventKey)
.Create(
trackStartTimerRequest =>
MikrosManager.Instance.AnalyticsController.LogEvent(trackStartTimerRequest),
onFailure =>
{
   // handle failure
});

Track Timed Events (Stop)

Track the time it took for an action to occur, such as how long it takes to level, or the time it takes to unlock an item or achievement using TrackStartTimerRequest() and TrackStopTimerRequest().
Description Parameters Type Requirement
The name of the timed event. Event String Required

Track Timed Events (Stop):

TrackStopTimerRequest.Builder()
.Event(eventKey)
.Create(
trackStopTimerRequest =>
MikrosManager.Instance.AnalyticsController.LogEvent(trackStopTimerRequest),
onFailure =>
{
   // handle failure
});

Track Game Over

Track game overs; signals to the player that the game and an attempt of playing the level has ended.

Track Game Over:

TrackGameOverRequest.Builder()
.Create(
trackGameOverRequest =>
MikrosManager.Instance.AnalyticsController.LogEvent(trackGameOverRequest),
onFailure =>
{
   // handle failure
});

Track Level Start

Track when a level has started.
Description Parameters Type Requirement
The level number, e.g. level 1, level 2, level 3, ect. Level Long Required
The sub-level, e.g. level 1-1, level 1-2, level 1-3. SubLevel Long Optional
The name of the level. LevelName String Optional
The level description. Description String Optional

Track Level Start:

TrackLevelStartRequest.Builder()
.Level(level)
.SubLevel(subLevel)
.LevelName(levelName)
.Description(description)
.Create(
trackLevelStartRequest =>
MikrosManager.Instance.AnalyticsController.LogEvent(trackLevelStartRequest),
onFailure =>
{
   // handle failure
});

Track Level End

Track when a level has ended.
Description Parameters Type Requirement
The level number, e.g. level 1, level 2, level 3, ect. Level Long Required
The sub-level, e.g. level 1-1, level 1-2, level 1-3. SubLevel Long Optional
The name of the level. LevelName String Optional
The level description. Description String Optional
The time it took to complete the level. Duration Float Optional
True if the level was successfully completed, otherwise false. Success Boolean Optional

Track Level End:

TrackLevelEndRequest.Builder()
.Level(level)
.SubLevel(subLevel)
.LevelName(levelName)
.Description(description)
.Duration(Duration)
.Success(true) // true or false
.Create(
trackLevelEndRequest =>
MikrosManager.Instance.AnalyticsController.LogEvent(trackLevelEndRequest),
onFailure =>
{
   // handle failure
});

Track Level Up

Track when a user has advanced a level. This can also be useful for tracking skills. For example, if a user has added an attribute to a skill tree.
Description Parameters Type Requirement
The level number, e.g. level 1, level 2, level 3, ect. Level Long Required
The sub-level, e.g. level 1-1, level 1-2, level 1-3. SubLevel Long Optional
The name of the level. LevelName String Optional
The user or character that advanced a level. For example, this can be the username, the character class, or even a description of the character. Character String Optional
The level description. Description String Optional

Track Level Up:

TrackLevelUpRequest.Builder()
.Level(level)
.SubLevel(subLevel)
.LevelName(levelName)
.Character(character)
.Description(description)
.Create(
trackLevelUpRequest => MikrosManager.Instance.AnalyticsController.LogEvent(trackLevelUpRequest),
onFailure =>
{
   // handle failure
});

Track Post Score

Track the post result score after level completion.
Description Parameters Type Requirement
The score to track. Score Long Required
The level number, e.g. level 1, level 2, level 3, ect. Level Long Required
The sub-level, e.g. level 1-1, level 1-2, level 1-3. LevelName Long Optional
The name of the level. LevelName String Optional
The user or character that advanced a level. For example, this can be the username, the character class, or even a description of the character. Character String Optional

Track Post Score:

TrackPostScoreRequest.Builder()
.Score(score)
.Level(level)
.SubLevel(subLevel)
.LevelName(levelName)
.Character(character)
.Create(
trackPostScoreRequest => MikrosManager.Instance.AnalyticsController.LogEvent(trackPostScoreRequest),
onFailure =>
{
   // handle failure
});

Track Purchase

Note: Today, we only support purchases in USD currency. This means that all reported purchases will be assumed to be USD denomination. As our platform expands, we will support other forms of currency and currency conversions in the future.

Terms to Know
1. SkuType: The sku type e.g. currency, bundle, character skin, weapon, armor, ect.
2. SkuSubType: The sku sub-type is used to provide more detailed information about the item purchased. For example, let's say the sku type purchased was a weapon, and the sku sub-type is the name of the weapon like “Excalibur”.

Track purchase events.
Description Parameters Type Requirement
The sku name. This is the name of the item purchased. SkuName String Required

The purchase category represents the sku type and the sku sub-type.

For example, let's say you track PurchaseCategory.Currency. This represents the sku type. You can include more details about this sku by also specifying the sub-type of currency. For example, PurchaseCategory.Currency.Diamond.

Currency is the sku type and Diamond is the sku sub-type.

PurchaseCategory PurchaseCategory Required
In the case of a bundle or package purchased, you can list all of the items/resources purchased using PurchaseInfo. PurchaseDetails List Required
The amount of the purchase. PurchasePrice Floot Optional
The percent (%) discount of the purchased item. PercentDiscount Int Optional
The amount of items/resources awarded. AmountRewarded Int Optional
The description of the sku that was purchased. SkuDescription String Optional
TrackPurchaseRequest.PurchaseInfo
Description Parameters Type Requirement
The sku name. This is the name of the item purchased. SkuName String Required

The purchase category represents the sku type and the sku sub-type.

For example, let's say you track PurchaseCategory.Currency. This represents the sku type. You can include more details about this sku by also specifying the sub-type of currency. For example, PurchaseCategory.Currency.Diamond.

Currency is the sku type and Diamond is the sku sub-type.

PurchaseCategory PurchaseCategory Required
The description of the sku that was purchased. SkuDescription String Optional

Track Purchase:

PurchaseCategory primaryPurchaseCategory = PurchaseCategory.Currency.GOLD;
List purchaseDetails = new List ();
PurchaseCategory secondaryPurchaseCategory = PurchaseCategory.Currency.GOLD;
TrackPurchaseRequest.PurchaseInfo purchaseInfo = TrackPurchaseRequest.PurchaseInfo.Builder()
.SkuName(skuName)
.SkuDescription(skuDescription)
.PurchaseCategory(secondaryPurchaseCategory).Create();
purchaseDetails.Add(purchaseInfo);
TrackPurchaseRequest.Builder()
.SkuName(skuName)
.SkuDescription(skuDescription)
.PurchaseCategory(primaryPurchaseCategory)
.PurchasePrice(purchasePrice)
.PercentDiscount(percentDiscount)
.AmountRewarded(amountRewarded)
.PurchaseDetails(purchaseDetails)
.Create(
trackPurchaseRequest =>
MikrosManager.Instance.AnalyticsController.LogEvent(trackPurchaseRequest),
onFailure =>
{
   Debug.Log("Unrecognized Error Occurred");
});

Track Screen

Track visited screens.
Description Parameters Type Requirement
The name of the screen. ScreenName String Required
The class of the screen. ScreenClass String Optional
The time spent on the screen. TimeSpentOnScreen Floot Optional

Track Screen:

TrackScreenTimeRequest.Builder()
.ScreenName(screenName)
.ScreenClass(screenClass)
.TimeSpentOnScreen(timeSpentOnScreen)
.Create(
trackScreenTimeRequest =>
MikrosManager.Instance.AnalyticsController.LogEvent(trackScreenTimeRequest, response =>
{
   // handle success
}),
onFailure =>
{
   // handle failure
});

Track Tutorial Begin

Track the start of tutorial campaigns.

Track Tutorial Begin:

TrackTutorialBeginRequest.Builder()
.Create(
trackTutorialBeginRequest =>
MikrosManager.Instance.AnalyticsController.LogEvent(trackTutorialBeginRequest),
onFailure =>
{
   // handle failure
});

Track Tutorial Complete

Track the completion of tutorial campaigns.

Track Tutorial Complete:

TrackTutorialCompleteRequest.Builder()
.Create(
trackTutorialCompleteRequest =>
MikrosManager.Instance.AnalyticsController.LogEvent(trackTutorialCompleteRequest),
onFailure =>
{
   // handle failure
});

Track Unlocked Achievement

Track Unlocked Achievement
Description Parameters Type Requirement
List of unlocked achievements. Achievement List Required
Description Parameters Type Requirement
A unique id that represents the achievement that was unlocked. AchievementId String Required
The name of the unlocked achievement. AchievementName String Optional

Track Unlocked Achievement:

List achievements = new List();
Achievement.Builder()
.AchievementId(achievementId)
.AchievementName(achievementName)
.Create();
achievements.Add(achievement);

TrackUnlockedAchievementRequest.Builder()
.Achievements(achievements)
.Create(
trackUnlockedAchievementRequest => MikrosManager.Instance.AnalyticsController.LogEvent(trackUnlockedAchievementRequest),
onFailure =>
{
   // handle failure
});

Troubleshooting

You may not always know when users are experiencing an inordinate number of issues. MIKROS helps improve your app's performance by alerting you exceptions–unhandled or handled–or API failures occur.

Track Handled Exception

When an exception occurs the normal flow of your program is interrupted. It is important to capture these situations, even if you are handling them gracefully.
Description Parameters Type Requirement
The exception that occurred. Exception System.Exception Required

Track Handled Exception:

TrackHandledExceptionRequest.Builder()
.SetException(exception)
.Create(
trackHandledExceptionRequest =>
MikrosManager.Instance.AnalyticsController.LogEvent(trackHandledExceptionRequest),
onFailure =>
{
   // handle failure
});

Track HTTP Failure Request

Track when HTTP requests fail. In combination with tracking the success of HTTP requests, you will begin to understand how healthy your request stack and backend is.
Description Parameters Type Requirement
The url endpoint that failed. Url String Required
Conveys the results of a request. StatusCode Long Optional (Defaults to 500 if not provided)
Short descriptor of a request. Message String Optional
The network speed. NetworkSpeed String Optional

Track HTTP Failure:

TrackHttpFailureRequest.Builder()
.Url(url)
.StatusCode(statusCode)
.Message(message)
.NetworkSpeed(networkSpeed)
.Create(
trackHttpFailureRequest => MikrosManager.Instance.AnalyticsController.LogEvent(trackHttpFailureRequest),
onFailure =>
{
   // handle failure
});

Track HTTP Success Request

Track when HTTP requests succeed. In combination with tracking failed HTTP requests, you will begin to understand how healthy your request stack and backend is.
Description Parameters Type Requirement
The url endpoint that was successful. Url String Required
Conveys the results of a request. StatusCode Long Optional (Defaults to 200 if not provided)
Short descriptor of a request. Message String Optional
The network speed. NetworkSpeed String Optional

Track HTTP Success:

TrackHttpSuccessRequest.Builder()
.Url(url)
.StatusCode(statusCode)
.Message(message)
.NetworkSpeed(networkSpeed)
.Create(
trackHttpSuccessRequest => MikrosManager.Instance.AnalyticsController.LogEvent(trackHttpSuccessRequest),
onFailure =>
{
   // handle failure
});