Game Analytics
Skill Profile
(Select at least one profile to enable specific modules)
Overview
Game analytics tracks player behavior and game performance. This guide covers metrics, event tracking, funnel analysis, and analytics platforms for understanding player engagement, optimizing gameplay, and improving retention.
Why This Matters
Game analytics is critical for gaming platforms as it directly impacts:
- Game Balance: Data-driven difficulty adjustments
- Monetization: Optimize in-app purchases
- Retention: Identify and address churn points
- User Experience: Remove friction points
Core Concepts
- DAU/MAU/WAU: Daily/Monthly/Weekly Active Users
- Retention: Day 1, 7, 30 retention rates
- Funnel Analysis: Conversion through game stages
- Cohort Analysis: Track groups by install date
- A/B Testing: Compare feature variants
- Player Segmentation: Group players by behavior
- LTV: Lifetime Value calculation
- Real-time Dashboard: Live metrics visualization
Inputs / Outputs / Contracts
Skill Composition
- Depends on: None
- Compatible with: None
- Conflicts with: None
- Related Skills: None
Quick Start / Implementation Example
- Review requirements and constraints
- Set up development environment
- Implement core functionality following patterns
- Write tests for critical paths
- Run tests and fix issues
- Document any deviations or decisions
# Example implementation following best practices
def example_function():
# Your implementation here
pass
Assumptions
- Player IDs are unique and persistent
- Event tracking doesn't impact gameplay performance
- Analytics platform integration available
- Database supports efficient aggregation queries
Compatibility
| Platform |
Event Tracking |
Funnels |
Cohorts |
| Unity Analytics |
Yes |
Limited |
Yes |
| GameAnalytics |
Yes |
Yes |
Yes |
| Mixpanel |
Yes |
Yes |
Limited |
| Amplitude |
Yes |
Yes |
Yes |
| Custom |
Yes |
Yes |
Yes |
Test Scenario Matrix (QA Strategy)
| Type |
Focus Area |
Required Scenarios / Mocks |
| Unit |
Core Logic |
Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |
| Integration |
DB / API |
All external API calls or database connections must be mocked during unit tests |
| E2E |
User Journey |
Critical user flows to test |
| Performance |
Latency / Load |
Benchmark requirements |
| Security |
Vuln / Auth |
SAST/DAST or dependency audit |
| Frontend |
UX / A11y |
Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |
Technical Guardrails & Security Threat Model
1. Security & Privacy (Threat Model)
- Top Threats: Injection attacks, authentication bypass, data exposure
2. Performance & Resources
3. Architecture & Scalability
4. Observability & Reliability
Agent Directives
- Always track key events without impacting performance
- Anonymize user data for privacy compliance
- Use sampling for high-volume events
- Define clear funnels for conversion tracking
- Set up cohorts for retention analysis
- Monitor real-time metrics for operational issues
- Act on insights from analytics data
Definition of Done (DoD) Checklist
Anti-patterns / Pitfalls
- ⛔ Don't: Log PII, catch-all exception, N+1 queries
- ⚠️ Watch out for: Common symptoms and quick fixes
- 💡 Instead: Use proper error handling, pagination, and logging
Reference Links & Examples
- Internal documentation and examples
- Official documentation and best practices
- Community resources and discussions
Versioning & Changelog
- Version: 1.0.0
- Changelog:
- 2026-02-22: Initial version with complete template structure
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: game-analytics3description: Game analytics tracks player behavior and game performance. This guide Use when this capability is needed.4---56# Game Analytics78## Skill Profile9*(Select at least one profile to enable specific modules)*10- [ ] **DevOps**11- [x] **Backend**12- [ ] **Frontend**13- [ ] **AI-RAG**14- [ ] **Security Critical**1516## Overview17Game analytics tracks player behavior and game performance. This guide covers metrics, event tracking, funnel analysis, and analytics platforms for understanding player engagement, optimizing gameplay, and improving retention.1819## Why This Matters20Game analytics is critical for gaming platforms as it directly impacts:21- **Game Balance**: Data-driven difficulty adjustments22- **Monetization**: Optimize in-app purchases23- **Retention**: Identify and address churn points24- **User Experience**: Remove friction points2526---2728## Core Concepts291. **DAU/MAU/WAU**: Daily/Monthly/Weekly Active Users302. **Retention**: Day 1, 7, 30 retention rates313. **Funnel Analysis**: Conversion through game stages324. **Cohort Analysis**: Track groups by install date335. **A/B Testing**: Compare feature variants346. **Player Segmentation**: Group players by behavior357. **LTV**: Lifetime Value calculation368. **Real-time Dashboard**: Live metrics visualization3738## Inputs / Outputs / Contracts39#4041## Skill Composition42* **Depends on**: None43* **Compatible with**: None44* **Conflicts with**: None45* **Related Skills**: None4647## Quick Start / Implementation Example48491. Review requirements and constraints502. Set up development environment513. Implement core functionality following patterns524. Write tests for critical paths535. Run tests and fix issues546. Document any deviations or decisions5556```python57# Example implementation following best practices58def example_function():59 # Your implementation here60 pass61```626364## Assumptions65- Player IDs are unique and persistent66- Event tracking doesn't impact gameplay performance67- Analytics platform integration available68- Database supports efficient aggregation queries6970## Compatibility71| Platform | Event Tracking | Funnels | Cohorts |72|----------|---------------|---------|---------|73| Unity Analytics | Yes | Limited | Yes |74| GameAnalytics | Yes | Yes | Yes |75| Mixpanel | Yes | Yes | Limited |76| Amplitude | Yes | Yes | Yes |77| Custom | Yes | Yes | Yes |7879---8081## Test Scenario Matrix (QA Strategy)8283| Type | Focus Area | Required Scenarios / Mocks |84| :--- | :--- | :--- |85| **Unit** | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |86| **Integration** | DB / API | All external API calls or database connections must be mocked during unit tests |87| **E2E** | User Journey | Critical user flows to test |88| **Performance** | Latency / Load | Benchmark requirements |89| **Security** | Vuln / Auth | SAST/DAST or dependency audit |90| **Frontend** | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |919293## Technical Guardrails & Security Threat Model9495### 1. Security & Privacy (Threat Model)96* **Top Threats**: Injection attacks, authentication bypass, data exposure97- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII98- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager99- [ ] **Authorization**: Validate user permissions before state changes100101### 2. Performance & Resources102- [ ] **Execution Efficiency**: Consider time complexity for algorithms103- [ ] **Memory Management**: Use streams/pagination for large data104- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks105106### 3. Architecture & Scalability107- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection108- [ ] **Modularity**: Decouple logic from UI/Frameworks109110### 4. Observability & Reliability111- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`112- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`113- [ ] **Error Handling**: Standardized error codes, no bare except114- [ ] **Observability Artifacts**:115 - **Log Fields**: timestamp, level, message, request_id116 - **Metrics**: request_count, error_count, response_time117 - **Dashboards/Alerts**: High Error Rate > 5%118119120## Agent Directives1211. Always track key events without impacting performance1222. Anonymize user data for privacy compliance1233. Use sampling for high-volume events1244. Define clear funnels for conversion tracking1255. Set up cohorts for retention analysis1266. Monitor real-time metrics for operational issues1277. Act on insights from analytics data128129## Definition of Done (DoD) Checklist130131- [ ] Tests passed + coverage met132- [ ] Lint/Typecheck passed133- [ ] Logging/Metrics/Trace implemented134- [ ] Security checks passed135- [ ] Documentation/Changelog updated136- [ ] Accessibility/Performance requirements met (if frontend)137138139## Anti-patterns / Pitfalls140141* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries142* ⚠️ **Watch out for**: Common symptoms and quick fixes143* 💡 **Instead**: Use proper error handling, pagination, and logging144145146## Reference Links & Examples147148* Internal documentation and examples149* Official documentation and best practices150* Community resources and discussions151152153## Versioning & Changelog154155* **Version**: 1.0.0156* **Changelog**:157 - 2026-02-22: Initial version with complete template structure158159---160> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.161<!-- tomevault:4.0:skill_md:2026-04-13 -->