Game analytics tracking plan generator
A tracking plan lists the events your game sends, when it sends them and the properties of each. Pick your genre, engine and business model. The generator gives a starter plan with example values and code for the Manalens SDK for Unity, Godot, the web or Node.js. Copy the code or export the plan as a CSV.
Your tracking plan
1. Set up the SDK
// Unity 2021.3 or later. Add the Unity SDK package with the Package Manager.
// During early access, the package is available on request.
using System.Collections.Generic;
using UnityEngine;
using ManalensSdk;
public class Analytics : MonoBehaviour
{
void Awake()
{
Manalens.Init(new ManalensOptions
{
PublishableKey = "YOUR_PUBLISHABLE_KEY",
Endpoint = "https://YOUR_COLLECTOR_ENDPOINT",
Build = "571",
Storefront = "steam",
Enabled = !Application.isEditor,
});
}
}2. Send these events
| Event | Properties | When | Sent by |
|---|---|---|---|
game_open | is_first_open (boolean)first_open_at (string) | Each launch. | SDK |
session_start | none | A session starts: at launch, or on return after 30 minutes idle. | SDK |
session_end | duration_s (number) | The session ends: at quit, or after 30 minutes idle. | SDK |
tutorial_step | step (number)step_name (string) | The player finishes a tutorial step. Shows where new players stop. | Your code |
error | severity (string)message (string)error_type (string)handled (boolean) | A game error. | SDK |
game_updated | previous_version (string)previous_build (string) | The first launch after the player updates the game. | Your code |
level_start | level (number)attempt (number) | The player starts a level. | Your code |
level_complete | level (number)attempt (number)score (number) | The player completes a level. | Your code |
level_fail | level (number)attempt (number)score (number) | The player fails a level. | Your code |
achievement_unlocked | achievement (string) | The player unlocks an achievement. | Your code |
3. Code for each event
Manalens.Track("tutorial_step", new Dictionary<string, object> { ["step"] = 2, ["step_name"] = "jump" });Manalens.Track("game_updated", new Dictionary<string, object> { ["previous_version"] = "1.3.0", ["previous_build"] = "560" });Manalens.Track("level_start", new Dictionary<string, object> { ["level"] = 3, ["attempt"] = 1 });Manalens.Track("level_complete", new Dictionary<string, object> { ["level"] = 3, ["attempt"] = 1, ["score"] = 1200 });Manalens.Track("level_fail", new Dictionary<string, object> { ["level"] = 3, ["attempt"] = 2, ["score"] = 300 });Manalens.Track("achievement_unlocked", new Dictionary<string, object> { ["achievement"] = "first_boss" });How to use it
- Pick your "Genre", such as roguelike for runs or strategy for matches.
- Pick your "Engine or SDK": Unity, Godot 4, web or Node.js.
- Pick your "Business model": premium, free to play, or a demo or Playtest before launch.
- Read the event table. Events marked "SDK" are sent for you, and the rest need your code.
- Click "Copy all code" for the setup and event calls, or "Export CSV" for the plan.
How it works
Every plan starts with six core events: game_open, session_start, session_end, tutorial_step, error and game_updated. The genre adds events for levels, runs, quests, in-game days or matches. The business model adds achievement_unlocked for a premium game; store_open, purchase and resource for free to play; and demo_end_reached, wishlist_click and feedback_submitted for a demo.
Events are flat, with snake_case names and property values that are strings, numbers, booleans or null, as our event conventions require. The purchase and resource events follow the GameAnalytics event model: a purchase carries the amount in cents and an ISO currency code, and a resource event has a flow that is a source or a sink.
The Unity and Godot SDKs send game_open, session_start and session_end without extra code, and the plan marks them "SDK". They also capture errors: Unity sends exceptions and logged errors, and Godot sends engine and script errors on Godot 4.5 or later. With the web and Node.js SDKs, you send these events yourself.
plan = core events + genre events + business model events
code = setup call + one track call for each event the SDK does not sendWorked example
Example with made-up inputs: a roguelike demo in Godot
The plan has 12 events: game_open, session_start, session_end, tutorial_step, error, game_updated, run_start, run_end, unlock_earned, demo_end_reached, wishlist_click, feedback_submitted.
Godot sends 4 of them for you: game_open, session_start, session_end, error. "Copy all code" gives the setup call and 8 track calls for the rest, such as Manalens.track("run_end", {"outcome": "death", "floor": 4, "duration_s": 1500, "cause": "boss_2"})
How to read the result
Start with the events that answer your first questions: where new players stop in the tutorial, which levels or runs end a session, and what brings players back. Add events later when you have a new question.
Check the "When" column before you write code. Each event should fire once at a clear moment, so its counts mean the same thing in every build.
Replace the example values with real ones from your game, and keep the same property name in every event that shares it, such as level or duration_s.
Property rules
Each property value must be a string, a number, a boolean or null. Do not send personal data in free text such as error messages. Use seconds for durations and cents for money, as the plan does, so totals add up across events.
Keep the plan with your code
Export the CSV and keep it next to your code. It lists each event, property, type, example value, when to send it and who sends it: the SDK or your code. Add a row before you add an event, and review the plan before each release, so everyone on the team uses the same names.
Limits
The plan is a starting point for common genres. It does not know your game, so add events for your own systems and remove the ones you do not need.
The code targets the Manalens SDKs, and the Unity package is available on request during early access. The CSV works with any tool that takes custom events, but you need to rewrite the code calls for another SDK.
The plan does not cover ad revenue, consent screens or server checks of purchases.
Frequently asked questions
What events should an indie game track first?
Start with launches, sessions, tutorial steps, errors and the core loop of your genre, such as level starts and ends or run results. These show where new players stop and what brings them back. Add purchases if you sell anything in the game, and a wishlist button event if you ship a demo. This generator builds that starter set for you.
Is the code ready to paste?
Yes, after you add your publishable key and collector endpoint to the setup call. The example values in each track call show the type of each property, so replace them with values from your game. The Unity package is available on request during early access, the Godot addon goes in addons/manalens, and the web and Node.js SDKs are npm packages.
Can I use the plan with another analytics tool?
Yes. The CSV lists each event, property, type, example value, when to send it and who sends it. Any tool that takes custom events can use those names. The purchase and resource events follow the GameAnalytics event model, so they map well to tools built on it. You need to rewrite the code calls for the other tool's SDK.
Where should I keep my secret key?
Only on your server. Unity, Godot and web builds use the publishable key, which is made to ship in a game. The Node.js example runs in server mode and reads the secret key from an environment variable. Never put the secret key in a game build or a web page, because players can read anything you ship.
Is my data sent anywhere?
No. The generator runs in your browser. Your choices of genre, engine and business model stay on your device, and the code and the CSV are built in your browser. You do not need an account. The plan sends no events until you add the SDK to your game with your own key.
Sources
Last reviewed . All math runs in your browser. We do not send your inputs anywhere.
Next step
Once the events arrive, Manalens turns them into funnels, retention charts and player profiles, so you see where players stop and what brings them back. See custom events →