GameAnalytics Unity SDK Setup Guide: Events, Funnels & Retention Tracking
Shipping a Unity mobile or WebGL game without structured telemetry leaves product and engineering teams guessing why players churn. Total install counts tell you nothing about whether players are stalling on step 3 of your First-Time User Experience (FTUE), running out of soft currency on Level 8, or encountering an unhandled exception on low-RAM Android devices.
The GameAnalytics Unity SDK provides a lightweight, event-batched telemetry pipeline purpose-built for games. Out of the box, it captures session duration, Day 1 (D1), Day 7 (D7), and Day 30 (D30) retention cohorts, and exposes six core event schemas in C#: Progression, Resource, Business, Ad, Design, and Error events.
This engineering guide walks through installing the current GameAnalytics Unity SDK, configuring the Settings asset, implementing a production-grade C# telemetry wrapper, instrumenting onboarding and level funnels, validating receipts, and debugging event payloads before launch.
Building a commercial Unity mobile or browser game? See how we instrumented progression and economy telemetry in our Bird Sort Mania 20-Day Unity Case Study, or explore our Unity Game Development Services.
1. Core Telemetry Schemas & What Each Event Measures
Before writing C# instrumentation, map each product question to the correct GameAnalytics event type. Using NewDesignEvent for everything is one of the most common mistakes in Unity projects—it bypasses built-in progression win-rate matrices, economy Sink/Source graphs, and revenue conversion tables.
| Product / LiveOps Metric | GameAnalytics SDK Method | Required Parameters | Engineering & Design Use Case |
|---|---|---|---|
| D1 / D7 / D30 Retention | Automatic session heartbeat after GameAnalytics.Initialize() | Valid Game Key, Secret Key, and Build string | Measure cohort stickiness after FTUE and meta-loop changes |
| FTUE & Tutorial Funnel | GameAnalytics.NewDesignEvent(eventId, value) | Colon-delimited hierarchy (FTUE:01_Boot, FTUE:02_FirstSort) | Pinpoint exact onboarding step where new installs abandon the session |
| Level Win Rate & Attempts | GameAnalytics.NewProgressionEvent(status, p01, p02, p03, score) | GAProgressionStatus.Start, Complete, or Fail + up to 3 hierarchy strings | Detect difficulty spikes via automatic attempt-to-complete ratios |
| Virtual Economy Balance | GameAnalytics.NewResourceEvent(flowType, currency, amount, itemType, itemId) | GAResourceFlowType.Source (earned) or Sink (spent) + registered currency | Audit soft/hard currency inflation and booster consumption per level |
| IAP Revenue & ARPDAU | GameAnalytics.NewBusinessEvent / NewBusinessEventIOS / NewBusinessEventGooglePlay | ISO 4217 currency ("USD"), amount in integer cents (499), itemType, itemId, cartType | Track verified gross revenue, paying user conversion, and store placement performance |
| Ad Impressions & eCPM Context | GameAnalytics.NewAdEvent(adAction, adType, adSdkName, adPlacement) | GAAdAction (Show, Clicked, RewardReceived, FailedShow) + GAAdType | Correlate rewarded video and interstitial frequency with session length |
| Runtime Stability | GameAnalytics.NewErrorEvent(severity, message) | GAErrorSeverity (Debug, Info, Warning, Error, Critical) | Surface non-fatal C# exceptions and asset loading failures by build version |
2. Installing & Configuring the GameAnalytics Unity SDK
Step 1: Package Installation
You can install the GameAnalytics Unity SDK via the Unity Package Manager (UPM), OpenUPM, or the official .unitypackage release from the GameAnalytics Unity SDK documentation:
- Ensure Unity's External Dependency Manager for Unity (EDM4U) is present if targeting Android (
build.gradleresolution) and iOS (PodfileCocoaPods resolution). - Import the GameAnalytics SDK package into your project.
- Open the configuration inspector via Window > GameAnalytics > Select Settings. This creates
Assets/Resources/GameAnalytics/Settings.asset.
Step 2: Platform Keys & Build Versioning
Inside the Setup tab of the GameAnalytics Settings inspector:
- Add Platforms: Select your target platforms (
Android,iOS,WebGL,Windows, etc.) and paste the Game Key and Secret Key generated in your GameAnalytics organization dashboard for each platform. - Build Version: Either bind the build version dynamically (
Use Player Settings Build Versionon iOS/Android) or specify a semantic version string (major.minor.patch, such as1.2.0). Filtering telemetry by build version is essential when verifying whether a patch fixed a level spike or crash.
Step 3: Pre-Registering Resource Currencies, Item Types & Custom Dimensions
GameAnalytics enforces a strict client-side schema whitelist for virtual economy and custom dimension tags. In Window > GameAnalytics > Select Settings > Setup, configure these lists before calling them in code:
- Resource Currencies (up to 20 allowed, ASCII letters only): e.g.,
Coins,Gems,Energy. - Resource Item Types (up to 20 allowed): e.g.,
Booster,Skin,LevelReward,IAPPack,Revive. - Custom Dimensions 01 / 02 / 03 (up to 20 predefined strings per dimension): Useful for cohort segmentation such as
Control_GroupvsVariant_FastTutorialor device RAM tiers (LowRAM,MidRAM,HighRAM).
3. SDK Initialization & Privacy / ATT Order of Operations
The GameAnalytics SDK must be initialized once per application launch in a persistent bootstrap scene before any gameplay or menu events fire.
If you need to override build versions, register resource currencies dynamically via code, set a custom user ID, or request iOS App Tracking Transparency (ATT) authorization, those calls must happen before GameAnalytics.Initialize().
4. Instrumenting Progression Events (NewProgressionEvent)
Progression events measure player movement through sequential content (worlds, chapters, levels, or stages). They support up to three hierarchical location parameters (progression01, progression02, progression03) and three states:
GAProgressionStatus.Start: Fired when a level attempt begins.GAProgressionStatus.Fail: Fired when the player loses, runs out of moves/time, or abandons an active attempt.GAProgressionStatus.Complete: Fired when the player wins the level (optionally passing an integerscore).
Critical Progression Rules
- Always pair
Startwith eitherCompleteorFail: When a player restarts a level mid-attempt, fireGAProgressionStatus.Failfor the aborted run before firingGAProgressionStatus.Startfor the new attempt. Otherwise, GameAnalytics leaves the previous attempt dangling and skews attempt-per-completion calculations. - Zero-pad level numbers: Format level identifiers as
Level_001,Level_002, ...,Level_010($"Level_{levelIndex:D3}") so alphabetical sorting in dashboards matches numerical order.
5. Tracking Virtual Economy (NewResourceEvent) & IAP Revenue (NewBusinessEvent)
Virtual Currency Sources & Sinks
Whenever a player earns currency (GAResourceFlowType.Source) or spends currency (GAResourceFlowType.Sink), record a resource event. Comparing daily Source vs Sink totals per level reveals whether your economy is inflating (players hoarding coins with nothing meaningful to buy) or starving (players hitting hard paywalls too early).
Real-Money In-App Purchases (NewBusinessEvent)
To measure true ARPDAU, ARPPU, and conversion rates without spoofing from modded APKs, wire NewBusinessEvent into your Unity IAP purchase confirmation handler after receipt extraction. For a complete store subsystem walkthrough, see our Unity IAP 5 Setup Guide.
6. Onboarding Funnels, Ad Telemetry & Error Tracking
Designing an FTUE Onboarding Funnel for D1 Retention
Day 1 retention is heavily governed by the first 5 minutes of gameplay. By structuring NewDesignEvent calls with numbered step prefixes, you can build an ordered funnel in the GameAnalytics Funnels tool to measure completion rates between every micro-interaction:
FTUE:01_SceneLoadedFTUE:02_TutorialPromptShownFTUE:03_FirstInteractionCompletedFTUE:04_Level1CompletedFTUE:05_ClaimedFirstRewardFTUE:06_StartedLevel2
For a deep dive into building multi-step onboarding funnels and cohort A/B tests, read our 3-part engineering series:
- Part 1: Onboarding Funnel Architecture & Event Taxonomy
- Part 2: C# Drop-Off Telemetry & Local State Persistence
- Part 3: Funnel Visualization, A/B Testing & D1 Retention
Ad Impressions (NewAdEvent) & Error Events (NewErrorEvent)
When monetizing with Unity LevelPlay Mediation or Unity Ads, log ad lifecycle actions and runtime errors so you can see whether rewarded ads lift retention or whether ad SDK timeouts cause drop-off:
7. Testing, Live Feed Validation & Common Implementation Mistakes
Before submitting a build to Google Play, the App Store, or a WebGL portal, validate your event payloads end to end:
- Enable Info & Verbose Logging in Editor:
In Window > GameAnalytics > Select Settings > Advanced, enable Info Log Editor and Info Log Build (and Verbose Log during staging). In the Unity Console and
adb logcat/ Xcode console, verify lines readingInfo/GameAnalytics: Event queue: Sending X events.with HTTP200 OKresponses. - Inspect the Realtime Live Feed:
Open your GameAnalytics dashboard and navigate to Live Feed. Trigger
Start,Complete,Fail,Source,Sink, andFTUEevents on a test device and confirm each event parses without schema warnings.
Common Implementation Mistakes to Avoid
| Mistake | Why It Breaks Telemetry | Engineering Fix |
|---|---|---|
Firing events in Awake() before GameAnalytics.Initialize() | Multiple Awake() execution order races cause early FTUE events (FTUE:01_Boot) to be silently discarded | Centralize initialization in a bootstrapper scene or use Unity's Project Settings > Script Execution Order |
Embedding colons inside NewProgressionEvent strings | Progression events already take progression01, progression02, progression03 as separate arguments | Pass "World_01", "Level_001" as separate parameters rather than "World_01:Level_001" |
Passing dynamic timestamps or GUIDs into NewDesignEvent IDs | Generates thousands of unique event nodes (e.g., LevelTime:14.23s), hitting cardinality limits | Pass the metric name as the hierarchy ("LevelDuration:World_01:Level_001") and the numeric duration as the second float value parameter |
Passing dollar floats to NewBusinessEvent | Passing 4.99f truncates or logs 4 cents (\$0.04), underreporting revenue by 99% | Multiply price by 100 (Mathf.RoundToInt(price * 100f)) to pass integer cents (499) |
| Unregistered Resource currencies or ItemTypes | NewResourceEvent rejects any currency/itemType not declared in Settings.asset | Audit Window > GameAnalytics > Select Settings > Setup before every release build |
Frequently Asked Questions
Related Engineering Guides & Services
- Unity 6 Crash Analytics & Debugging Guide: Crashlytics, ANRs & IL2CPP Symbols — Combining GameAnalytics error events with Firebase Crashlytics and Android ANR debugging.
- Unity Onboarding Funnel Tracking with GameAnalytics (Part 1) — Designing a zero-blind-spot FTUE taxonomy.
- Unity IAP 5 Setup Guide: In-App Purchases in C# — StoreController setup, receipt validation, and purchase restoration.
- Unity Ad Monetization with LevelPlay: eCPM & ARPDAU (Part 3) — Balancing ad frequency against D1/D7 retention.
- How I Built Bird Sort Mania in Unity in 20 Days — Full production case study covering telemetry, level balancing, and hybrid monetization.
- Unity Game Development Services & Mobile Game Development Services — Need help architecting telemetry, LiveOps economy balancing, or full-cycle game production? Let's talk.
Get Practical Unity Development Insights
Technical guides on Unity performance, AI gameplay systems, mobile monetization, and game development.
Unsubscribe at any time. Your data is never shared.
Recommended Reading
More articles in Analytics & LiveOps
Live Ops in Unity: Architecture, Remote Config, Server Timing & Retention Systems
A technical reference for building Unity LiveOps systems: event calendar schemas, UGS Remote Config, server-authoritative clocks, idempotent reward claiming, GameAnalytics instrumentation, A/B guardrails, and QA.
Unity Game Onboarding Funnel Tracking with GameAnalytics: Architecture & Event Taxonomy (Part 1)
Part 1 of the 3-part GameAnalytics onboarding masterclass. Learn why onboarding funnels drive D1 retention, configure the GameAnalytics Unity SDK, and establish step event taxonomy.
Unity Game Onboarding Funnel Tracking with GameAnalytics: Funnel Visualization, A/B Testing & D1 Retention (Part 3)
Part 3 of the 3-part GameAnalytics onboarding masterclass. Learn how to configure dashboard funnels, run A/B tests on tutorial pacing, and boost D1 retention.