GameAnalytics Integration for Mobile Games
GameAnalytics—specialized game analytics platform. Unlike Firebase or Amplitude, it's built around game data model from the start: progression events (level start/fail/complete), resource events (currency grant/spend), design events (arbitrary gameplay metrics). This eliminates designing event schema from scratch.
SDK Connection
Supports Unity, iOS (Swift/ObjC), Android (Kotlin/Java), React Native. For Unity—via Package Manager or .unitypackage:
using GameAnalyticsSDK;
public class GameManager : MonoBehaviour
{
void Awake()
{
GameAnalytics.Initialize();
}
}
Before calling Initialize(), GameAnalytics component must be in scene with Game Key and Secret Key from dashboard filled.
On iOS natively:
import GameAnalytics
GameAnalytics.configureBuild("1.0.0")
GameAnalytics.initialize(withGameKey: "GAME_KEY", gameSecret: "SECRET_KEY")
Key Event Types
Progression — level progression:
// Level start
GameAnalytics.NewProgressionEvent(
GAProgressionStatus.Start,
"world_1", "level_05"
);
// Fail with score
GameAnalytics.NewProgressionEvent(
GAProgressionStatus.Fail,
"world_1", "level_05",
score: 1240
);
GameAnalytics auto-builds progression funnel—shows where players drop off most.
Resource — economy:
GameAnalytics.NewResourceEvent(
GAResourceFlowType.Source,
"gold",
500,
"reward",
"daily_bonus"
);
GameAnalytics.NewResourceEvent(
GAResourceFlowType.Sink,
"gold",
200,
"upgrade",
"sword_level2"
);
Source is currency in, Sink is out. Dashboard builds economy balance: if Sink significantly outpaces Source, players run out and leave.
Design — everything else:
GameAnalytics.NewDesignEvent("Boss:Defeated:DragonKing", 1);
GameAnalytics.NewDesignEvent("Settings:SoundToggle", 0); // 0 = off
Automatic Metrics
GameAnalytics without code collects DAU/MAU, retention (Day 1, 7, 30), session length, crash reports (via native crash handlers). For iOS 14+ auto-enables SKAdNetwork support.
Important Implementation Details
Design event naming. Event string split by colons—these are hierarchy levels in dashboard. Boss:Defeated:DragonKing creates branch Boss → Defeated → DragonKing. Max 5 levels. Without structure, dashboard becomes flat list of hundreds.
Session end validation. GameAnalytics auto-closes session on app background via OnApplicationPause. Works reliably on Android. On iOS in certain scenarios (VoIP, Background Fetch) might not close. Add explicit call:
void OnApplicationPause(bool paused)
{
if (paused) GameAnalytics.StopSession();
else GameAnalytics.StartSession();
}
Free plan. GameAnalytics is free for most indie games—limits are high enough (500M events/month). Makes it attractive for projects without Amplitude/Mixpanel budget.
What's Included
- SDK connection (Unity / iOS / Android)
- Progression events for each game world and level
- Resource events for all currency sources and sinks
- Design events for key mechanics (bosses, items, settings)
- Data verification in GameAnalytics Dashboard
Timeline
Connection with basic event types: 0.5–1 day. Cost calculated individually.







