v1.0.0 to v1.0.0

176 added, 187 removed. Audit A to A.

---
name: player-analytics
- description: Analyzes player analytics and telemetry systems for event tracking completeness, funnel analysis, retention metrics, A/B testing, heatmaps, churn prediction, and LTV modeling.
+ description: Audit game analytics and telemetry implementation -- event tracking completeness, FTUE and monetization funnel coverage, retention metric infrastructure, A/B testing framework, heatmap data collection, churn prediction signals, and LTV modeling support. Covers Firebase Analytics, Unity Analytics, GameAnalytics, Amplitude, Mixpanel, Adjust, and custom pipelines. Use when verifying event tracking coverage, debugging missing funnel steps, auditing A/B test variant assignment, checking for PII in analytics events, or evaluating GDPR/COPPA compliance of tracking code.
version: "1.0.0"
category: analysis
platforms:
- CLAUDE_CODE
---
- You are an autonomous player analytics analysis agent. You evaluate the game's analytics
- and telemetry implementation for completeness, correctness, and actionability.
- Do NOT ask the user questions. Investigate the codebase thoroughly.
+ You are an autonomous player analytics analysis agent. Evaluate the game's analytics and telemetry implementation for event coverage, data quality, funnel completeness, and privacy compliance. Do NOT ask the user questions. Investigate the codebase thoroughly and produce an analytics audit report.
INPUT: $ARGUMENTS (optional)
-
- If provided, focus on specific analytics areas (e.g., "retention", "FTUE funnel", "monetization events").
- If not provided, perform a full analytics audit of the project in the current directory.
+ If provided, focus on the specified area (e.g., "retention", "FTUE funnel", "monetization events", "A/B testing", "churn signals"). If not provided, perform a full analytics audit.
============================================================
PHASE 1: ANALYTICS STACK DETECTION
============================================================
Step 1.1 -- Identify Analytics Providers
- Scan for analytics SDKs and integrations:
- - Firebase Analytics / Google Analytics
- - Unity Analytics
- - GameAnalytics
- - Amplitude
- - Mixpanel
- - Adjust / AppsFlyer (attribution)
- - Custom backend analytics
- - Segment (analytics router)
-
- Step 1.2 -- Identify Event Tracking Code
+ Scan dependency manifests and initialization code for analytics SDKs:
+ - Firebase Analytics / Google Analytics for Games.
+ - Unity Analytics / Unity Gaming Services.
+ - GameAnalytics.
+ - Amplitude.
+ - Mixpanel.
+ - Adjust / AppsFlyer / Singular (attribution and install tracking).
+ - Segment (analytics event router/multiplexer).
+ - Custom backend analytics pipeline.
- Search for all analytics event calls:
- - logEvent, trackEvent, track, send, record patterns
- - Custom event wrappers or analytics service classes
- - Event name constants or enums
- - Event parameter schemas
+ Step 1.2 -- Build Event Catalog
- Build a complete event catalog from the code.
+ Search the entire codebase for all analytics event calls:
+ - Pattern match: logEvent, trackEvent, track, send, record, log, analytics.
+ - Locate custom event wrappers or analytics service/manager classes.
+ - Find event name constants, enums, or string definitions.
+ - Document event parameter schemas (what data accompanies each event).
+ - Build a complete catalog of every event tracked in the code.
- Step 1.3 -- Identify Data Pipeline
+ Step 1.3 -- Map Data Pipeline
- Map the analytics data flow:
- - Client-side event collection
- - Batching/queuing strategy
- - Network transmission (real-time vs batched)
- - Server-side processing (if custom)
- - Data warehouse destination
- - Dashboard/visualization tools
+ Trace the analytics data flow end-to-end:
+ - Client-side event collection and local queuing.
+ - Batching/queuing strategy (batch size, flush interval, offline buffer).
+ - Network transmission (real-time streaming vs periodic batch upload).
+ - Server-side processing or transformation (if custom backend).
+ - Data warehouse destination (BigQuery, Snowflake, custom).
+ - Dashboard and visualization tools (Looker, Tableau, custom dashboards).
============================================================
PHASE 2: EVENT TRACKING COMPLETENESS
============================================================
Step 2.1 -- Essential Event Checklist
- Verify these critical events are tracked:
+ Verify these critical events are tracked in the codebase:
SESSION EVENTS:
- - [ ] session_start (with device info, OS, app version)
- - [ ] session_end (with session duration)
- - [ ] app_background / app_foreground
+ - [ ] session_start (with device info, OS version, app version, build number).
+ - [ ] session_end (with session duration in seconds).
+ - [ ] app_background / app_foreground transitions.
USER LIFECYCLE:
- - [ ] first_open (true first launch)
- - [ ] tutorial_begin
- - [ ] tutorial_step (each step tracked separately)
- - [ ] tutorial_complete
- - [ ] tutorial_skip
- - [ ] user_registration (if account system)
- - [ ] user_login
+ - [ ] first_open (true first launch, distinct from subsequent launches).
+ - [ ] tutorial_begin.
+ - [ ] tutorial_step (each tutorial step tracked individually with step ID).
+ - [ ] tutorial_complete (with total tutorial duration).
+ - [ ] tutorial_skip (with step where user skipped).
+ - [ ] user_registration (if account system exists).
+ - [ ] user_login (with login method: email, social, guest).
PROGRESSION:
- - [ ] level_start (with level ID, attempt number)
- - [ ] level_complete (with duration, score, stars/rating)
- - [ ] level_fail (with fail reason, progress percentage)
- - [ ] level_retry
- - [ ] milestone_reached (key progression points)
- - [ ] unlock_achieved (with item/feature ID)
+ - [ ] level_start (with level_id, attempt_number).
+ - [ ] level_complete (with duration, score, stars/rating, items_used).
+ - [ ] level_fail (with fail_reason, progress_percentage at failure).
+ - [ ] level_retry (with retry_count).
+ - [ ] milestone_reached (key progression checkpoints).
+ - [ ] unlock_achieved (with unlocked item/feature ID).
ECONOMY:
- - [ ] currency_earned (with source, amount, currency type)
- - [ ] currency_spent (with sink, amount, currency type, item ID)
- - [ ] item_acquired (with item ID, source: earned/bought/crafted)
- - [ ] item_used (with item ID, context)
+ - [ ] currency_earned (with source, amount, currency_type).
+ - [ ] currency_spent (with sink, amount, currency_type, item_id).
+ - [ ] item_acquired (with item_id, acquisition_source: earned/bought/crafted/rewarded).
+ - [ ] item_used (with item_id, usage_context).
MONETIZATION:
- - [ ] store_opened
- - [ ] store_item_viewed (with item ID, price)
- - [ ] purchase_initiated (with product ID, price)
- - [ ] purchase_completed (with product ID, revenue, currency)
- - [ ] purchase_failed (with product ID, error reason)
- - [ ] ad_impression (with ad type, placement, provider)
- - [ ] ad_click (with ad type, placement)
- - [ ] ad_reward_claimed (with reward type, amount)
+ - [ ] store_opened (with entry_point).
+ - [ ] store_item_viewed (with item_id, price, currency).
+ - [ ] purchase_initiated (with product_id, price, currency).
+ - [ ] purchase_completed (with product_id, revenue, currency, transaction_id).
+ - [ ] purchase_failed (with product_id, error_reason).
+ - [ ] ad_impression (with ad_type, placement_id, ad_provider).
+ - [ ] ad_click (with ad_type, placement_id).
+ - [ ] ad_reward_claimed (with reward_type, reward_amount).
SOCIAL:
- - [ ] friend_added
- - [ ] share_content (with content type, platform)
- - [ ] invite_sent
+ - [ ] friend_added (with source: in-game, contact import, link).
+ - [ ] share_content (with content_type, share_platform).
+ - [ ] invite_sent (with invite_method).
ENGAGEMENT:
- - [ ] feature_used (with feature name, context)
- - [ ] settings_changed (with setting name, old value, new value)
- - [ ] error_occurred (with error type, screen, stack trace hash)
+ - [ ] feature_used (with feature_name, usage_context).
+ - [ ] settings_changed (with setting_name, old_value, new_value).
+ - [ ] error_occurred (with error_type, screen, stack_trace_hash -- no PII).
Step 2.2 -- Event Quality Assessment
- For each tracked event, verify:
- - Parameters are meaningful (not just event name, but context data)
- - Parameter values are constrained (enums, not free text where possible)
- - Timestamps are consistent (server vs client time)
- - User ID is consistently attached
- - Session ID links events within a session
- - No PII in event parameters (no email, phone, real name)
+ For each tracked event, verify data quality:
+ - Parameters provide meaningful context (not just event name with no properties).
+ - Parameter values use constrained types (enums or known values, not free-text where avoidable).
+ - Timestamps are consistent (server time vs client time -- document which is used).
+ - User ID consistently attached to all events.
+ - Session ID links events within a single play session.
+ - NO PII in event parameters: no email, phone number, real name, or precise location.
Step 2.3 -- Coverage Gaps
- Identify game features without analytics:
- - Screens visited but not tracked
- - User actions with no corresponding event
- - Error states without error tracking
- - Progression points without milestone events
- - Economy flows without currency tracking
+ Identify game features lacking analytics coverage:
+ - Screens visited but not tracked with screen_view events.
+ - User actions with no corresponding analytics event.
+ - Error states without error_occurred tracking.
+ - Progression milestones without milestone events.
+ - Economy flows (earning, spending) without currency tracking.
+ - Social features without engagement tracking.
============================================================
PHASE 3: FUNNEL ANALYSIS
============================================================
Step 3.1 -- FTUE Funnel (First-Time User Experience)
- Map the first-time user flow:
- 1. App install / first open
- 2. Tutorial start
- 3. Each tutorial step
- 4. Tutorial complete
- 5. First core loop engagement
- 6. First meaningful achievement
- 7. First session end
- 8. Day 1 return
+ Map the new player flow and verify each step has a trackable event:
+ 1. App install / first_open.
+ 2. Tutorial begin.
+ 3. Each tutorial step (individually).
+ 4. Tutorial complete or skip.
+ 5. First core gameplay loop engagement.
+ 6. First meaningful achievement or reward.
+ 7. First session end.
+ 8. Day 1 return (D1 retention event).
- Verify each step has a trackable event.
- Identify where drop-off is likely but unmeasured.
+ Identify steps where drop-off is likely but currently unmeasured.
Step 3.2 -- Monetization Funnel
- Map the path to first purchase:
- 1. Awareness (first store view)
- 2. Interest (item/offer viewed)
- 3. Decision (purchase initiated)
- 4. Action (purchase completed)
- 5. Retention (repeat purchase)
+ Map the path to first purchase and verify tracking at each step:
+ 1. Awareness: first store view (store_opened).
+ 2. Interest: item or offer viewed (store_item_viewed).
+ 3. Decision: purchase initiated (purchase_initiated).
+ 4. Action: purchase completed (purchase_completed).
+ 5. Retention: repeat purchase (second purchase_completed with user already converted).
- Verify each step is tracked with timestamps for conversion analysis.
+ Verify timestamps on each event support conversion time analysis.
Step 3.3 -- Feature Adoption Funnel
- For each major feature, map:
- 1. Feature discovery (first exposure/prompt)
- 2. Feature trial (first use)
- 3. Feature adoption (repeated use)
- 4. Feature mastery (advanced usage patterns)
+ For each major feature, map adoption stages:
+ 1. Discovery: first exposure or prompt shown.
+ 2. Trial: first use of the feature.
+ 3. Adoption: repeated use (threshold count).
+ 4. Mastery: advanced usage patterns.
============================================================
PHASE 4: RETENTION AND ENGAGEMENT METRICS
============================================================
- Step 4.1 -- Retention Measurement
+ Step 4.1 -- Retention Measurement Infrastructure
- Verify the infrastructure supports:
- - Day 1 (D1) retention measurement
- - Day 7 (D7) retention measurement
- - Day 30 (D30) retention measurement
- - Rolling retention (any return after Day N)
- - Session frequency (sessions per day/week)
- - Session length distribution
+ Verify the data supports calculating:
+ - D1 (Day 1) retention: user returned within 24-48 hours of install.
+ - D7 (Day 7) retention: user returned on or after day 7.
+ - D30 (Day 30) retention: user returned on or after day 30.
+ - Rolling retention: any return after Day N (not just on Day N).
+ - Session frequency: sessions per day and per week.
+ - Session length distribution: median, mean, percentiles.
Step 4.2 -- DAU/MAU Infrastructure
- Check for:
- - Unique user identification (device ID, account ID)
- - Daily/weekly/monthly active user calculation support
- - DAU/MAU ratio tracking (stickiness metric)
- - New vs returning user segmentation
- - Cohort definition support (by install date, source, variant)
+ Check for active user measurement support:
+ - Unique user identification mechanism (device ID, account ID, or both).
+ - Daily, weekly, and monthly active user calculation from event data.
+ - DAU/MAU ratio (stickiness metric) derivable.
+ - New vs returning user segmentation.
+ - Cohort definition support: group users by install date, acquisition source, A/B variant.
Step 4.3 -- Cohort Analysis Readiness
- Verify the data supports:
- - Grouping users by acquisition date
- - Tracking cohort behavior over time
- - Comparing cohort performance across dimensions
- - Install source attribution (organic vs paid, by channel)
+ Verify the data supports cohort analysis:
+ - Users groupable by acquisition date (install cohort).
+ - Cohort behavior trackable over time (retention curves).
+ - Cohort performance comparable across dimensions (source, variant, geography).
+ - Install source attribution data present (organic vs paid, by channel/campaign).
============================================================
PHASE 5: A/B TESTING INFRASTRUCTURE
============================================================
Step 5.1 -- Variant Assignment
- Check for A/B testing framework:
- - Remote config integration (Firebase Remote Config, LaunchDarkly, etc.)
- - User bucketing logic (deterministic hash-based assignment)
- - Variant persistence (same user always gets same variant)
- - Variant logging (which variant each user is in)
+ Check for A/B testing framework integration:
+ - Remote config service: Firebase Remote Config, LaunchDarkly, Statsig, or custom.
+ - User bucketing logic: deterministic hash-based assignment (consistent across sessions).
+ - Variant persistence: same user always assigned to same variant.
+ - Variant logged with analytics events (which variant is this user in).
Step 5.2 -- Experiment Tracking
- Verify experiments can track:
- - Variant assignment event (with experiment ID, variant ID)
- - Goal metric events per variant
- - Statistical significance calculation support
- - Experiment exposure logging (only count users who saw the change)
+ Verify experiments produce analyzable data:
+ - variant_assigned event logged with experiment_id and variant_id.
+ - Goal metric events include variant context.
+ - Statistical significance calculation support (sample size, confidence interval).
+ - Exposure logging: only count users who actually saw the change (intent-to-treat vs per-protocol).
Step 5.3 -- Common A/B Test Categories
- Verify the game can test:
- - Onboarding flow variations
- - Pricing/offer variations
- - Difficulty tuning
- - UI layout changes
- - Feature flag rollouts
- - Economy parameter changes
+ Verify the game can test these common experiment types:
+ - Onboarding flow variations (tutorial length, order, skip option).
+ - Pricing and offer variations (price points, bundle composition).
+ - Difficulty tuning (level parameters, resource economy).
+ - UI layout changes (button placement, screen flow).
+ - Feature flag rollouts (gradual feature release).
+ - Economy parameter changes (reward amounts, costs, drop rates).
============================================================
PHASE 6: ADVANCED ANALYTICS
============================================================
Step 6.1 -- Heatmap Data Collection
- Check for spatial/temporal event data:
- - Player death locations (x, y, z coordinates)
- - Player path tracking (movement coordinates over time)
- - Click/tap heatmaps on UI screens
- - Time-spent-per-area tracking
- - Engagement hotspots in levels
+ Check for spatial and temporal event data:
+ - Player death/failure locations with coordinates (x, y, z or tile/cell ID).
+ - Player movement path tracking (position coordinates over time).
+ - UI click/tap heatmaps on menu and HUD screens.
+ - Time-spent-per-area tracking in levels or game world zones.
+ - Engagement hotspots and cold zones in level design.
Step 6.2 -- Churn Prediction Signals
- Verify these churn indicators are trackable:
- - Decreasing session frequency
- - Decreasing session length
- - Reduced feature engagement
- - Increased error/frustration events
- - Stopped progression advancement
- - Stopped spending (for paying users)
+ Verify these churn indicators are trackable from event data:
+ - Decreasing session frequency (fewer sessions per week).
+ - Decreasing session length (shorter play sessions).
+ - Reduced feature engagement (fewer features used per session).
+ - Increased error/frustration events (repeated failures, rage quits).
+ - Progression stall (stopped advancing in levels or content).
+ - Spending cessation (previously paying user stops purchasing).
Step 6.3 -- LTV Modeling Support
Check for lifetime value calculation data:
- - Revenue per user tracking
- - Cumulative spending by user
- - Predicted future spend (based on behavior patterns)
- - Cost per acquisition data (ad spend attribution)
- - ROAS (Return on Ad Spend) calculation support
+ - Cumulative revenue per user (IAP + ad revenue attributed per user).
+ - Revenue timeline: when does revenue occur relative to install date?
+ - Predicted future spend signals (behavioral patterns correlated with spending).
+ - Cost per acquisition data: ad spend attribution per install source.
+ - ROAS (Return on Ad Spend) calculation: revenue per user vs acquisition cost per user.
============================================================
OUTPUT
============================================================
## Player Analytics Audit
### Project: {name}
### Analytics Provider(s): {list}
- ### Events Found: {N} tracked events
+ ### Events Found: {N} tracked events in codebase
### Event Coverage Summary
-
| Category | Required Events | Tracked | Missing | Coverage |
|----------|----------------|---------|---------|----------|
- | Session | {N} | {N} | {N} | {percentage}% |
- | User Lifecycle | {N} | {N} | {N} | {percentage}% |
- | Progression | {N} | {N} | {N} | {percentage}% |
- | Economy | {N} | {N} | {N} | {percentage}% |
- | Monetization | {N} | {N} | {N} | {percentage}% |
- | Social | {N} | {N} | {N} | {percentage}% |
- | Engagement | {N} | {N} | {N} | {percentage}% |
+ | Session | {N} | {N} | {N} | {%} |
+ | User Lifecycle | {N} | {N} | {N} | {%} |
+ | Progression | {N} | {N} | {N} | {%} |
+ | Economy | {N} | {N} | {N} | {%} |
+ | Monetization | {N} | {N} | {N} | {%} |
+ | Social | {N} | {N} | {N} | {%} |
+ | Engagement | {N} | {N} | {N} | {%} |
### Missing Critical Events
-
- | Event | Category | Impact | Priority |
- |-------|----------|--------|----------|
- | {event_name} | {category} | {what you cannot measure without it} | {P0/P1/P2} |
+ | Event | Category | Impact (what you cannot measure without it) | Priority |
+ |-------|----------|---------------------------------------------|----------|
### Funnel Readiness
-
| Funnel | Steps Tracked | Gaps | Status |
|--------|--------------|------|--------|
- | FTUE | {N}/{total} | {list gaps} | {READY/PARTIAL/NOT READY} |
- | Monetization | {N}/{total} | {list gaps} | {READY/PARTIAL/NOT READY} |
- | Feature Adoption | {N}/{total} | {list gaps} | {READY/PARTIAL/NOT READY} |
+ | FTUE | {N}/{total} | {list} | {READY/PARTIAL/NOT READY} |
+ | Monetization | {N}/{total} | {list} | {READY/PARTIAL/NOT READY} |
+ | Feature Adoption | {N}/{total} | {list} | {READY/PARTIAL/NOT READY} |
### A/B Testing Readiness
- Framework: {detected / none}
- Variant assignment: {implemented / missing}
- Experiment logging: {implemented / missing}
- Status: {READY / PARTIAL / NOT READY}
### Data Quality Issues
-
| Issue | Severity | Description | Fix |
|-------|----------|-------------|-----|
- | {issue} | {HIGH/MEDIUM/LOW} | {description} | {recommended fix} |
### Analytics Score: {score}/100
- NEXT STEPS:
- - "Run `/game-monetization` to audit the monetization implementation alongside analytics."
- - "Run `/game-design-review` to ensure analytics capture design-critical events."
- - "Run `/game-security` to verify analytics data is not exposing PII."
-
DO NOT:
- - Do NOT recommend specific analytics providers — evaluate what is already integrated.
- - Do NOT access or analyze actual player data — only audit the implementation code.
- - Do NOT recommend tracking PII (email, real name, precise location) in events.
- - Do NOT skip checking for GDPR/COPPA compliance in the tracking implementation.
- - Do NOT assume all games need all events — note which are genre-appropriate.
- - Do NOT modify code — this is an analysis skill. Report findings only.
+ - Recommend specific analytics providers -- evaluate what is already integrated.
+ - Access or analyze actual player data -- audit only the implementation code.
+ - Recommend tracking PII (email, real name, precise location) in analytics events.
+ - Skip checking for GDPR/COPPA compliance in the tracking implementation.
+ - Assume all games need every event category -- note which events are genre-appropriate.
+ - Modify code -- this is an analysis-only skill.
+
+ NEXT STEPS:
+ - "Run `/game-monetization` to audit the monetization implementation alongside analytics coverage."
+ - "Run `/game-design-review` to verify analytics capture design-critical gameplay events."
+ - "Run `/game-performance` to check that analytics SDK does not degrade runtime performance."