MS Analytics
Loading...
Searching...
No Matches
MS Analytics Documentation

Requirements

  • Adjust SDK
  • Add AdjustSdk.Scripts asmdef to MSCore.Runtime
  • Add MaxSdk.Scripts asmdef to MSCore.Runtime

Hold / Release Events

  • MSCore will automatically hold events until release is called
  • Call MSAnalytics.ReleaseEvents(); immediately after Adjust.start()

Please note

  • Analytics class mostly unchanged so all events will be the same as Lion Suite
  • Obsolete methods have been removed
  • Manager window removed
  • Filtering is removed
  • Settings service removed
  • Modules services removed
  • Removed Firebase link.xml generation
  • MSApplicationHandler handles both core + analytics
  • Removed proguard builder generation

Setup Instructions

  1. Add config files at root
    You need to add 2 files at your user folder make sure when you add them put a dot(.) at the start of the file name so that OS will consider them hidden files (path to user folder for Mac OS /Users/<your user-name>) (path to user folder for Windows c:/users/<your user-name> ) place both file there.
    1. .npmrc
    2. .upmconfig.toml

    NOTE: MS packages are not public and you need proper authentication to access and use the packages.

  2. Add Mindstorm’s UPM Registry:
    • Open your Unity project and navigate to Edit > Project Settings.
    • Select Package Manager from the sidebar.
    • Click on Add under Scoped Registries and input the following details:
    Scoped Registries Screenshot
  3. Add Packages from Mindstorm’s Registry:
    1. In Unity, navigate to Window > Package Manager.
    2. Select My Registries from the dropdown menu in the Package Manager.
    3. Browse through the list of available packages and select from Mindstorm Studios.
    4. Select the MS Analytics package and click Install.
    Install MS Analytics

Quick Start

After Adjust is initialised in your game you need to call the following function to start sending events:

void PostMaxInit()
{
    ..........

    InitAdjust();

    ..........

    #if UNITY_ANDROID
    MSAnalytics.ReleaseEvents(ADJUST_CUSTOM_EVENT_KEY_AND);
    #elif UNITY_IOS
    MSAnalytics.ReleaseEvents(ADJUST_CUSTOM_EVENT_KEY_IOS);
    #endif

    ..........
}
  

You can call any analytics method in the MSAnalytics like following:

using MindstormStudios.Analytics;

.......

MSAnalytics.ItemCollected(reward, additionalData);
  

Events

  • Built-in Events
  • A custom event can be logged with a name along with additional params like following:
using MindstormStudios.Analytics;

.......

MSAnalytics.CustomEvent("My_Custom_Event_Name", additionalData);
  

Troubleshooting

How to verify events are being sent (e.g., logs, mock server)

When an event is sent you’ll see a debug on console like the following:

Event Debug Screenshot

Updating Package

To Update the package go to Package Manager > My Registries > MS Analytics and hit Update on the right side panel.

Update Package Screenshot

Documentation

Refer to this Notion Document for an enhanced version of these instructions:
Notion Doc Link