@musashishao/agent-kit 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/agents/ai-asset-factory.md +700 -0
- package/.agent/agents/ai-audio-factory.md +503 -0
- package/.agent/agents/game-developer.md +4 -4
- package/.agent/agents/orchestrator.md +113 -3
- package/.agent/agents/project-planner.md +67 -0
- package/.agent/agents/unity-mobile-master.md +949 -0
- package/.agent/mcp/config/registry.json +65 -51
- package/.agent/mcp/servers/notebooklm/README.md +114 -0
- package/.agent/mcp/servers/notebooklm/package.json +35 -0
- package/.agent/mcp/servers/notebooklm/src/auth/chrome.ts +225 -0
- package/.agent/mcp/servers/notebooklm/src/auth/index.ts +1 -0
- package/.agent/mcp/servers/notebooklm/src/index.ts +516 -0
- package/.agent/mcp/servers/notebooklm/src/services/index.ts +3 -0
- package/.agent/mcp/servers/notebooklm/src/services/library.ts +217 -0
- package/.agent/mcp/servers/notebooklm/src/services/notebooklm.ts +380 -0
- package/.agent/mcp/servers/notebooklm/tsconfig.json +15 -0
- package/.agent/mcp-gateway/README.md +169 -20
- package/.agent/mcp-gateway/package.json +22 -7
- package/.agent/mcp-gateway/src/auth/index.ts +55 -0
- package/.agent/mcp-gateway/src/auth/middleware.ts +242 -0
- package/.agent/mcp-gateway/src/auth/oauth.ts +462 -0
- package/.agent/mcp-gateway/src/auth/scopes.ts +227 -0
- package/.agent/mcp-gateway/src/index.ts +252 -105
- package/.agent/mcp-gateway/src/observability/index.ts +5 -0
- package/.agent/mcp-gateway/src/observability/otel.ts +405 -0
- package/.agent/mcp-gateway/src/transports/index.ts +5 -0
- package/.agent/mcp-gateway/src/transports/streamableHttp.ts +235 -0
- package/.agent/rules/CODEX.md +89 -0
- package/.agent/rules/CODE_RULES.md +73 -0
- package/.agent/rules/GEMINI.md +25 -0
- package/.agent/rules/MEMORY_STATE.md +110 -0
- package/.agent/rules/REFERENCE.md +33 -141
- package/.agent/rules/REF_SKILLS.md +116 -0
- package/.agent/rules/REF_WORKFLOWS.md +81 -0
- package/.agent/scripts/ak_cli.py +106 -5
- package/.agent/scripts/memory_manager.py +48 -9
- package/.agent/skills/anti-hallucination/SKILL.md +295 -0
- package/.agent/skills/anti-hallucination/scripts/check_hallucination.py +299 -0
- package/.agent/skills/bifurcation-analysis/SKILL.md +56 -0
- package/.agent/skills/brainstorming/SKILL.md +80 -6
- package/.agent/skills/decision-memory/SKILL.md +317 -0
- package/.agent/skills/emergence-detector/SKILL.md +230 -0
- package/.agent/skills/emergence-detector/scripts/check_emergence.py +265 -0
- package/.agent/skills/explained-qa/SKILL.md +142 -0
- package/.agent/skills/explained-qa/game-terminology.md +214 -0
- package/.agent/skills/game-development/ai-dialogue-engine/SKILL.md +442 -0
- package/.agent/skills/game-development/ai-graphics-generator/SKILL.md +463 -0
- package/.agent/skills/game-development/ai-playtest-framework/SKILL.md +570 -0
- package/.agent/skills/game-development/camera-systems/SKILL.md +607 -0
- package/.agent/skills/game-development/card-battle-engine/SKILL.md +618 -0
- package/.agent/skills/game-development/character-controller-3d/SKILL.md +908 -0
- package/.agent/skills/game-development/cloud-save-sync/SKILL.md +527 -0
- package/.agent/skills/game-development/combat-system/SKILL.md +748 -0
- package/.agent/skills/game-development/compliance-rating/SKILL.md +277 -0
- package/.agent/skills/game-development/crossplatform-build/SKILL.md +386 -0
- package/.agent/skills/game-development/cultivation-progression/SKILL.md +520 -0
- package/.agent/skills/game-development/data-driven-balance/SKILL.md +535 -0
- package/.agent/skills/game-development/game-analytics-integrator/SKILL.md +410 -0
- package/.agent/skills/game-development/game-audio-advanced/SKILL.md +646 -0
- package/.agent/skills/game-development/game-economy-designer/SKILL.md +375 -0
- package/.agent/skills/game-development/game-marketing/SKILL.md +85 -0
- package/.agent/skills/game-development/game-state-manager/SKILL.md +883 -0
- package/.agent/skills/game-development/hybrid-game-spec/SKILL.md +220 -0
- package/.agent/skills/game-development/inventory-quest/SKILL.md +747 -0
- package/.agent/skills/game-development/liveops/SKILL.md +308 -0
- package/.agent/skills/game-development/localization/SKILL.md +286 -0
- package/.agent/skills/game-development/mobile-input-patterns/SKILL.md +343 -0
- package/.agent/skills/game-development/monetization-strategy/SKILL.md +94 -0
- package/.agent/skills/game-development/multiplayer-master/SKILL.md +727 -0
- package/.agent/skills/game-development/narrative-branching/SKILL.md +593 -0
- package/.agent/skills/game-development/procedural-level-ai/SKILL.md +367 -0
- package/.agent/skills/game-development/prototyping-rapid/SKILL.md +205 -0
- package/.agent/skills/game-development/spec-ecosystem/SKILL.md +155 -0
- package/.agent/skills/game-development/spec-ecosystem/decision-log-format.md +129 -0
- package/.agent/skills/game-development/spec-ecosystem/templates/PLAN-template.md +178 -0
- package/.agent/skills/game-development/spec-ecosystem/templates/SPEC-template.md +110 -0
- package/.agent/skills/game-development/spec-ecosystem/templates/TASKS-template.md +156 -0
- package/.agent/skills/game-development/survival-systems/SKILL.md +493 -0
- package/.agent/skills/game-development/testing-qa/SKILL.md +270 -0
- package/.agent/skills/game-development/unity-mobile-optimization/SKILL.md +271 -0
- package/.agent/skills/intent-capture/SKILL.md +65 -0
- package/.agent/skills/mcp-composition/SKILL.md +362 -0
- package/.agent/skills/mcp-observability/SKILL.md +323 -0
- package/.agent/skills/mcp-security/SKILL.md +314 -0
- package/.agent/skills/trust-spectrum/SKILL.md +291 -0
- package/.agent/skills/vibe-coding-guard/SKILL.md +328 -0
- package/.agent/templates/AGENTS.game.md +63 -0
- package/.agent/templates/docs/WORKFLOW_GUIDE.en.md +100 -0
- package/.agent/templates/docs/WORKFLOW_GUIDE.vi.md +100 -0
- package/.agent/workflows/ai-agent.md +2 -0
- package/.agent/workflows/autofix.md +1 -0
- package/.agent/workflows/brainstorm.md +1 -0
- package/.agent/workflows/context.md +1 -0
- package/.agent/workflows/create.md +39 -8
- package/.agent/workflows/dashboard.md +1 -0
- package/.agent/workflows/debug.md +14 -0
- package/.agent/workflows/deploy.md +14 -0
- package/.agent/workflows/enhance.md +44 -0
- package/.agent/workflows/gamekit-init.md +177 -0
- package/.agent/workflows/gamekit-launch.md +338 -0
- package/.agent/workflows/gamekit-plan.md +204 -0
- package/.agent/workflows/gamekit-qa.md +153 -0
- package/.agent/workflows/gamekit-spec.md +243 -0
- package/.agent/workflows/gamekit-tasks.md +208 -0
- package/.agent/workflows/marketing.md +2 -0
- package/.agent/workflows/next.md +1 -0
- package/.agent/workflows/orchestrate.md +12 -0
- package/.agent/workflows/pentest.md +2 -0
- package/.agent/workflows/plan.md +42 -0
- package/.agent/workflows/preview.md +1 -0
- package/.agent/workflows/quality.md +1 -0
- package/.agent/workflows/saas.md +2 -0
- package/.agent/workflows/spec.md +42 -0
- package/.agent/workflows/status.md +1 -0
- package/.agent/workflows/test.md +14 -0
- package/.agent/workflows/ui-ux-pro-max.md +1 -0
- package/bin/cli.js +411 -111
- package/package.json +1 -2
- package/.agent/agents/game-asset-curator.md +0 -317
- package/.agent/agents/game-narrative-designer.md +0 -310
- package/.agent/agents/game-qa-agent.md +0 -441
- package/.agent/workflows/game-prototype.md +0 -154
- package/docs/AI_DATA_INFRASTRUCTURE.md +0 -288
- package/docs/CHANGELOG_AI_INFRA.md +0 -141
- package/docs/MIGRATION_GUIDE_V1.9.md +0 -55
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: game-analytics-integrator
|
|
3
|
+
description: Analytics integration for mobile games. Firebase, GameAnalytics, Unity Analytics, custom events, funnels, cohorts, and A/B testing setup.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Grep, WebSearch
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Game Analytics Integrator Skill
|
|
8
|
+
|
|
9
|
+
> Turn player behavior into actionable insights.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
- Setting up analytics in mobile games
|
|
16
|
+
- Designing event tracking schemas
|
|
17
|
+
- Implementing funnel analysis
|
|
18
|
+
- Creating player cohorts
|
|
19
|
+
- Setting up A/B testing infrastructure
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Analytics Tool Comparison
|
|
24
|
+
|
|
25
|
+
| Tool | Best For | Free Tier | Pros | Cons |
|
|
26
|
+
|------|----------|-----------|------|------|
|
|
27
|
+
| **Firebase** | All-purpose | Very generous | Google ecosystem | Complex setup |
|
|
28
|
+
| **GameAnalytics** | Game-specific | 100K MAU | Game metrics | Less flexible |
|
|
29
|
+
| **Unity Analytics** | Unity games | Built-in | Zero setup | Limited features |
|
|
30
|
+
| **Amplitude** | Deep analysis | 10M events | Powerful UI | Expensive at scale |
|
|
31
|
+
| **Mixpanel** | Product analytics | 100K users | Great funnels | Not game-focused |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Firebase Analytics Setup
|
|
36
|
+
|
|
37
|
+
### Installation (Unity)
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Download Firebase Unity SDK
|
|
41
|
+
# Add to Assets/Firebase/
|
|
42
|
+
|
|
43
|
+
# Enable in Firebase Console:
|
|
44
|
+
# - Analytics
|
|
45
|
+
# - Crashlytics
|
|
46
|
+
# - Remote Config
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### C# Implementation
|
|
50
|
+
|
|
51
|
+
```csharp
|
|
52
|
+
using Firebase.Analytics;
|
|
53
|
+
|
|
54
|
+
public static class GameAnalytics
|
|
55
|
+
{
|
|
56
|
+
public static void Initialize()
|
|
57
|
+
{
|
|
58
|
+
Firebase.FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task =>
|
|
59
|
+
{
|
|
60
|
+
if (task.Result == Firebase.DependencyStatus.Available)
|
|
61
|
+
{
|
|
62
|
+
FirebaseAnalytics.SetAnalyticsCollectionEnabled(true);
|
|
63
|
+
Debug.Log("Firebase Analytics ready");
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Track level completion
|
|
69
|
+
public static void LogLevelComplete(int levelNum, int score, float duration)
|
|
70
|
+
{
|
|
71
|
+
FirebaseAnalytics.LogEvent(FirebaseAnalytics.EventLevelEnd, new Parameter[]
|
|
72
|
+
{
|
|
73
|
+
new Parameter(FirebaseAnalytics.ParameterLevel, levelNum),
|
|
74
|
+
new Parameter(FirebaseAnalytics.ParameterScore, score),
|
|
75
|
+
new Parameter("duration_seconds", duration)
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Track purchase
|
|
80
|
+
public static void LogPurchase(string itemId, float value, string currency)
|
|
81
|
+
{
|
|
82
|
+
FirebaseAnalytics.LogEvent(FirebaseAnalytics.EventPurchase, new Parameter[]
|
|
83
|
+
{
|
|
84
|
+
new Parameter(FirebaseAnalytics.ParameterItemId, itemId),
|
|
85
|
+
new Parameter(FirebaseAnalytics.ParameterValue, value),
|
|
86
|
+
new Parameter(FirebaseAnalytics.ParameterCurrency, currency)
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Track tutorial progress
|
|
91
|
+
public static void LogTutorialStep(string stepName, int stepIndex)
|
|
92
|
+
{
|
|
93
|
+
FirebaseAnalytics.LogEvent("tutorial_step", new Parameter[]
|
|
94
|
+
{
|
|
95
|
+
new Parameter("step_name", stepName),
|
|
96
|
+
new Parameter("step_index", stepIndex)
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Set user properties
|
|
101
|
+
public static void SetUserProperties(int playerLevel, bool isPayer)
|
|
102
|
+
{
|
|
103
|
+
FirebaseAnalytics.SetUserProperty("player_level", playerLevel.ToString());
|
|
104
|
+
FirebaseAnalytics.SetUserProperty("is_payer", isPayer ? "true" : "false");
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Custom Event Design
|
|
112
|
+
|
|
113
|
+
### Event Naming Convention
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
[noun]_[past_tense_verb]
|
|
117
|
+
|
|
118
|
+
Examples:
|
|
119
|
+
- level_completed
|
|
120
|
+
- item_purchased
|
|
121
|
+
- ad_watched
|
|
122
|
+
- tutorial_finished
|
|
123
|
+
- session_started
|
|
124
|
+
- character_unlocked
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Core Events Schema
|
|
128
|
+
|
|
129
|
+
```csharp
|
|
130
|
+
public static class EventSchema
|
|
131
|
+
{
|
|
132
|
+
// Session events
|
|
133
|
+
public const string SESSION_START = "session_start";
|
|
134
|
+
public const string SESSION_END = "session_end";
|
|
135
|
+
|
|
136
|
+
// Progression events
|
|
137
|
+
public const string LEVEL_START = "level_start";
|
|
138
|
+
public const string LEVEL_COMPLETE = "level_complete";
|
|
139
|
+
public const string LEVEL_FAIL = "level_fail";
|
|
140
|
+
|
|
141
|
+
// Economy events
|
|
142
|
+
public const string CURRENCY_EARNED = "currency_earned";
|
|
143
|
+
public const string CURRENCY_SPENT = "currency_spent";
|
|
144
|
+
public const string ITEM_PURCHASED = "item_purchased";
|
|
145
|
+
|
|
146
|
+
// Monetization events
|
|
147
|
+
public const string IAP_INITIATED = "iap_initiated";
|
|
148
|
+
public const string IAP_COMPLETED = "iap_completed";
|
|
149
|
+
public const string IAP_FAILED = "iap_failed";
|
|
150
|
+
public const string AD_REQUESTED = "ad_requested";
|
|
151
|
+
public const string AD_WATCHED = "ad_watched";
|
|
152
|
+
public const string AD_CLICKED = "ad_clicked";
|
|
153
|
+
|
|
154
|
+
// Engagement events
|
|
155
|
+
public const string FEATURE_USED = "feature_used";
|
|
156
|
+
public const string TUTORIAL_STEP = "tutorial_step";
|
|
157
|
+
public const string ACHIEVEMENT_UNLOCKED = "achievement_unlocked";
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Event with full parameters
|
|
161
|
+
public static void LogCurrencySpent(string currency, int amount, string itemType, string itemId)
|
|
162
|
+
{
|
|
163
|
+
FirebaseAnalytics.LogEvent(EventSchema.CURRENCY_SPENT, new Parameter[]
|
|
164
|
+
{
|
|
165
|
+
new Parameter("currency_type", currency), // "coins", "gems"
|
|
166
|
+
new Parameter("amount", amount),
|
|
167
|
+
new Parameter("item_type", itemType), // "upgrade", "consumable"
|
|
168
|
+
new Parameter("item_id", itemId),
|
|
169
|
+
new Parameter("player_level", PlayerState.Level),
|
|
170
|
+
new Parameter("balance_after", PlayerState.GetBalance(currency))
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Funnel Analysis
|
|
178
|
+
|
|
179
|
+
### Key Funnels to Track
|
|
180
|
+
|
|
181
|
+
#### Tutorial Funnel
|
|
182
|
+
```
|
|
183
|
+
Step 1: first_open
|
|
184
|
+
Step 2: tutorial_start
|
|
185
|
+
Step 3: tutorial_step_1
|
|
186
|
+
Step 4: tutorial_step_2
|
|
187
|
+
Step 5: tutorial_step_3
|
|
188
|
+
Step 6: tutorial_complete
|
|
189
|
+
Step 7: first_game
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
#### Purchase Funnel
|
|
193
|
+
```
|
|
194
|
+
Step 1: shop_opened
|
|
195
|
+
Step 2: product_viewed
|
|
196
|
+
Step 3: purchase_initiated
|
|
197
|
+
Step 4: payment_info_entered
|
|
198
|
+
Step 5: purchase_completed
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
#### Daily Engagement Funnel
|
|
202
|
+
```
|
|
203
|
+
Step 1: app_open
|
|
204
|
+
Step 2: main_menu_viewed
|
|
205
|
+
Step 3: game_started
|
|
206
|
+
Step 4: game_completed
|
|
207
|
+
Step 5: reward_claimed
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Implementation
|
|
211
|
+
|
|
212
|
+
```csharp
|
|
213
|
+
public class FunnelTracker
|
|
214
|
+
{
|
|
215
|
+
private readonly string _funnelName;
|
|
216
|
+
private int _currentStep = 0;
|
|
217
|
+
|
|
218
|
+
public FunnelTracker(string funnelName)
|
|
219
|
+
{
|
|
220
|
+
_funnelName = funnelName;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
public void TrackStep(string stepName)
|
|
224
|
+
{
|
|
225
|
+
_currentStep++;
|
|
226
|
+
|
|
227
|
+
FirebaseAnalytics.LogEvent($"{_funnelName}_funnel", new Parameter[]
|
|
228
|
+
{
|
|
229
|
+
new Parameter("step_name", stepName),
|
|
230
|
+
new Parameter("step_number", _currentStep),
|
|
231
|
+
new Parameter("funnel_id", _funnelName + "_" + SessionId)
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// Usage
|
|
237
|
+
var tutorialFunnel = new FunnelTracker("tutorial");
|
|
238
|
+
tutorialFunnel.TrackStep("start");
|
|
239
|
+
tutorialFunnel.TrackStep("move_learned");
|
|
240
|
+
tutorialFunnel.TrackStep("attack_learned");
|
|
241
|
+
tutorialFunnel.TrackStep("complete");
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Cohort Analysis
|
|
247
|
+
|
|
248
|
+
### Cohort Definition
|
|
249
|
+
|
|
250
|
+
```csharp
|
|
251
|
+
public enum PlayerCohort
|
|
252
|
+
{
|
|
253
|
+
// By acquisition
|
|
254
|
+
Organic,
|
|
255
|
+
PaidAd_Facebook,
|
|
256
|
+
PaidAd_Google,
|
|
257
|
+
CrossPromo,
|
|
258
|
+
|
|
259
|
+
// By behavior
|
|
260
|
+
NonPayer,
|
|
261
|
+
Minnow, // <$10
|
|
262
|
+
Dolphin, // $10-100
|
|
263
|
+
Whale, // >$100
|
|
264
|
+
|
|
265
|
+
// By engagement
|
|
266
|
+
Churned, // No activity >7 days
|
|
267
|
+
AtRisk, // No activity 3-7 days
|
|
268
|
+
Active, // Active this week
|
|
269
|
+
PowerUser // Daily active
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
public static void AssignCohorts(PlayerData player)
|
|
273
|
+
{
|
|
274
|
+
// Spending cohort
|
|
275
|
+
var spendCohort = player.TotalSpend switch
|
|
276
|
+
{
|
|
277
|
+
0 => "non_payer",
|
|
278
|
+
< 10 => "minnow",
|
|
279
|
+
< 100 => "dolphin",
|
|
280
|
+
_ => "whale"
|
|
281
|
+
};
|
|
282
|
+
FirebaseAnalytics.SetUserProperty("spend_cohort", spendCohort);
|
|
283
|
+
|
|
284
|
+
// Engagement cohort
|
|
285
|
+
var daysSincePlay = (DateTime.Now - player.LastPlayDate).Days;
|
|
286
|
+
var engageCohort = daysSincePlay switch
|
|
287
|
+
{
|
|
288
|
+
> 7 => "churned",
|
|
289
|
+
> 3 => "at_risk",
|
|
290
|
+
_ => player.DaysPlayed > 10 ? "power_user" : "active"
|
|
291
|
+
};
|
|
292
|
+
FirebaseAnalytics.SetUserProperty("engage_cohort", engageCohort);
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## A/B Testing with Firebase Remote Config
|
|
299
|
+
|
|
300
|
+
### Setup
|
|
301
|
+
|
|
302
|
+
```csharp
|
|
303
|
+
public class ABTestManager : MonoBehaviour
|
|
304
|
+
{
|
|
305
|
+
private FirebaseRemoteConfig _remoteConfig;
|
|
306
|
+
|
|
307
|
+
async void Start()
|
|
308
|
+
{
|
|
309
|
+
_remoteConfig = FirebaseRemoteConfig.DefaultInstance;
|
|
310
|
+
|
|
311
|
+
// Set defaults
|
|
312
|
+
var defaults = new Dictionary<string, object>
|
|
313
|
+
{
|
|
314
|
+
{"starter_pack_price", 4.99},
|
|
315
|
+
{"ad_frequency", 3},
|
|
316
|
+
{"tutorial_version", "control"}
|
|
317
|
+
};
|
|
318
|
+
await _remoteConfig.SetDefaultsAsync(defaults);
|
|
319
|
+
|
|
320
|
+
// Fetch latest
|
|
321
|
+
await _remoteConfig.FetchAndActivateAsync();
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
public float GetStarterPackPrice()
|
|
325
|
+
{
|
|
326
|
+
return (float)_remoteConfig.GetValue("starter_pack_price").DoubleValue;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
public string GetTutorialVersion()
|
|
330
|
+
{
|
|
331
|
+
return _remoteConfig.GetValue("tutorial_version").StringValue;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Setting Up A/B Test in Firebase Console
|
|
337
|
+
|
|
338
|
+
1. Go to Remote Config
|
|
339
|
+
2. Add parameter (e.g., `starter_pack_price`)
|
|
340
|
+
3. Add condition for % of users:
|
|
341
|
+
- Condition A: 50% gets 3.99
|
|
342
|
+
- Condition B: 50% gets 4.99
|
|
343
|
+
4. Publish changes
|
|
344
|
+
|
|
345
|
+
### Tracking Test Results
|
|
346
|
+
|
|
347
|
+
```csharp
|
|
348
|
+
public void OnStarterPackPurchased()
|
|
349
|
+
{
|
|
350
|
+
var price = ABTestManager.Instance.GetStarterPackPrice();
|
|
351
|
+
|
|
352
|
+
FirebaseAnalytics.LogEvent("ab_test_conversion", new Parameter[]
|
|
353
|
+
{
|
|
354
|
+
new Parameter("test_name", "starter_pack_price"),
|
|
355
|
+
new Parameter("variant", price.ToString()),
|
|
356
|
+
new Parameter("converted", true)
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
## Dashboard Essentials
|
|
364
|
+
|
|
365
|
+
### Daily Metrics to Check
|
|
366
|
+
|
|
367
|
+
| Metric | What It Tells You |
|
|
368
|
+
|--------|-------------------|
|
|
369
|
+
| **DAU** | Daily health |
|
|
370
|
+
| **D1/D7/D30** | Long-term retention |
|
|
371
|
+
| **ARPDAU** | Revenue per player |
|
|
372
|
+
| **Session Length** | Engagement depth |
|
|
373
|
+
| **Crash Rate** | Technical health |
|
|
374
|
+
|
|
375
|
+
### Weekly Metrics
|
|
376
|
+
|
|
377
|
+
| Metric | What It Tells You |
|
|
378
|
+
|--------|-------------------|
|
|
379
|
+
| **WAU/MAU** | User base trend |
|
|
380
|
+
| **Conversion Rate** | Monetization efficiency |
|
|
381
|
+
| **LTV by Cohort** | ROI by acquisition source |
|
|
382
|
+
| **Funnel Drop-offs** | UX problems |
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Quick Reference
|
|
387
|
+
|
|
388
|
+
| Action | Event Name | Key Parameters |
|
|
389
|
+
|--------|------------|----------------|
|
|
390
|
+
| Start game | `level_start` | level_num |
|
|
391
|
+
| Complete level | `level_complete` | level_num, score, time |
|
|
392
|
+
| Purchase item | `purchase` | item_id, value, currency |
|
|
393
|
+
| Watch ad | `ad_impression` | ad_type, placement |
|
|
394
|
+
| Unlock character | `unlock` | item_id, method |
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Anti-Patterns
|
|
399
|
+
|
|
400
|
+
| ❌ Don't | ✅ Do |
|
|
401
|
+
|----------|-------|
|
|
402
|
+
| Track everything | Track what you'll act on |
|
|
403
|
+
| PII in events | Anonymous identifiers |
|
|
404
|
+
| Inconsistent naming | Use event schema |
|
|
405
|
+
| Skip user properties | Set cohort data |
|
|
406
|
+
| Ignore GDPR | Consent before tracking |
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
> **Remember:** Data without action is just noise. Track what matters.
|